500 Internal Server Error
Java Server Page Translation Error
Error during compilation :
E:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_examples\_jsp\_samples\_
pract\_SaveName.java:72: Method setAttribute(java.lang.String,
java.lang.String) not found in interface javax.servlet.http.HttpSession.
                   session.setAttribute ( "theName", name );
                                        ^
1 error

Hi to ALL,

 When I use session variable in JSP its shows me this error which is there
above.  the form code is like this

<HTML>
<BODY>
<FORM METHOD=POST ACTION="SaveName.jsp">
What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

and
SaveName.jsp code is

<%
   String name = request.getParameter( "username" );
   session.setAttribute( "theName", name );
%>
<HTML>
<BODY>
<A HREF="NextPage.jsp">Continue</A>
</BODY>
</HTML>


So please any body can help me in this case.

Thanks,
Nayeem.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to