u r using the method as a doPost and stating the method in the html form as
GET please change this and then try again okay respond back .
shishir
***************************************************
Change is Inevident everywhere
It stops u from Ageing
***************************************************
----- Original Message -----
From: "Andrew Ahnn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 16, 2000 1:56 AM
Subject: Stupid Servlet Question
> I am having some problems with servlets.
> I have a Login.html which hits the LoginServlet. Within the doPost method
I am trying to extract the parameters from the httpResult, but they are all
null.
>
> The Login.html is
> <HTML>
> <HEAD>
> <TITLE>Login Test</TITLE>
> <BODY>
> <H3><CENTER>Login</CENTER></H3>
> <FORM NAME = "Test" ENCTYPE="text/plain" ACTION =
"http://simon_peter:7001/login" METHOD="GET">
> <PRE>
>
> UserName: <INPUT TYPE = TEXT name = "Username"><P>
> Password: <INPUT TYPE = PASSWORD name = "Password"><BR><BR>
> </PRE>
> <BR>
> <INPUT TYPE = SUBMIT VALUE = "Done with Login">
> <BR>
> </FORM>
> </BODY>
> </HTML>
>
> And the LoginServlet.
> public void doPost (HttpServletRequest httpRequest, HttpServletResponse
httpResponse)
> throws ServletException, IOException
> {
> HttpSession session = httpRequest.getSession(true);
>
> String stUserName = httpRequest.getParameter("Username");
> String stPassword = httpRequest.getParameter("Password");
> Login login = null;
>
> httpResponse.setContentType("text/html");
> PrintWriter out = httpResponse.getWriter();
> out.println("DoingPost:\r\n");
> out.println("Username was :" +stUserName +"\r\n");
> out.println("Password was :" +stPassword +"\r\n");
> blah blah blah....
> out.close();
> ---------------------------------------
> the result is spitting out.
> DoingPost: UserName was : nullPassword was :null
>
> Can anyone shead some light. thanks
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html