I have created a Tomcat server on my school-issued unix accountusing this file:
ID: 3615307 • Letter: I
Question
I have created a Tomcat server on my school-issued unix accountusing this file: jakarta-tomcat-4.1.27.tar.When trying to create a Java servlet, I ran into problems. Yesterday, it would compile (javac filename.java), but when I triedto access the servlet it gave me errors like the following:
HTTP Status 500
javax.servlet.ServletException: Cannot allocate servlet instancefor path /examples/servlet/serv1
java.lang.UnsupportedClassVersionError: serv1 (Unsupportedmajor.minor version 49.0)
I figured out that my code was NOT the problem as it worked fine inNetbeans, and I also tried using an existing (and working) javaservlet code. I copied the code into a new .java file, triedto compile and it would not work. I reinstalled the Tomcatserver, and now I get errors when I try to compile.
Does anyone know what the problem might be?
THANK YOU
Explanation / Answer
Dear..
Here the problem is in Tomcat/jakarta server on Unix the JVM forbothe NetBeans and Tomcat version are different.
Just check the vertion of JDK and then chech whetheryou deploye this in valied JDK vertion or not. because theproblem comes when u develop diffrent version JDK and deployeein Diffrent JDK VERSION .