• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Tomcat error 500?

 
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just installed Apache and Tomcat. Everything seems to work ok, however I wanted to test out Tomcat and put a simple jsp file http://localhost:8080/jsp-examples/o.jsp and get this error:

What does this error mean? Do I need to reinstall my JDK?
thanks,
Alex
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two problems:

j2re1.4.2_03

This is a JRE, not a JDK, so you (Tomcat) will not be able to compile JSP's. So alter JAVA_HOME to point to a JDK. If you've already installed Tomcat 5 as a Service, try uninstalling and re-installing, this time making sure Tomcat picks the JDK for JAVA_HOME.

the second problem is:
class file has wrong version 48.0, should be 47.0

I'm not sure of the exact reason, but this normally happens when people start mixing JDK 1.3 and JDK 1.4
 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Mike,
but after reinstalling Tomcat and making sure I chose JDK directory, I got the same error -- it still says "bad class file: C:\Program Files\Java\j2re1.4.2_03\lib\rt.jar(java/lang/Object.class)." How can I change my JAVA_HOME for Tomcat manually?
thanks,
Alex
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic