struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Jasnowski" <>
Subject RE: Any interest in a tag for URL parameters?
Date Tue, 01 Jul 2003 16:50:09 GMT
BTW, they have this same feature in the JSTL <url> tag.

-----Original Message-----
From: Christopher Bare []
Sent: Tuesday, July 01, 2003 12:46 PM
Subject: Any interest in a tag for URL parameters?

I'm thinking of coding up a new tag for the html tag
set called 'parameter' that could be nested inside the
<html:link> tag. Usage of this tag would be like these

<html:link page="/"
  <html:parameter id="param1" name="mybean"
  <html:parameter id="param2" name="mybean"
  <html:parameter id="param3" value="literal-value"/>


This would give you the ability to append an arbitrary
number of parameters to a URL while remaining purely
tag based. Also, you can specify the value of the
parameter using an application specific custom tag,
such as my wombat tag above.

Disadvantages are verbosity in the JSP, maintenance of
a new tag, and changes to existing code. It would
involve modifying the link tag to keep a Map of
parameters, and allow the inner tags to add to the
map, then build the URL in doEndTag(). Some
re-arrangement would be required of
RequestUtils.computeParameters(), which is already
fairly complicated. RequestUtils.computeParameters()
would have to accept the Map as a formal parameter or
pull it out of pageContext based on a defined key, if
the method signature can'tbe changed.

Does this seem worthwhile? Is it contraindicated for
some reason? Any thoughts?



Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message