Herald,
Generally you set the value of a hidden field in some
javascript on the page depending on an action taken by
the user. Say for example the page has some gif image
that will be clicked. An onClick event might call the
javascript function which will set the value of the
hidden field before calling the submit() function.
All of this should be stored in a <form> tag set that
posts to a jsp or asp page.
The information in the form that posts is stored in
its HttpServletRequest. Say for example the hidden
field looks like this:
<input type = "hidden" name = "hdnX" value = "y">
Say the form posts to xyz.jsp. The jsp has the
ability to retrieve the value stored in "hdnX" through
it's HttpServletResponse. I think in jsp you would
use <% request.getValue("hdnX") %> which would
translate into the value "y". So you process the page
as if you expected the hidden value to contain the
value "y" (maybe you would prefer to process it
differently if it were "n" for example).
The QueryString is similar. There are different times
when you might perfer to use it. You just add the ?
and the name value pairs seperated by the &. I think
you should also URLEncode them. There's a class you
can use for that. Offhand I can't think of a good
reason, but maybe if you have several forms on a page,
and don't know which the user will submit, you can
have all of them read or write to the value in the
querystring. The problem here is that the user might
see what it is, and you may not want that. Also the
user can see the hidden value if he views the source.
These are all front end, and achieved through JSP and
Javascript or VBScript if you're using ASP. You
shouldn't rely on the database.
Hopefully this helps. You should read about <form>
and POST, GET and submit().
Hope this helps
John
--- hearld <shehuma32@y...> wrote:
> Hello
> I am really confused on this one
> When are hidden variables and URL rewriting
> implemented R they supposed to
> be implemented while creating static servlets ?If so
> then how r dynamic
> servlets created.Does all the info has to be
> accessed from the database.
>
> Any links,tutorials or help will be greatly
> appricated
> Thanx.
> Herald