Chainlu Sharma wrote:
> Hi
> I am having a small problem .
> I am reading the values from a form .
>
> String synopsis =req.getParameter("Synopsis");
> fetches the value This is synopsis entered in the textbox.[Confirmed
> using print statement].
>
> But on servlet response to the field, the statement
> out.println(" <td bgcolor=999999><input type=text name=\"Synopsis\"
> size=85 MAXLENGTH=79 value="+ synopsis +"></td>");
>
> prints only This ?
> Any Help?
> Thanx in advance.
> Chainlu
>
You will need to embed the "value" part in your println() statement with
quotes, just like you did the "name" part:
out.println(" <td bgcolor=999999><input type=text name=\"Synopsis\"
size=85 " +
"maxlength=79 value=\"" + synopsis + "\"></td>");
When in doubt, do a View -> Page Source in your browser to see what the
browser actually received. I'd bet the rest of the text is there, but
was ignored because the space character terminated the browser's scan of
the "value" attribute.
Craig McClanahan
___________________________________________________________________________
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