Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to compile JSP file with Tomcat 4.0.3

 
salman butt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
salman butt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

/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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Rene.
I took out that file from the classpath and it works fine now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic