tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Everman <>
Subject Re: JavaBeans
Date Fri, 24 May 2002 14:39:24 GMT
Could this be a package issue as well (see Tomcat can't find my 
classes)?  Classes places in the /classes folder must be in nested folders 
matching the package name.  When you reference this class, you must use the 
package name, for instance:

<jsp:useBean id="user" class="mypackage.userclasses.UserData" scope="session"/>


At 02:30 AM 5/24/2002, you wrote:
>I have the same problem of other, I read a some tutorial too and...
>public class UserData {
>     String username;
>     String email;
>     int age;
>     public void setUsername( String value )
>     {...
>I put in and compiled and put in the same directory
>\WEB-INF\classes, and when
>  call
>I find this and compiled and put in the same directory \WEB-INF\classes, and
>when call
><jsp:useBean id="user" class="UserData" scope="session"/><jsp:setProperty
>name="user" property="*"/>
>receive this error:
>org.apache.jasper.JasperException: Unable to compile class for JSP
>An error occurred at line: 1 in the jsp file: /SaveName.jsp
>Generated servlet error:
>C:\Program Files\Apache Tomcat 4.0\work\localhost\_\SaveName$
>Class org.apache.jsp.UserData not found.
>                 UserData user = null;
>                 ^
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message