Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Servlet not working after deployment on Apache Tomcat 9.0
Servlet not working after deployment on Apache Tomcat 9.0 [message #1847555] Mon, 01 November 2021 11:29 Go to next message
ronak shah is currently offline ronak shahFriend
Messages: 1
Registered: November 2021
Junior Member
Servlet not working after deployment on Apache Tomcat 9.0.

I am new to JAVA development.

I have created a simple Servlet called 'test'. Here I have uploaded my code

its works in Eclipse with Apache Tomcat. But after deployment on Apache Tomcat, it gives the error " error instantiating servlet class".

Version is Tomcat 9.0.54 on both server and eclipse PC.

The operating system Win 10 and also tired on win server 2016.

At First time when I run Servlet, it gives an error "Error instantiating servlet class [com.MyServlets.test]" here I have uploaded a full error screenshot


And When I try to access the same servlet second time I get this The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Here I have uploaded a full error screenshot



My other JSP page works properly on the same Apache Tomcat.
  • Attachment: first erro.JPG
    (Size: 122.51KB, Downloaded 133 times)
  • Attachment: second erro.JPG
    (Size: 31.46KB, Downloaded 117 times)
  • Attachment: code.JPG
    (Size: 60.41KB, Downloaded 110 times)
Re: Servlet not working after deployment on Apache Tomcat 9.0 [message #1850252 is a reply to message #1847555] Wed, 23 February 2022 01:43 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4267
Registered: July 2009
Senior Member

Always look up the JavaDoc for the Exception/Error that's logged. It's an UnsupportedClassVersionError indicating that you have compiled your classes for Java 16, but are not running Tomcat with Java 16.

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Eclipse on Virtual Box debug on embedded
Next Topic:Eclipse IDE java-2021-06-R-linux-gtk-x86_64 Installer Fails
Goto Forum:
  


Current Time: Thu Sep 29 15:46:41 GMT 2022

Powered by FUDForum. Page generated in 0.02081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top