Forums Register Login

resourcenotfoundexception

+Pie Number of slices to send: Send
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!!!
+Pie Number of slices to send: Send


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
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
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
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 650 times.
Similar Threads
Calling a servlet from a html page
Error JSF 2.1: java.io.FileNotFoundException:*/*.xhtml Not Found in ExternalContext
Making my own servlet (for the first time...)
Unable to run web application(java) on tomcar server
Deployment Exception
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:13:14.