Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Http error 404 The requested resource is not available

 
shivang sarawagi
Ranch Hand
Posts: 158
  • 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: 13064
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
Saloon Keeper
Pie
Posts: 18212
53
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: 13064
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
Pie
Posts: 64967
86
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic