Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with jsp:useBean class not found

 
Matthew Williams
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try read this post:
http://www.coderanch.com/t/280894/JSP/java/jsp-accessing-servlets-static-methods
Rene
 
Matthew Williams
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you add a package to 'style.class' then you'll see that it works.
Rene
 
Matthew Williams
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rene,
Sorry about that. The light came on and it is working wonderfully now. Thanks a million.
Matt
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic