Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Http error 404 The requested resource is not available  RSS feed

 
shivang sarawagi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am perplexed by this problem of tomcat, the same web app code is working sometimes & sometimes I get
error "Http error 404 The requested resource is not available". Even index.jsp doesn't work.
There is no syntax or path error I have double checked. When I restart sometimes the app starts working.

Has this problem occurred with anyone? I am unable to find any logic for this.
Expecting help. Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IF your web app throws an UnavailableException, the server will throw a 404 for all subsequent requests.

Close examination of the log files is in order.

Bill
 
K. Gil
Ranch Hand
Posts: 75
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am perplexed by this problem of tomcat, the same web app code is working sometimes & sometimes I get
error "Http error 404 The requested resource is not available". Even index.jsp doesn't work.
There is no syntax or path error I have double checked. When I restart sometimes the app starts working.


seems that your application is not always successfully deployed.
all you have to do is to check your catalina.out log file, and see what kind of exceptions cause application fail to deploy.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also need to ensure that you aren't just dumping files into Tomcat and expecting them to work. You have to have an actual WAR deployment.

And, if you are using Eclipse to run Tomcat and in particular, the Eclipse WTP feature, you may have to run around and kick it a few times, since WTP doesn't do too well in the area of automatically picking up application context changes.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudden inspiration: is your servlet program in a package?

If not, whether it works or not will depend on your "current directory" when you try to access it.

In any case, lets see the web.xml

Bill
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the ServletsFaq where you will find a list of things to check for.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!