• Post Reply Bookmark Topic Watch Topic
  • New Topic

resourcenotfoundexception

 
purna adinarayan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mentioned the url-pattern in web.xml correctly and i also checked whether all the class files are present or not.But I am still getting ResourceNotFoundRException.someone help please.






I am getting the following exception:

HTTP Status 404 - /msn/mailcode/myserv12

type Status report

message /msn/mailcode/myserv12

description The requested resource is not available.

Apache Tomcat/6.0.43


can someone tell me where and how to edit without mistakes....can you be clear, I cant understand where i went wrong in editing!


i wait all day to get some reply for my question and all i get is disappointment of getting my thread blocked!!!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


A common error by beginners. ALL classes used in servlets and JSP must be in a package, and the directory the class files are stored in must reflect the package structure.

The reason being that without an explicit package, the JVM looks for the class file in the "current" directory - something you have no control over in a typical server.

Bill
 
purna adinarayan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:

A common error by beginners. ALL classes used in servlets and JSP must be in a package, and the directory the class files are stored in must reflect the package structure.

The reason being that without an explicit package, the JVM looks for the class file in the "current" directory - something you have no control over in a typical server.

Bill



I tried using package but getting the same exception
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here in the FAQ for servlets is a specific page which describes in detail how to handle packages and other possible causes for the "resource not found" or 404 error.

In general, the full servlets FAQ is a great resource compile over the years based on frequent questions.

Bill
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!