Michael Jouravlev wrote:
On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote:
My text field and the link are defined inside a HTML
form
....
When I submit the form, the browser address bar shows
searchFirstName=
a blank is sent.
You should start from here. Why does the browser send an emply
parameter? View HTML page source and verify that you have a <form> and
you have <input type="text" ...> inside of it. Try cutting that HTML
out, create a test HTML page and see how your browser submits the
form. Check generated request. The HTML form may not be properly
generated by JSP tags, but I don't know what exactly went wrong in
your JSP page.
The problem is that c:url produces a link, not a form submit. You cannot
capture the value entered into a text field and include it as a link
parameter, except by writing some Javascript.
The c:url tag is processed on the server, as part of generating the HTML
page. That happens *before* the user types anything into the text field.
So anything subsequently entered into the text field is not going to be
part of the link.
If you need the request to include form inputs, you need to generate
that request via a form post. Use a submit button instead of the link.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]