aspose file tools*
The moose likes JSP and the fly likes Unable to compile JSP file with Tomcat 4.0.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Unable to compile JSP file with Tomcat 4.0.3" Watch "Unable to compile JSP file with Tomcat 4.0.3" New topic
Author

Unable to compile JSP file with Tomcat 4.0.3

salman butt
Greenhorn

Joined: Jun 17, 2002
Posts: 4
I've very recently begun meddling with JSP. Using tomcat 4.0.3 (stable release), I've been working with regular servlets for a while now and have not had any problems... although, whenever I try to view a .jsp page on the server, I get the following exception (I've tried searching on sun's site as well as jakarta's.. but can't seem to find any reason/explanation for this). The code itself isn't throwing any exceptions; it's a 3 line counter with a for loop. System is running win2k with jdk1.3.03
Exception:


Know where to run.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Hi
You have an exception in your jsptest.jsp:
In line 71 in the generated 'Servlet' of the jsp-file you have the exception:

/Ren�
[ June 17, 2002: Message edited by: Rene Larsen ]

Regards, Rene Larsen
Dropbox Invite
salman butt
Greenhorn

Joined: Jun 17, 2002
Posts: 4

/Ren�
[ June 17, 2002: Message edited by: Rene Larsen ][/qb]<hr></blockquote>
Rene, thanks for replying.
The whole code, as I said above, is just a counter:

(Taken from a tutorial).
I don't understand why that exception should result from this. Like I said, I'm very new to JSP.. if you could kindly point me towards any resources that might explain why the above exception is thrown and what I can do to get around it/prevent it from happening, it'd be much appreciated.

Edit: Well, I see the generated code for the servlet and the line that's causing it to break, I'm still lost however as to the why of it.
[ June 17, 2002: Message edited by: salman butt ]
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Hi
Try to delete the 'work' folder under tomcat
'<tomcat install path>/work/'
and try again.
The loop works fine in mine tomcat!
/Ren�
salman butt
Greenhorn

Joined: Jun 17, 2002
Posts: 4
I've tried that already, tomcat generates the folder every time.
I have the jar for jsp files off sun's site for jsp and they are in my classpath -- so I don't believe it has anything to do with that....
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Hi
Yes it has!!
Tomcat has a it own JSP compiler 'jasper-compiler.jar'.
Remove from CLASSPATH the reference you have made.
/Rene
[ June 17, 2002: Message edited by: Rene Larsen ]
salman butt
Greenhorn

Joined: Jun 17, 2002
Posts: 4
Thanks, Rene.
I took out that file from the classpath and it works fine now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to compile JSP file with Tomcat 4.0.3
 
Similar Threads
deployment problem
Apache Tomcat - JDBC error
The CATALINA_HOME enviornment variable
Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error at time of jsp executio
Not a Frequent Exception