anuja parikh

Greenhorn
+ Follow
since May 07, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by anuja parikh

Thanks a lot for this help...i could solve out the problem...
anuja
22 years ago
The code for my UserData is as follows:
public class UserData {
String username;
String email;
int age;
public void setUsername( String value ){
username = value;
}
public void setEmail( String value )
{
email = value;
}
public void setAge( int value )
{
age = value;
}
public String getUsername() { return username; }
public String getEmail() { return email; }
public int getAge() { return age; }
}
22 years ago
Hi!
I m new to JSP and beans and was just trying out the sample example from tutorials. But i got struck using beans and JSP..
1. Initially i wrote an html using button and textfields and on
clicking on that button should open a jsp page named
SaveName.jsp
2. I wrote a bean class named UserData and wrote all get and set methods required.
3. I then wrote a JSP named SaveName.jsp and coded something like this..
<jsp:useBean id="user" class="UserData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<html>
<body>
<A href="NextPage.jsp"> Continue </A>
</body>
</html>
4. The coding of NextPage.jsp is something like this..
<jsp:useBean id="user" class="UserData" scope="session"/>
-------including other html tags...
I initially kept my all files in c:\tomcat\webapps\examples\jsp
directory and also compiled my bean UserData.java file here...but i got the error message when i clicked on button and my SaveName.jsp couldnt be opened to store the data..
The error is as follows :
org.apache.jasper.JasperException: Unable to compile class for JSPC:\TOMCAT\bin\..\work\localhost\examples\jsp\SaveName_jsp.java:57: Class org.apache.jsp.UserData not found.
UserData user = null;
^
C:\TOMCAT\bin\..\work\localhost\examples\jsp\SaveName_jsp.java:60: Class org.apache.jsp.UserData not found.
user= (UserData)
^
C:\TOMCAT\bin\..\work\localhost\examples\jsp\SaveName_jsp.java:65: Class org.apache.jsp.UserData not found.
user = (UserData) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserData");
^
3 errors
I also tried to keep my class files in
c:\tomcat\webapps\examples\web-inf\classes directory but the same error follows...
Can anyone help me to solve this problem....
Thanks in advance
anuja

22 years ago
thanks Mak...for ur help..
actually i was trying the same thing and had already referred this earlier before writing over here...but that i couldnt do...but when tried today i could succeed...i couldnt understand what i was doing wrong there...anyways once again thanks...and one more thing is it necessary in servlets to save all java and class files in ur classes directory...is that so what is the reason???
anu
22 years ago
hello friends...
thanks for ur replies but still i m getting the same error message when i try to start server using startup.bat
anu
22 years ago
Dear friends
I m trying to compile and run the servlet since last few hours but in vain... i did set my classpath in autoexec.bat file as follows..
set JAVA_HOME=c:\jdk1.3
set TOMCAT_HOME=c:\tomcat
path=c:\tomcat\bin;
path=c:\jdk1.3;
set classpath=c:\jdk1.3\jre\lib\rt.jar;
set classpath=c:\tomcat\common\lib\servlet.jar;c:\jdk1.3\src.jar;c:\jdk1.3\lib\tools.jar;
i m able to compile my servlet TestServlet and both java and class files r stored in tomcat\webapps\examples\web=inf\classes
directory...
but now when i start to run tomcat in c:\tomcat\bin\startup.bat
i get the following error message :
Using CLASSPATH: ..\bin\bootstrap.jar;c:\jdk1.3\lib\tools.jar
Bad Command or file name
can to help u to solve this problem and run my servlet in browser...
thanks
anu


22 years ago