This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Simple application error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Simple application error" Watch "Simple application error" New topic
Author

Simple application error

Varun Nayudu
Ranch Hand

Joined: Jun 26, 2006
Posts: 157
I am getting this error message . I dont know what to do?






index.jsp


web.xml


servlet.java


SCJP 1.5, SCWCD 1.5
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41035
    
  43
Where is the file "registration.class"?

Assuming it is in WEB-INF/classes/com/servlet, have you restarted the web app since putting it there?


Ping & DNS - my free Android networking tools app
Varun Nayudu
Ranch Hand

Joined: Jun 26, 2006
Posts: 157
Ulf Dittmer wrote:Where is the file "registration.class"?

Assuming it is in WEB-INF/classes/com/servlet, have you restarted the web app since putting it there?


I have tried to restart the web app , but no effect . Its still showing the same error message ..............
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41035
    
  43
Have you looked at the log file, like the error message suggest?
Varun Nayudu
Ranch Hand

Joined: Jun 26, 2006
Posts: 157
Ulf Dittmer wrote:Have you looked at the log file, like the error message suggest?


This the log file

I even changed my folder from com.classes to just classes.servlet1
And made all the changes in the web.xml and jsp as well Still dont know what is the issue with this application from running

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
Like the error message says Tomcat cant find some essential class file.

A typical Tomcat installation includes a "class-loader-howto.html" file which explains in detail how Tomcat finds and loads classes. Study it.

IF your class name is registration (small initial character - bad practice, use initial Cap to keep classes clearly differentiated from packages)
THEN under WEB-INF/classes, tomcat expects a com subdirectory having a servlet subdirectory having a registration.class file.

Furthermore, under WEB-INF there must be the valid web.xml file.

Why did you try such odd-ball things as a com/classes directory or classes/servlet1 when the package appears to be "com.servlet"

Bill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Simple application error
 
Similar Threads
connection problem from servlet to jdbc
Servlet running on Local host but throwing Exception on public server
uable to execute jsps
Error : javax servlet ServletException
error in servlet