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]

