wood burning stoves 2.0*
The moose likes Struts and the fly likes Problem with 404. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with 404." Watch "Problem with 404." New topic
Author

Problem with 404.

Mark Wa
Ranch Hand

Joined: May 29, 2009
Posts: 122
Hi I have posted this here as it may be a struts problem.

I'm using struts 1.

Since introducing a new error page for HTTP404's I have been getting these errors printing out (as theres some logging in the 404 error page)
but the pages that dont exist are relative urls on a jsp. They work fine from the jsp, but when stuts forwards to that page there is a problem - see the report below:

MyApp PAGE NOT FOUND: *****************
Time : 2010-07-20 08:16:20:140
Referer : http://localhost/MyApp/someAction.do
URL that doesnt exist: /MyApp/scripts/helpPopups/myjsfile.js
**************************************

the url that doesnt exist is missing a folder "pages" after MyApp but the only page that is refering to this .js file is a jsp contained within "pages". It all works fine, but yet somehow this error is occuring. It's as if its calling it from the jsp and the servlet (a struts action).

the proper location of the file is /MyApp/pages/scripts/helpPopups/myjsfile.js
and the location of the only page refering to it is /MyApp/pages/myjsp.jsp

Can anyone explain this?
Mark Wa
Ranch Hand

Joined: May 29, 2009
Posts: 122
It seems this happens only with IE and not FF
Mark Wa
Ranch Hand

Joined: May 29, 2009
Posts: 122
I have found the cause of this problem :

http://robertnyman.com/2010/02/18/css-files-downloaded-twice-in-internet-explorer-with-protocol-relative-urls/

Not a struts problem but a relative URL problem only with IE
Gaurav Sainii
Greenhorn

Joined: May 18, 2009
Posts: 24
Please share some more details for this problem. Such as the code snippets from the jsp, action mapping in config file, action, etc.
 
 
subject: Problem with 404.