tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Baker <raschar...@yahoo.com>
Subject Re: JavaBeans
Date Fri, 24 May 2002 11:23:17 GMT

--- Anibal Constante Brito <aconstante_00@hotmail.com>
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 UserData.java 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
> SaveName.jsp
> <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$jsp.java:56:
> Class org.apache.jsp.UserData not found.
>                 UserData user = null;
>                 ^
> 
<<SNIP>>

Did you include a package statement in your
UserData.java file? Something like

package org.apache.jsp;

?

If so, then the compiled class file needs to be in 

/WEB-INF/classes/org/apache/jsp/



=====
rascharles@yahoo.com
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message