Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HANDLER THREAD PROBLEM and unhandled error

vasudha prabhala
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
file name GetName.html
<FORM METHOD = POST ACTION = "SaveName.jsp">
what is your name?
<INPUT TYPE = TEXT NAME=username SIZE= 20>
file name SaveName.jsp
String name = request.getParameter( "username" );
session.setAttribute( "theName", name );
<A HREF="NextPage.jsp">Continue</A>
file name NextPage.jsp
Hello, <%=session.getAttribute("theName") %>
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: has been
work\%3A8080%2Fexamples\ 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(
at com.sun.jsp.runtime.JspLoader.loadJSP(
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspS
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
at com.sun.jsp.runtime.JspServlet.serviceJspFile(
at com.sun.jsp.runtime.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at com.sun.web.core.ServletWrapper.handleRequest(
at com.sun.web.core.Context.handleRequest(
HANDLER THREAD PROBLEM: Socket is closed Socket is closed
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic