make sure that this text box and the submit button are in the same FORM.

Your HTML should look something like that :
<FORM METHOD="POST" ACTION="YourServlet">
<INPUT TYPE=TEXT NAME="address">
<INPUT TYPE=SUBMIT VALUE=SEND NAME=cmdSubmit>
</FORM>

Also check that the text box name ( here it is "address") is the same in the
HTML as in the getParameter.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Peter
R Nelson
Sent: Tuesday, August 22, 2000 5:39 AM
To: [EMAIL PROTECTED]
Subject: Re: getParameter returning null


Laheeb Alsarraf wrote:

> I am not sure what u mean "I initialize another Servlet and HTML form'.
Can
> u explain more what it is u are trying to do?
>

hi,
I'm creating a web mail system.  In my first servlet the user enters login
and
password. (into a html form)  The servlet collects the parameters fine using
getParameter.  The servlet then generates some html and sends it to the
browser to display.  The user then can decide to forward a message.  This
requires them to enter in a textfield the address they want to forward the
message to.  Unfortunately the servlet can't 'see' this String value when
submit is pressed - it just returns a null value,
cheers,
Pete

___________________________________________________________________________
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

Reply via email to