bean problem in gnujsp.
I installed gnujsp and tested the examples in /usr/doc/gnujsp/examples
and they worked.
But, I cannot get the following jsp script to work.
<jsp:useBean id="a" class="mybean.A" scope="page" />
<html>
<body>
<h1>The Famous JSP Hello Program</h1>
<% String s = "GNUJSP"; %>
The following line should contain the text "Hello GNUJSP World!".
<br>If thats not the case start debugging ...
<p>
Hello <%= s %> World!
</body>
</html>
The test result shown in browser is like following.
Exception while servicing request for /~kyusic/hello.jsp:
java.lang.ClassNotFoundException: mybean.A
at javax.servlet.http.HttpServlet.service(HttpServlet.java:311)
at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:640)
at org.gjt.jsp.JspServlet.service(JspServlet.java:284)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:311)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java:314)
A.java file is like following.
package mybean;
public class A {
public String toString() {
return "hello";
}
}
I put the file A.java in /var/www/jspbean/mybean and added the following lines in /etc/jserv/zones/root.properties
repositories=/var/www/jspbean
and
servlet.org.gjt.jsp.JspServlet.initArgs=scratchdir=/var/cache/gnujsp,jserv=true,checkclass=true,pagebase=/var/www,compiler=/usr/bin/jikes %source% -classpath %class path%:/var/www/jspbean
I think I followed the manuals right and exact, but It doesn't work...
If anyone using bean in gnujsp on a Debian System, would you please
send your configuration files(all the files under /etc/jserv/)?
Or, if anyone knows why my configuration doesn't work, please let me know..
Thank you.
--
-----------------------------------------------------------
Choi, Kyusic
Seoul National Univ. Motorola lab., SCAN.
kyusic@myscan.org ICQ: #22977168
-----------------------------------------------------------
Reply to: