[Logo]
Forums Register Login
html:link
<html:link action="bookEdit.do?do=editBook"
paramProperty="id"
paramId="id">Edit</html:link>

The id value is basically values which i'm getting thru the get method of the form bean.Once clicked on the link the edit action class is invoked.No i'm trying to retrieve the id value by request.getParameter("id").it gives the value null.How can I get the value for the id.Help required.
c'mon help me out.
I'm a little unclear as to what exactly you're trying to do here. If all you want to do is display the value of "id" in the request, here's how you'd do it:


This assumes that whatever is in "id" is a string or has a toString() method.

If you're trying to pass the value of request.getAttribute("id") as a parameter on a link, here's how you'd do it:

<html:link action="bookEdit" paramId="id" paramName="id" paramScope="request"/>

good luck.

Merrill
You need to add the paramName attribute to the tag. The paramName is the name of the form that contains the value you are trying to get the id from.
core JSTL handles this very nicely using c:url with nested c:param tags
JSTL api
[ March 03, 2005: Message edited by: Marc Peabody ]
I tried using all the help provided but it still doesn't work.Let me explain what I need to accomplish.Once i click on the link the value of id should be available in the book edit action class when i do a req.getParameter("id").
The correct syntax is as Merrill describes in her post.

The only difference may that your bean is in Session scope not request.

you should post the html that is being rendered from your tag to see if it is correct.
[ March 04, 2005: Message edited by: Mark Hartnett ]
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 12, 2017 03:59:09.