Hi
My environment is Windows Millennium running Tomcat v 4.0
I've written a very simple class. Its not a bean,
its not a servlet its a class file and that's it. My problem
is that my very simple jsp can't find the thing. The
documentation suggests the class file should be placed
in the \WEB-INF\classes directory (so I've tried this) In fact
I've tried putting everywhere I can think of (common\classes,
server\classes, all of the WEB-INF/classes. I don't know.
Is there any way I can influence the compilation phase to
specify where classes are maybe?
Here is the Jsp:
 
<%@
page
   language = "java"
   contentType = "text/html"
%>
<html>
<% String str= "goodbye";
   Robot r = new Robot("rob");
%>
 
<%=str %>
</html>
and The error message I get is as follows:
 
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occured between lines: 11 and 14 in the jsp file: /jsp/kevin.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\App1\jsp\kevin$jsp.java:60: Class org.apache.jsp.Robot not found.
                   Robot r = new Robot("rob");
                   ^


An error occured between lines: 11 and 14 in the jsp file: /jsp/kevin.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\App1\jsp\kevin$jsp.java:60: Class org.apache.jsp.Robot not found.
                   Robot r = new Robot("rob");
                                 ^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
etc...
Please can somebody tell me what is going on and how to fix it? Thank you. Kevin Wright.

Reply via email to