struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Sutton" <>
Subject [S2] Opening a new window upon a link click without Javascript
Date Thu, 03 Jan 2008 08:34:42 GMT
Heres channelge for the day...
I have a page which contains a link, when the user clicks the link they get
a PDF which they need to go off and do something with (not part of the
What I'd like to do is open a new browser window with the PDF in and retain
the page with link in the original window without using JavaScript.
In HTML I can do this using target="_blank" in the <a> tag, but with the
<s:a> tag there is no ability to specify the target attribute.
As a further mind bend there is a targets attribute for <s:a> in the tld for
2.0.11, but it doesn't get mentioned in the documentation and appears not to
be processed by the tag processing code (so maybe the tld needs a tidy).
Anyone got any thoughts?
P.S. This isn't a biggie for me as I'm going to use;
<a href="<s:property value='%{downloadLink}'/>" target="_blank"><s:property

instead of a s:a solution for the moment, it just feels like s:a is missing
some functionality if I have to revert back to switch between s:a and HTMLs
a tag.

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

View raw message