--- Jeff Ousley <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I cannot seem to get this example below to work
> under
> tomcat (I'm using version 4.1.18). I get an error
> indicating that the class localBean cannot be found
> such as:
> 
> 
> java.lang.ClassNotFoundException: localBean
>       at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
>       at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
> ....
> 
> 
> 
> I tried doing an import (which is now commented out)
> to no avail. Can I not have a bean in my jsp page?
> If
> I can, how do I reference it or what do I set so
> that
> it can be found?
> 
> thanks!
> 
> 
> 
> example page
> ------------
> 
> <HTML>
> <%-- <%@ page import="localBean" %> --%>
> 
> <%!
> // this is a local "helper" bean for processing the
> HTML form
> static public class localBean
> {
>    private String value;
>    public String getValue()         { return value;}
>    public void setValue(String s)   { value = s; }
> }
> %>
> 
> <jsp:useBean id="localBean" scope="page"
> class="localBean" >

Where is the bean class file? Is it in 

$CATALINA_HOME/webapps/yourApp/WEB-INF/classes ?

Is the bean in a package? If so, it needs to be in a
corresponding directory structure under classes. Is
you bean in fact named localBean.[java|class] ?
Convention says Java classes should be named
LocalBean.java.

{{SNIP}}

=====
[EMAIL PROTECTED]
http://www.charleshbaker.com/~chb/
If you cannot in the long run tell everyone what you have been doing,
your doing was worthless. -- Edwim Schrodinger

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to