• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bean compilation problem

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will try to give the precise details of the problem..

I'm trying to use the standard UserData class in the tutorial, I have placed this file, UserData.class, in several folders including the ROOT\WEB-INF\classes folder

Here is my CLASSPATH: .;..;C:\Tomcat 5.5\webapps\ROOT\WEB-INF\classes;C:\Program Files\Java\jdk1.5.0_06\bin

the errors:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 1 in the jsp file: /SaveName.jsp
Generated servlet error:
UserData cannot be resolved to a type

An error occurred at line: 1 in the jsp file: /SaveName.jsp
Generated servlet error:
UserData cannot be resolved to a type

An error occurred at line: 1 in the jsp file: /SaveName.jsp
Generated servlet error:
UserData cannot be resolved to a type

and the line of code causing the problem:

<jsp:useBean id="user" class="UserData" scope="session"/>

<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>

<A HREF="NextPage.jsp">Continue</A>

</BODY>
</HTML>

I hope you can help me out. Thanks!
[ June 10, 2006: Message edited by: Bear Bibeault ]
 
Jesse Crockett
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved it by adding it to a package and changing the class="..." to include the package path. Nothing like spending an hour on this to keep me interested.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad you've got it working.

For future reference, there is an entry in the JSP FAQ that covers this.
http://faq.javaranch.com/view?BeansNotFound
 
Those are the largest trousers in the world! Especially when next to this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic