I am using Java Web Server 2.0.  From the documentation it said it should be
put in the <server path>/lib directory.

-----Original Message-----
From: Ola Sandstr�m (QDT) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 07, 1999 11:10 AM
To: 'Robert McLain'; [EMAIL PROTECTED]
Subject: RE: Problem getting JSP to work with JavaBean


The problem is that your jsp engine cannot find your class. You have to add
your .jar file to the jsp engine classpath.
What servlet runner / jsp engine are you using?
/Ola

-----Original Message-----
From: Robert McLain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 07, 1999 4:25 PM
To: [EMAIL PROTECTED]
Subject: Problem getting JSP to work with JavaBean


Hi,

I wrote a little JSP file that accesses a Java Bean.  Unfortunately, when I
try to access it, I get the following error:
500 Internal Server Error
Java Server Page Translation Error
Error during compilation :
can't load class: pagecompile.jsp._rob

My jsp file is as follows:
<html>
<body>
<jsp:useBean id="rb" scope="session" class="rob" type="rob" />
Date = <jsp:getProperty name="rb" property="month/>
</body>
</html>

and my bean code is:
public class rob
{
        private String _month = "APR 1999";

        public String getMonth()
        {
                return _month;
        }

        public void setMonth(String month)
        {
                _month = month;
        }

        public static void main(String [] args)
        {
                rob r = new rob();
                String mymonth = r.getMonth();
                System.out.println("My month = " + mymonth);
        }

}

I compiled rob.java, did a jar cvf rob.jar rob.class, and copied it to the
<JavaWebServer directory>/lib directory.  I shut down the Web Server and
started it up again, and got the above error message.  Any ideas what I am
doing wrong?  Thanks.

Rob

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to