ClassNotFoundException: javax.servlet.Servlet at Tomcat startup
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
posted
0
Dear all,
I am trying to start the tomcat server directly by running startup.bat file of the tomcat/bin folder. But I am getting the below mentioned servlet exception:
I have added all the necessary jar files in the tomcat lib folder as well.
Cheers,
Keerthi Kumar N
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
posted
0
Dear all,
The server is getting started successfully, but the application is not loading. It is throwing the above mentioned servlet exception. Please help me out to resolve the issue.
1. First check to which Jar does the Servlet class belongs to (I feel it is j2ee.jar). You can use the windows Search to find out where the jar lies in your system.
2. Put the Jar in the Runtime path of tomcat.
3. Restart the Server
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
posted
0
Dear,
I added the j2ee.jar file into the tomcat/lib folder and when i started the server, I am getting the below error:
Praneeth Yeri
Greenhorn
Joined: Oct 07, 2010
Posts: 11
posted
0
1. Do you have any working web app that is present in the webapps folder ? I feel that this error is coming because tomcat is not able to find any webapps ( web.xml). Try to clean up the webapps folder and try to put a working webapp with all the requried files ( web.xml etc.) in it.
2. One more way which works most of the time is, instead of doing debugging this way ,
I would suggest you download a fresh copy of Tomcat from the Internet and then directly start the server. Every tomcat download will have some working webapps in them. This would save you a lot of time instead of spending time on debugging a messed up tomcat install. After this, you can add your webapp to the working one.
Keerthi Kumar
Ranch Hand
Joined: Apr 20, 2009
Posts: 105
posted
0
Dear Praneeth,
Just clarify below doubts of mine:
1. Where should i place the j2ee.jar and servlet-api.jar files?? ( in tomcat/lib or web-inf/lib folder)
2. can i place the servlet-api.jar in both tomcat/lib or web-inf/lib folder?
3. can i use both j2ee.jar and servlet-api.jar? will this lead to any conflict?