helen ge wrote:
> Hi,
> did you set up your classpath to $TOMCAT_HOME\examples\WEB_INF\classes ?
>
Tomcat does that for you -- the WEB-INF/classes and all JAR files under WEB-INF/lib
are already added to the class path for your web application automatically.
> >From: tonney <[EMAIL PROTECTED]>
> >Reply-To: A mailing list about Java Server Pages specification and
> > reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: a Tomcat's question
> >Date: Wed, 14 Jun 2000 15:53:43 +0800
> >
> >hi,I have developed a java bean named Mybean.java and I copy the .class and
> >.java files to $TOMCAT_HOME\examples\WEB_INF\classes\mybean\ . I use this
> >bean in the user.jsp which lies at \examples\jsp\user\.But I get a 404
> >error, It looks to me that user.jsp can't find Mybean. I don't know why ,
> >can someone help me? thanks in advance.
>
If you put your class in WEB-INF/classes/mybean, you are saying that the bean is in
package "mybean" (it must be compiled that way also), and you need to refer to it
(in the JSP page) as "mybean.MyBean".
If your bean does not have a "package" declaration at the top, you should put it in
"WEB-INF/classes" instead.
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