Alex Hunsley <lard@tardis.ed.ac.molar.uk> said:
>> hai
>> can i pass some values into a static html elemenets(like passing some
[quoted text clipped - 6 lines]
>> server to return the same html file by keeping same valus user entered
>> before submission.how can i achieve this.
...
>Or, another way to do it - but the way you seem to want to avoid - is to
>have the create user page at the server side, as a servlet that spews
>out a template. If the servlet deems appropriate, it could insert the
>username/whatever into the template it was returning.
... and continue from this with a bit better modeling:
- the form is a JSP
- submit action is a servlet
The JSP, when rendered, will take field default values from a set of
session attributes. The servlet, when called via the form, will set
these session attributes whenever the form wasn't properly completed
(f.ex. username conflict, or whatever), and will redirect back to the
JSP.
... and to avoid hand-coding much of this, see the form validation
functionality in Struts framework (but then, a framework is yet
another thing to learn, and depending on your needs might be overkill).
On the other hand, Struts form validation has things like per-field error
messages to the user, and so on.

Signature
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)