Hi,
im new to tomcat and jsp. ive created a class and im tring to get my jsp files to use this class.
as far as i can see their's no problem with the code but ive givin it below just in case.
ive inserted the classes into the following folders with no success (and included these in the classpath in environment variables)
C:\Tomcat 5.0\webapps\ROOT
C:\Tomcat 5.0\webapps\ROOT\cls
C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes
this is the error that gets returned after i click the submit button.
here is the code for all the files
Cheers for the help
dex
im new to tomcat and jsp. ive created a class and im tring to get my jsp files to use this class.
as far as i can see their's no problem with the code but ive givin it below just in case.
ive inserted the classes into the following folders with no success (and included these in the classpath in environment variables)
C:\Tomcat 5.0\webapps\ROOT
C:\Tomcat 5.0\webapps\ROOT\cls
C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes
this is the error that gets returned after i click the submit button.
Code:
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 1 in the jsp file: /SaveNewName.jsp
Generated servlet error:
C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\SaveNewName_jsp.java:42: cannot find symbol
symbol : class userInfo
location: class org.apache.jsp.SaveNewName_jsp
userInfo user = null;
^
here is the code for all the files
Code:
///// GetName.jsp
<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveNewName.jsp">
What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20><BR>
What's your email Address? <INPUT TYPE=TEXT NAME=useremail SIZE=50> <BR>
What's your age? <INPUT TYPE=TEXT NAME=userAge SIZE = 2><BR>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
///// SaveNewName.jsp
<jsp:useBean id="user" class="userInfo" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>
<A HREF="NewNextPage.jsp">Continue</A>
</BODY>
</HTML>
//////// NewNextPage.jsp
<jsp:useBean id = "user" class "userInfo" scope ="session"/>
<HTML>
<BODY>
You entered <BR>
<BR>
Name: <%= user.getUserName() %><BR>
Email: <%= user.getUserEmail() %><BR>
Age: <%= user.getAge() %><BR>
</BODY>
</HTML>
Cheers for the help
dex