vasudha prabhala

Greenhorn
+ Follow
since Jan 07, 2003
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 vasudha prabhala

the following are the three files that I am using and i get the following message
GetName.html
<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveName1.jsp">
What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20><BR>
What's your e-mail address? <INPUT TYPE=TEXT NAME=email SIZE=20><BR>
What's your age? <INPUT TYPE=TEXT NAME=age SIZE=4>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
Savename1.jsp
<jsp:useBean id="user" class="UserData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<HTML>
<BODY>
<A HREF="NextPage1.jsp">Continue</A>
</BODY>
</HTML>
NextPage1.jsp

<jsp:useBean id="user" class="UserData" scope="session"/>
<HTML>
<BODY>
You entered<BR>
Name: <%= user.getUsername() %><BR>
Email: <%= user.getEmail() %><BR>
Age: <%= user.getAge() %><BR>
</BODY>
</HTML>
I have my class UserDate.Class in c:\myfolder\myclasses. and I have added this to the classpath. I am using tomcat 3.3.1 and JDK 1.4 is installed on my system. I am using servlet 2.2 and jsp 1.1 . why am I getting the following error.. please help..
Error: 500
Location: /examples/jsp/myfiles/SaveName1.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
C:\vasudha\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\examples\jsp\myfiles\SaveName1_1.java:52: Class jsp.myfiles.UserData not found.
UserData user = null;
^
C:\vasudha\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\examples\jsp\myfiles\SaveName1_1.java:55: Class jsp.myfiles.UserData not found.
user= (UserData)
^
C:\vasudha\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\examples\jsp\myfiles\SaveName1_1.java:60: Class jsp.myfiles.UserData not found.
user = (UserData) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserData");
^
3 errors, 1 warning
at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
21 years ago
JSP
file name GetName.html
<html>
<body>
<FORM METHOD = POST ACTION = "SaveName.jsp">
what is your name?
<INPUT TYPE = TEXT NAME=username SIZE= 20>
<p><INPUT TYPE= SUBMIT>
</FORM>
</BODY>
</HTML>
file name SaveName.jsp
<%
String name = request.getParameter( "username" );
session.setAttribute( "theName", name );
%>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>
file name NextPage.jsp
<html>
<body>
Hello, <%=session.getAttribute("theName") %>
</body>
</html>
when I try to execute , SaveName.jsp is generating the following error message. what is the problem? I am using jswdk. please help. I have included tools.jar in classpath. what could be the problem?

Unhandled error! You might want to consider having an error page to report such
errors more gracefully
com.sun.jsp.JspException: Compilation failed:Note: sun.tools.javac.Main has been
deprecated.
work\%3A8080%2Fexamples\SaveName_jsp_1.java:71: Method setAttribute(java.lang.St
ring, java.lang.String) not found in interface javax.servlet.http.HttpSession.
session.setAttribute( "theName", name );
^
1 error, 1 warning
at com.sun.jsp.compiler.Main.compile(Main.java:347)
at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:135)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspS
ervlet.java:77)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
ava:87)
at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155
)
at com.sun.web.core.Context.handleRequest(Context.java:414)
at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
HANDLER THREAD PROBLEM: java.net.SocketException: Socket is closed
java.net.SocketException: Socket is closed
at java.net.Socket.getInputStream(Socket.java:643)
at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:161)
21 years ago
JSP
file name GetName.html
<html>
<body>
<FORM METHOD = POST ACTION = "SaveName.jsp">
what is your name?
<INPUT TYPE = TEXT NAME=username SIZE= 20>
<p><INPUT TYPE= SUBMIT>
</FORM>
</BODY>
</HTML>
file name SaveName.jsp
<%
String name = request.getParameter( "username" );
session.setAttribute( "theName", name );
%>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>
file name NextPage.jsp
<html>
<body>
Hello, <%=session.getAttribute("theName") %>
</body>
</html>
when I try to execute , SaveName.jsp is generating the following error message. what is the problem? I am using jswdk. please help. I have included tools.jar in classpath. what could be the problem?

