• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JasperException

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You did not mention which OS you are on. Windows can be pretty lack-a-daisical about propogating environment variable changes. Are you sure that the env variable is defined in such a way as to be in scope for the Tomcat process?
 
Michael Jay
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear.
The o/s that I'm running is Windows 2000. I'm running the latest version of Tomcat which is ver 5, I believe. The version that came with JWSDP1.3 pack downloaded from Sun's website.
As for the env variable I thought that would have been standard to use the JAVA_HOME format. I saw this same format referenced in one of the configuration files in the tomcat directory.
Hope this might give you a clue.
Cheers.
Mike.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How/where did you define JAVA_HOME? autoexe.bat? control panel?
 
Michael Jay
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, by clicking Settings > Control Panel > System > Advanced > Environment Variables. This only applies to Windows 2000 or later. Hope this helps.
Cheers again.

Mike.
 
reply
    Bookmark Topic Watch Topic
  • New Topic