Here are the errors from my browser:Apache Tomcat/4.0.5 - HTTP Status 500 - Internal Server Error
--------------------------------------------------------------------------------
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /jsp/handoff1.jsp
Generated
servlet error:
C:\jakarta-tomcat-4.0.5\work\Standalone\localhost\cartapp\jsp\handoff1$jsp.java:56: Class com.cartapp.user.User not found.
com.cartapp.user.User handoff = null;
^
An error occurred at line: 1 in the jsp file: /jsp/handoff1.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0.5\work\Standalone\localhost\cartapp\jsp\handoff1$jsp.java:59: Class com.cartapp.user.User not found.
handoff= (com.cartapp.user.User)
^
An error occurred at line: 1 in the jsp file: /jsp/handoff1.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0.5\work\Standalone\localhost\cartapp\jsp\handoff1$jsp.java:64: Class com.cartapp.user.User not found.
handoff = (com.cartapp.user.User) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.cartapp.user.User");
^
3 errors
---------------------------------
Basically, it can't find the "User" class.
The deployment descriptor is working (other jsp's are running fine from this same directory.)
I'm running this on Tomcat - it isn't deployed on the web.- FYI.
My jsp file resides in c:\cartapp\jsp
I put the user class in several places - basically every possible location (in the c:/com/cartapp/user, also in the c:/cartapp/user/com/cartap/user - also in c:cartapp/jsp/com.... and in c:/cartapp/user/com...
I also checked the Server.xml file and it is set-up properly. I also added the Web-Inf directory per you suggestion and added the User class. Still get the same error.
I must be missing something. Any work-around would be find. I don't care where the bean resides. I'm just in the learning phase.
Thanks again for your help..
Here is the code:
handoff
-----
<jsp:useBean id="handoff" scope="session" class="com.cartapp.user.User" />
<HTML>
<BODY>
This is the setting page!
<%
handoff.setFirstName("George");
%>
</BODY>
</HTML>
here is the user bean class
---------
package com.cartapp.user;
public class User{
protected String lastName;
protected String firstName;
public String getLastName(){
return lastName;
}
public String getFirstName(){
return firstName;
}
public void setLastName(String lname){
lastName=lname;
}
public void setFirstName(String fname){
firstName=fname;
}
}
Again, I really appreciate your efforts.
Best regards
[ October 06, 2002: Message edited by: chris ]
[ October 06, 2002: Message edited by: chris ]