I've added a custom taglib in my project. One of these tags does some logic
to generate a series of links. Given one target URL, I want to create X
links to that URL with one changed parameter. If the given URL has
parameters, I want them to all be preserved except for one named
'pageNumber' which may be altered or added if missing

 

I would like to use struts URL tags in this. Ideally my tag handler would
generate s:url and s:a tags that could then be processed by struts. I don't
see a way to do this though. The only real way I immediately see is to use a
s:url tag before my tag to put a value on the stack then say something like 

prefix:myTag url="${sURL}"

to get a string in my handler. Then I'd have to parse for the pageNumber
variable to make sure I don't duplicate it, and generate html links
directly. I'd really strongly prefer some way of doing the above where I can
generate struts tags to be re-processed.

 

I know this is more of a general JSP oriented question, but it's worth
asking here. Is there a clear way to do this sort of thing?

Reply via email to