aspose file tools*
The moose likes Beginning Java and the fly likes Need help with jsp:useBean class not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need help with jsp:useBean class not found" Watch "Need help with jsp:useBean class not found" New topic
Author

Need help with jsp:useBean class not found

Matthew Williams
Greenhorn

Joined: Aug 01, 2002
Posts: 5
So I tried to get past this by searching and couldn't find the right answer so I hope someone knows what I am doing wrong.
I have a class called "style.class" and a directory stucture for my jsp's that looks like this:
-root
--WEB-INF
---classes
----style.class
--home
---index.jsp
--index.jsp
I use the following code to access the bean on the index.jsp page that is in the root folder and it works fine.
<jsp:useBean id="styler" class="style" scope="request" />
When I use the code on the index.jsp page in the home folder I get a class not found error. I am just loading the bean, and I don't do anything with it yet. Why doesn't it see the bean, but the other page has no problem?
Thanks in advance.
Matt
[ August 01, 2002: Message edited by: Matthew Williams ]
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Try read this post:
http://www.coderanch.com/t/280894/JSP/java/jsp-accessing-servlets-static-methods
Rene


Regards, Rene Larsen
Dropbox Invite
Matthew Williams
Greenhorn

Joined: Aug 01, 2002
Posts: 5
I am not sure how that helps me out. Why can I access the bean when I am in the root folder for my htdocs and I can't when I am in htdocs/home? I have the code exactly the same.
Matt
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

If you add a package to 'style.class' then you'll see that it works.
Rene
Matthew Williams
Greenhorn

Joined: Aug 01, 2002
Posts: 5
Rene,
Sorry about that. The light came on and it is working wonderfully now. Thanks a million.
Matt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with jsp:useBean class not found