struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <>
Subject RE: Any interest in a tag for URL parameters?
Date Tue, 01 Jul 2003 16:56:51 GMT
Works very nicely too.
Only thing is that you need to use it with a hardcode anchor or you have to
use html-el as it will only generate the String that is the href.

So you can use it like:

<c:url var="url" scope="page" value="/">
   <c:param name="userAction"><bean:message
   <c:param name="businessEntityID"
   <c:param name="associateID"

<html-el:link href="${url}" target="_blank"

It *would* be a little cleaner to have it as just one enclosing tag.


-----Original Message-----
From: Mike Jasnowski []
Sent: Tuesday, July 01, 2003 12:50 PM
To: Struts Users Mailing List
Subject: RE: Any interest in a tag for URL parameters?

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:

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

View raw message