> From: "Cassius V. de Magalhaes" <[EMAIL PROTECTED]>
> Sent: Monday, May 23, 2005 2:56 PM

> I would like to change the value of a form's text field by scriplet, is it
possible, please?
> Through Javascript, I can use the form name plus the name of the field,
for example,
> "myform.address.value='xxx'". I know I can do "myform.address.value='<%=
something %>'", > where "something" is a
> scriplet variable declared previously. Is it possible to change the value
of a form field inside of a > scriplet
> just as we can by a javascript code, please?

JSPs and the Servlet model do not expose HTML forms as some large, first
class object that you can change using something like
"myform.address='something'".

Typically you'd do something very basic like:

<form action="/url">
Name: <input type="text"> <%= something %></input>
</form>

There are, of course, innumerable frameworks and such that can present HTML
elements and forms to your Java code as objects (JSF for one), but the above
is the basic of basics on how it all works and is inevitably done.

Regards,

Will Hartung
([EMAIL PROTECTED])


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

Reply via email to