Mark Annese wrote:

> Ok, I got it to work. Here is what I did, I place the class in a package
> under the servletclasses directory. I had it at the root before. Does anyone
> know why it needs to be ina package?
>

It's because of the way that Java resolves classnames that don't have package
prefixes.

The Java compiler will assume that any such class you reference is in the same
package as the class being compiled.  Now, consider the fact that the JSP system is
generating a servlet class for your page, and then compiling it.  Everything works
fine if the generated servlet for a JSP page is not itself put into a package --
but most JSP compilers *do* this, and they are not consistent about what package
name they use.  Thus, your (unpackaged) bean will be considered to be in the same
package, and will not be found.

Moral of the story:  you should always put your bean in packages, and use fully
qualified class names in things like <jsp:useBean>.

>
> Thanks guys!!
>
> Mark
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to