• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tomcat Error : HTTP Status 404

 
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I'm facing the below problem.
I have started the tomcat server V5.5,It has started successfully.

Please find the below code details.



I started the tomcat server and typed http://localhost:8080/StrutsHelloWorld/act/cooler.action
in the web browser.i get the below error as shown below.
see below error for the details



ERROR(404) : "The requested resource(/StrutsHelloWorld/act/cooler.action) is not available."

Help provided will be highly appreciated.

--
Deepak Lal
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please help me to resolve this Error.?
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did the server start without errors? Is your web.xml file set up for the srtuts2 filter to handle .action prefixes. At first glance what you've posted looks correct, so I think the problem must be in other files.
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Did the server start without errors? Is your web.xml file set up for the srtuts2 filter to handle .action prefixes. At first glance what you've posted looks correct, so I think the problem must be in other files.





I wrote: Firstly Yes,The server started successfully without any errors.
Secondly Yes, The web.xml file is configured to have an entry for FilterDispatcher.class file.It is also handling .action prefixes.

Can you tell me in which other files should the error be,Because the console output shows no Errors.



Please help me to resolve the errors.



Hi Tom,need your Guidance to resolve the above error.



--
Deepak Lal
[ October 26, 2008: Message edited by: Deepak Lal ]
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, if you're confident that your web.xml file is set up correctly, how about your application.xml file. Does it have your contxt root specified correctly?

<context-root>StrutsHelloWorld</context-root>

I think is what you will want.
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



Tom Rispoli:

Ok, if you're confident that your web.xml file is set up correctly, how about your application.xml file. Does it have your context root specified correctly?

<context-root>StrutsHelloWorld</context-root>

I think is what you will want.





My interpretation: There are only 2 .xml files available.one is struts.xml file and web.xml file.
Which is the application.xml file ?? Is this an additional file to be configured ,why do you need an entry of
<context- root>StrutsHelloWorld</context-root> in this file.

Please explain ??



--
Deepak Lal
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe the application.xml file is a standard part of the j2ee architecture to allow you to create a deployment descriptor for your application. I know in my application its where I supply the context root for my application and I'm wondering if you're getting that 404 error because of it.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
application.xml is not standard -- there is no standard for how containers declare contexts. That's container-specific. For Tomcat, it's server.xml*.

As of Tomcat 5, it's best practice to not put contexts in server.xml, but to create separate context files. See the Tomcat documentation for more information.
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I stand corrected. Guess I've spent too much time using Sun appservers.
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please tell me how to go about in resolving the 404 error.
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For some reason your struts2 filter isn't getting called, but the request does appear to be reaching your application server. You believe that the sever is starting correctly and that your web.xml file is set up correctly. The next thing that I would be suspicious of is your deployment descriptor. I don't know how this should be set up for Tomcat but Bear gave you some pointers on what to read up on in his posting.
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not able to resolve this...
Please need help ranchers.
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posting your web.xml file might help, posting your deployment descriptor files might help as well (although they are probably tomcat specific so I may not be able to make much sense of them but others may be able to). Also, try changing your URL and see if you can get a different result. See what happens if you try to access

http://localhost:8080/act/cooler.action

or

http://localhost:8080/cooler.action
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Tom,
Your suggestions have gone in Vain,I have tried all means.but still getting " Requested Resource is unavailable"

--- HTTP STATUS 404 ERROR.

Need help ranchers....
 
Ranch Hand
Posts: 398
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Deepak,

Please be courteous.

As Tom suggested, please post your web.xml and DDs. So that we can try to help you out. Nobody can do magic without knowing your problem exactly.

-Mourougan
 
Create symphonies in seed and soil. For this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic