In my struts.xml
I have:
<result name="Alpha" type="redirectAction">
<param name="actionName">/page1/page2</param>
<param name="id">$(id)</param>
</result>
And in a JSP I also have:
<s:url action="page4/page5"><s:param name="id" value="id" /></s:url>
These two code blocks are unrelated, just areas trying to achieve a similar outcome.
This all works ok but my issue is, if there is no id url parameter sent through, we just get "?id=" which looks terrible. How do I have the id removed when there is no value for it?
This is like an object context, sometimes a page will have it, sometimes a page wont have it. This is part of a test app hence the ominous page and param names.