Make sure your text field is defined inside an HTML form. Make sure
you have proper taglib directives on top of your JSP page, for
example, for html-el tags.

Get an HTTP sniffer and see what is sent from browser when you submit
a form. If you use Firefox, get Live HTTP Header extension.

On 7/19/06, Caroline Jen <[EMAIL PROTECTED]> wrote:
I am not talking about submit a JSP, perform some
action, and return a JSP.

I submit the textfield, and I used System.out.println
in my action class to write out the value submitted.
I got a blank.   Therefore, something must go wrong.

--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:

> On 7/19/06, Caroline Jen <[EMAIL PROTECTED]>
> wrote:
> > I must have done someting wrong.
> >
> > I tried to pass the value entered in a textfield:
> > <html-el:text property="searchFirstName" />
> >
> > to a link this way:
> > <c:url value="/admin/sortUsers.do"
> var="ascFirstName">
> >     <c:param name="searchFirstName"
> > value="${searchFirstName}" />
> > </c:url>
> >
> > and in my action class, I have
> > String firstName = request.getParameter(
> > "searchFirstName" );
> >
> > I tried to print out the firstName, I got a blank!
> >
> > Please advise what went wrong.
>
> JSP tags are processed *on server*. For your setup
> to work you need to
> submit a pag with <html-el:text
> property="searchFirstName" /> to the
> server first, read value from request parameter and
> stick it into
> appropriate scope under "searchFirstName" name.
>
> Then, when you forward to JSP from your action,
> JSP/servlet engine
> will process JSP tags, still *on server*. It will
> read
> "searchFirstName" from servlet scope and write out
> its value into
> generated HTML markup. Then resulting HTML page will
> be sent to
> browser.
>
> If you want to do the whole thing on client, use
> HTML form and submit
> it with GET method. This way form fields will be
> appended to "action"
> URL, exactly as you wanted.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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



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

Reply via email to