Try putting your bean into a package (say, package try), then placing
that package dir (containing the bean classfile) into the classes
directory for the server.  Then, use that package name in referenceing
the class in the useBean tag.

<jsp:useBean id="try1" class="try.try1" scope="page" />

I remember running into some problems on Weblogic when trying to access
classes in the default package.

Good luck,
Ted

vaidyanathan_g wrote:

> Hi ,
>
> If I have a bean as follows
>
> public class try1{
>
>         private String userName;
>         public void setUserName(String str1)
>         {
>                 userName = str1;
>         }
>         public String getUserName()
>         {
>                 return userName ;
>         }
> }
>
> In the jsp I am using it like this:
>
> <@page import=try1>
> <jsp:useBean id="try1" class="try1" scope="page" />
>
> This gives an error that it is not able to find the class try1 in the
> working directory for jsp. But the class is available in the directory
> specified in the classpath (servletclasses directory itself).
>
> This code works fine in jswdk-1.0 and orion. Anypointers for this problem?
>
> Thanks
>
> regards,
>
> Vaidyanathan G
>
> ===========================================================================
> 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

--
---------------------------------
Ted L. Fritsch
The Revere Group
Phone:   (847) 790-9800 x4103
Email:   [EMAIL PROTECTED]

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