| Author |
Viewing JSP files
|
Saket Barve
Ranch Hand
Joined: Dec 19, 2002
Posts: 224
|
|
I am using tomcat 4.1.12. I am unable to view any JSP file in a browser (I keep getting ClassFormatError message). Tomcat is installed properly. Also, there is absolutely no problem viewing any .html file. Any feedback will be appreicated. Thanks, Saket
|
 |
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
|
|
Hi Saket Does it possibly have anything to do with your actual JSP code. Java throws a ClassFormatError when:
... the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file
Seems something may be amiss with the generated Servlet code.
|
 |
Saket Barve
Ranch Hand
Joined: Dec 19, 2002
Posts: 224
|
|
Thanks for the reply Mark. The JSP code seems fine. Even if I change mines to a simple time displaying one, error message persists. Only now it is NullPointerException.
|
 |
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
|
|
Saket Can you post your JSP and deployment descriptor code?
|
 |
Saket Barve
Ranch Hand
Joined: Dec 19, 2002
Posts: 224
|
|
Sorry for the late reply Mark. Here's a sample JSP code I am using for testing purpose only: <html> <head> <title> JSP Test </title> </head> <body> <h1> JSP Test </h1> Time: <%= new java.util.Date() %> </body> </html>
|
 |
Mark Howard
Ranch Hand
Joined: Feb 14, 2001
Posts: 285
|
|
Saket I tried your code and it worked ok on Tomcat version 4.0.4. I can only assume there must be something out of whack somewhere else. Do you have a deployment decriptor mapping for this JSP file? Have you made any changes to the Tomcat configuration files since initial installation? Are all your system path parameters set up correctly? I'm just guessing here
|
 |
Saket Barve
Ranch Hand
Joined: Dec 19, 2002
Posts: 224
|
|
I made several changes (in a go) to the following files: serverl.xml setclasspath.sh .cshrc I couldn't locate the exact source of my error but following the changes I made above, everything seems okay.
|
 |
 |
|
|
subject: Viewing JSP files
|
|
|