• Post Reply Bookmark Topic Watch Topic
  • New Topic

JasperException

 
Michael Jay
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all members.
Wonder if you could help.
I've encountered a problem below when I try to compile a simple JSP file i.e. add the filename (sample shown at bottom of this message) to the localhost:8080 address. Have any of you had this problem before and solved it. If so I would be very interested to know how it's done coz I'm at wit's end at the moment.
Btw. I did follow the suggestion of copying the tools.jar file into the relevant folders and created a system environment variable of JAVA_HOME but that doesn't seem to make any difference.
I'd be truly grateful if any of you could demystify me on this matter. Your cooperation would be highly appreciated.
Thanks in advance ;-)
Martian.
SCJP
BSc.
=======================================================================
The Exception Report.
org.apache.jasper.JasperException: Unable to compile class for JSP
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.
org.apache.jasper.JasperException

=======================================================================
Sample Code called SineTable.jsp
<HTML>
<HEAD>
<TITLE> The sine data table </TITLE>
<BODY>
<%! int angles[] = {0, 30, 45, 75, 90}; %>
<TABLE BORDER="2" ALIGN="center">
<TH>Angle</TH><TH>Sine of angle</TH>
<% for (int i=0; i<5; i++) { %>
<TR><TD><%= angles[i]</TD><TD><%= Math.sin(Math.toRadians(angle[i]))%></TR>
<% } // end for loop %>
</TABLE>
</BODY>
</HTML>

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch "Martian"!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks!
bear
JSP Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And... since this is Tomcat-specific, and we have a wonderful Tomcat-specific forum here, I'm going to move this topic there for you. See you there.
bear
[ January 14, 2004: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!