Steve, Is the jsp that your having problems compiling an include for another jsp page (By that I mean "<%@ include file="???.jsp" %>)? If so that your having the same problem I'm trying to track down. When the included file changes but the parent file does not, Tomcat does not seem to be trying to compile the parent page but instead tries to compile the included file on it's own and fails because it's not really a complete servlet. In your case it does not have the imports for the classes you are trying to reference. I don't really have an answer for you but we might be having the same problem.
Leonard -----Original Message----- From: Steve D George [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 11:38 AM To: [EMAIL PROTECTED] Subject: JSP compile fails to find class Hi, I've tried hunting through the archive but no success as yet so can anyone help with this please. I have a webapp that was working just fine on 3.2. I've just installed tomcat 4 and I'm trying to get the same webapp to work. I have created a new web.xml based around the example one that comes with T4. Then I've copied over the whole of the directory structure for the webapp that I'm migrating. I think this is all I need to do. The first JSP page in my web app makes use of a couple of classes. One of these is referenced as follows: <jsp:useBean id="trackerState" scope="session" class="TrackerStateBean"/> the other is referenced like this: <% new HistoryController().retrieveUsers(trackerState); %> Both the TrackerStateBean and HistoryController classes are in the WEB-INF\classes directory for the web app but when the JSP is compiling I get an error saying that class org.apache.jspTrackerStateBean cannot be found. The same is true of the HistoryController class. It appears to be looking for both classes in the org.apache.jsp package but these classes aren't in any package at all????? The error trace is below. Any help much appreciated, Cheers, Steve. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 1 in the jsp file: /trackerentry.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\locationtracker\trackerentry$jsp.java:57: Class org.apache.jsp.TrackerStateBean not found. TrackerStateBean trackerState = null; ^ An error occurred at line: 1 in the jsp file: /trackerentry.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\locationtracker\trackerentry$jsp.java:60: Class org.apache.jsp.TrackerStateBean not found. trackerState= (TrackerStateBean) ^ An error occurred at line: 1 in the jsp file: /trackerentry.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\locationtracker\trackerentry$jsp.java:65: Class org.apache.jsp.TrackerStateBean not found. trackerState = (TrackerStateBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "TrackerStateBean"); ^ An error occurred between lines: 34 and 37 in the jsp file: /trackerentry.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\locationtracker\trackerentry$jsp.java:101: Class org.apache.jsp.HistoryController not found. new HistoryController().retrieveUsers(trackerState); ^ 4 errors at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552) -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
