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