Unhandled error! You might want to consider having an error page to report such
errors more gracefully
com.sun.jsp.JspException: Compilation failed:Note: sun.tools.javac.Main has been
deprecated.
work\%3A8080%2Fexamples\SaveName_jsp_1.java:71: Method setAttribute(java.lang.St
ring, java.lang.String) not found in interface javax.servlet.http.HttpSession.
session.setAttribute( "theName", name );
^
1 error, 1 warning
at com.sun.jsp.compiler.Main.compile(Main.java:347)
at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:135)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspS
ervlet.java:77)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
ava:87)
at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155
)
at com.sun.web.core.Context.handleRequest(Context.java:414)
at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
HANDLER THREAD PROBLEM: java.net.SocketException: Socket is closed
java.net.SocketException: Socket is closed
at java.net.Socket.getInputStream(Socket.java:643)
at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:161)
21 years ago
JSP
when I startserver the following gets printed
my java path is c:\vasudha\java , but I also have oracle loaded on my computer and its path is c:\Oracle\jdk\bin and its invoking this path even when I have removed it from the path environment variable. how do I handle this? I tired setting JAVA_HOME variable to c:\vasudha\java and still its giving this problem.
ERROR MESSAGE:
JSWDK WebServer Version 1.0.1
Loaded configuration from: file:C:\vasudha\jswdk\jswdk-1.0.1\webs
MimeTable.load: file = c:\vasudha\java\lib\content-types.properti
eNotFoundException: c:\vasudha\java\lib\content-types.properties
java.io.FileNotFoundException: c:\vasudha\java\lib\content-types.
at java.io.FileInputStream.<init>(FileInputStream.java:56
at java.io.FileInputStream.<init>(FileInputStream.java:75
at sun.net.www.MimeTable.load(MimeTable.java:212)
at sun.net.www.MimeTable.<init>(MimeTable.java:43)
at sun.net.www.MimeTable.getDefaultTable(MimeTable.java:5
at sun.net.www.protocol.file.FileURLConnection.connect(Co
at sun.net.www.protocol.file.FileURLConnection.getInputSt
nection.java:162)
at sun.net.www.URLConnection.getHeaderField(URLConnection
at sun.net.www.URLConnection.getContentType(URLConnection
at com.sun.xml.parser.Resolver.createInputSource(Resolver
at com.sun.web.shell.WebServerConfigParser.process(WebSer
.java:80)
at com.sun.web.shell.WebServerConfigUtil.loadConfig(WebSe
java:87)
at com.sun.web.shell.WebServerConfigUtil.loadConfig(WebSe
java:49)
at com.sun.web.shell.Startup.<init>(Compiled Code)
at com.sun.web.shell.Startup.main(Startup.java:277)
endpoint created: localhost/127.0.0.1:8080
21 years ago
JSP
file name GetName.html
<html>
<body>
<FORM METHOD = POST ACTION = "SaveName.jsp">
what is your name?
<INPUT TYPE = TEXT NAME=username SIZE= 20>
<p><INPUT TYPE= SUBMIT>
</FORM>
</BODY>
</HTML>
file name SaveName.jsp
<%
String name = request.getParameter( "username" );
session.setAttribute( "theName", name );
%>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>
file name NextPage.jsp
<html>
<body>
Hello, <%=session.getAttribute("theName") %>
</body>
</html>
when I try to execute , SaveName.jsp is generating the following error message. what is the problem? I am using jswdk. please help.
Unhandled error! You might want to consider having an error page to report such
errors more gracefully
com.sun.jsp.JspException: Compilation failed:work\%3A8080%2Fexamples\jsp_0005cmy
files_0005cSaveName_0002ejspSaveName_jsp_1.java:71: Method setAttribute(java.lan
g.String, java.lang.String) not found in interface javax.servlet.http.HttpSessio
n.
session.setAttribute( "theName", name );
^
1 error
at com.sun.jsp.compiler.Main.compile(Compiled Code)
at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:135)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspS
ervlet.java:77)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
ava:87)
at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155
)
at com.sun.web.core.Context.handleRequest(Context.java:414)
at com.sun.web.server.ConnectionHandler.run(Compiled Code)
21 years ago
JSP