Do the following :

1.) Put the bean in a package

2.) Include the package in the classpath

3.) In jsp reference it using packagename.classname

That should do
Vivek







--- Venkatesh Kesavan <[EMAIL PROTECTED]>
wrote:
> Please help, I am not able to get through this issue
> so far. I have
> installed iPlanet Webserver 4.1 SP3.
>
> The HelloBean.class file in the directory
> /usr/netscape/server4/apps/jsp/beans which is in the
> classpath, still I
> am getting this errors.
>
> HelloBean.java
> --------------
>
> import java.io.*;
>
> public class HelloBean implements
> java.io.Serializable {
>
>   String name;
>
>   public HelloBean () {
>
>     this.name = "Test";
>
>     }
>
>   public String getName () {
>
>     return name;
>
>   }
>
>   public void setName () {
>
>     this.name = name;
>
>   }
> }
> ----------------
> test1.jsp
> ----------------
>
> <HTML>
> <BODY>
>
> <jsp:useBean id="hello" class="HelloBean" />
>
> <jsp:setProperty name="hello" property="name"
> param="name" />
>
> Hello, <jsp:getProperty name="hello" property="name"
> /> !!!!!!
>
> </BODY>
> </HTML>
> -----------------
> xxxxxxxxxxxxxxxxx
> [19/Oct/2000:22:07:03] info ( 5338): Service():
> uri=/jsp/test2.jsp
> cgiScriptName=/jsp/test2.jsp token=null cached=false
> [19/Oct/2000:22:07:03] info ( 5338): Internal Info:
> loading servlet
> /jsp/test2.jsp
> [19/Oct/2000:22:07:03] info ( 5338): JSP: This is a
> jsp 1.x file
>
> [19/Oct/2000:22:07:03] info ( 5338): JSP: Before
> JSP1x
> compiler.compile, _servletName = /jsp/test2.jsp
> _servletPath =
> /usr/netscape/server4/apps/jsp/test2.jsp & dir =
> ../ClassCache
>
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Package name
> is: _jsps._jsp
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Class name is:
> _test2_jsp
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Java file name
> is:
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/_js
> p/_test2_jsp.java
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Class file
> name is:
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/_js
> p/_test2_jsp.class
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Accepted
> org.apache.jasper.compiler.Parser$Bean at
> /jsp/test2.jsp(3,0)
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Accepted
> org.apache.jasper.compiler.Parser$SetProperty at
> /jsp/test2.jsp(5,0)
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Accepted
> org.apache.jasper.compiler.Parser$GetProperty at
> /jsp/test2.jsp(7,7)
> [19/Oct/2000:22:07:03] info ( 5338): JSP1x Jasper
> Trace: Compiling
> with: -classpath
>
/usr/netscape/server4/apps/servlets/classes111.zip:/usr/netscape/server
>
4/plugins/samples/servlets/beans.10/SDKBeans10.jar:/usr/netscape/server
>
4/plugins/samples/servlets/beans/SDKBeans.jar:/usr/netscape/server4/bin
>
/https/jar/Bugbase.jar:/usr/netscape/server4/bin/https/jar/Calljsac.jar
>
:/usr/netscape/server4/apps/jsp/beans:/usr/netscape/server4/apps/servle
>
ts:/usr/netscape/server4/bin/https/jar/NSServletLayer.jar:/usr/netscape
>
/server4/bin/https/jar/NSJavaUtil.jar:/usr/netscape/server4/bin/https/j
>
ar/NSJavaMiscUtil.jar:/usr/netscape/server4/bin/https/jar/servlets.jar:
>
/usr/netscape/server4/bin/https/jar/jsp092.jar:/usr/netscape/server4/bi
>
n/https/jar/xml.jar:/usr/netscape/server4/bin/https/jar/jspengine.jar:/
>
usr/netscape/server4/bin/https/jar/SSJS.jar:/usr/netscape/server4/bin/h
>
ttps/jar/js14lc30.jar:/usr/netscape/server4/bin/https/jar/ldapjdk.jar::
>
:../ClassCache:/usr/netscape/server4/https-MYSERVER.COM/config/../
> lassCache -d
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/_js
> p/_test2_jsp.java
> [19/Oct/2000:22:07:04] info ( 5338):
> IWSJavaC.compile (): Java compiler
> success=false
> [19/Oct/2000:22:07:04] info ( 5338): JSP: JSP1x
> compiler threw
> exception
> org.apache.jasper.JasperException: Unable to compile
> class for
>
JSP/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/
> _jsp/_test2_jsp.java:63: Class
> _jsps._jsp.HelloBean not found.
>                 HelloBean hello = null;
>                 ^
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/_js
> p/_test2_jsp.java:66: Class
> _jsps._jsp.HelloBean not found.
>                     hello= (HelloBean)
>                             ^
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/_js
> p/_test2_jsp.java:71: Class
> _jsps._jsp.HelloBean not found.
>                             hello = (HelloBean)
> Beans.instantiate(getClassLoader(), "HelloBean");
>                                      ^
>
/usr/netscape/server4/https-MYSERVER.COM/config/../ClassCache/_jsps/_js
> p/_test2_jsp.java:93: Class
> _jsps._jsp.HelloBean not found.
>
>
out.print(JspRuntimeLibrary.toString((((HelloBean)pageContext.findAttri
> bute("hello")).getName())));
>
>    ^
> 4 errors
>
>         at
> java.lang.Throwable.fillInStackTrace(Native Method)
>         at
> java.lang.Throwable.fillInStackTrace(Compiled Code)
>         at java.lang.Throwable.(Compiled Code)
>         at java.lang.Exception.(Compiled Code)
>         at
>
javax.servlet.ServletException.(ServletException.java:68)
>         at
>
org.apache.jasper.JasperException.(JasperException.java:73)
>         at
> org.apache.jasper.compiler.Compiler.compile(Compiled
> Code)
>         at
>
com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.j
> ava:230)
>         at
>
com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity
> .java:149)
>         at
>
com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunne
> r.java:463)
>
>
> [19/Oct/2000:22:07:04] warning ( 5338): Internal
> error: Failed to get
> GenericServlet.
> (uri=/jsp/test2.jsp,SCRIPT_NAME=/jsp/test2.jsp)
>
> xxxxxxxxxxxxxx
>
>
===========================================================================
> 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


__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

===========================================================================
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