I never compiled a tomcat - project before.. Now I have to do it. I'm
using Eclipse and importet the Project into the workspace. When I try
to start the JSP-Application with my Browser, I get an error message
like this:
javax.servlet.ServletException: org/apache/jsp/index_jsp (Unsupported
major.minor version 49.0)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Thanks for Help,
Greets Thomas
> I never compiled a tomcat - project before.. Now I have to do it. I'm
> using Eclipse and importet the Project into the workspace. When I try
[quoted text clipped - 3 lines]
> javax.servlet.ServletException: org/apache/jsp/index_jsp (Unsupported
> major.minor version 49.0)
This is because some of the classes were compiled for a version
later than what you are trying to support.
Since Java 1.5 is class version 48.0, I guess 49.0 is 1.6.
In that case, configure your IDE to handle 1.6 classes and
everything should work.
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> Thanks for Help,
[ It is common to ask a question when requesting help -
it clarifies what the problem is, and what you hope to
get from the reply. ]
Ross Bamford - 01 Nov 2005 16:55 GMT
> Since Java 1.5 is class version 48.0, I guess 49.0 is 1.6.
49.0 is Java 1.5.0 - Java 1.6 has 50.0 (and more 'compatible' format
changes)
As you say, Sounds to me like the Eclipse build is set up to compile to
Java 5 and Tomcat is running with a prior VM (most likely 1.4.2, class
format 48.0).
However, doesn't it seem strange that this is an error on a JSP -
shouldn't Tomcat compile them on the fly? Assuming OP didn't precompile
them in Eclipse too, I guess...

Signature
Ross Bamford - rosco@roscopeco.remove.co.uk
Andrew Thompson - 01 Nov 2005 18:05 GMT
>> Since Java 1.5 is class version 48.0, I guess 49.0 is 1.6.
...
> 49.0 is Java 1.5.0 - Java 1.6 has 50.0 (and more 'compatible' format
> changes)
That's odd. I checked the class version against the Java
version as reported by the VM itself.
<http://www.physci.org/pc/property.jsp?prop=java.version+java.class.version>
Here that retuns..
java.version - 1.5.0-beta
java.class.version - 48.0
What does it read in your browser?
(shrugs vaguely) I am not that 'up' on class version
numbers, just curious, really.
Ross Bamford - 01 Nov 2005 20:11 GMT
>>> Since Java 1.5 is class version 48.0, I guess 49.0 is 1.6.
> ...
[quoted text clipped - 13 lines]
> (shrugs vaguely) I am not that 'up' on class version
> numbers, just curious, really.
Just tried it with both, and I get:
java.version - 1.5.0_05
java.class.version - 49.0
and
java.version - 1.6.0_ea
java.class.version - 50.0
I notice you're on a 1.5.0 beta however, so it's probably the case that
someone forgot to change a version number at that point. IIRC until quite
recently Package.getSpecificationVersion on java.* in 1.5 was returning
1.4, because someone forgot to roll the number in rt.jar's manifest, so it
wouldn't be the first time... ;)
AFAIK 49.0 introduces new attributes and whatnot for generic signatures,
together with some new modifier flag bits (bridge methods, varargs, so
on). 50.0 will introduce (probably among other things) StackMapTable
attributes like those used by the CLDC verifier, which are now being
introduced in SE.

Signature
Ross Bamford - rosco@roscopeco.remove.co.uk
Andrew Thompson - 01 Nov 2005 20:28 GMT
> ...IIRC until
> quite recently Package.getSpecificationVersion on java.* in 1.5 was
> returning 1.4, because someone forgot to roll the number in rt.jar's
> manifest, so it wouldn't be the first time... ;)
SNAFU? I am saddened, mostly because that
explanation is so ..plausible. :-(
[ Thanks for the extra info. BTW ]
Ross Bamford - 01 Nov 2005 22:13 GMT
>> ...IIRC until quite recently Package.getSpecificationVersion on java.*
>> in 1.5 was returning 1.4, because someone forgot to roll the number in
>> rt.jar's manifest, so it wouldn't be the first time... ;)
>
> SNAFU? I am saddened, mostly because that
> explanation is so ..plausible. :-(
:)) The devil's always been in the details ...

Signature
Ross Bamford - rosco@roscopeco.remove.co.uk
Myron Turner - 27 Nov 2005 01:25 GMT
This is not a tomcat question but it is still about the unsupported
version problem.
I have an applet that I have been running from one server but when I
moved it over to a second server, all the same class files, I got the
unsupported version error off the new server inf Firefox though not in
IE. After a lot of fooling around, I was finally able to get Firefox
to import 1.5 and the . error stopped.
Also, the applet downloaded from the old server runs on MAC Safari but
not when dowloaded from the new server.
The old sever uses apache 1.3 but the new one uses 2.0. Would that
make a difference?
Mhyron Turner