Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean compilation problem

 
Jesse Crockett
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic