I myself found the solution.
To open link in the new window, do as it is mentioned below.

<s:url id='abc' action='xyz'></s:url>
<s:a href='#' onclick="javascript:window,open('%{abc}');">test</s:a>

this is working for me. I hope this solution can help you guys also. =) 


Mohiit wrote:
> I am using Struts 2. I want to open the page in the new window when I
> click
> on an icon. I am using <s:a> tag and giving action by <s:url> tag.
> i.e., <s:url id='abc' action='xyz'>,/s:url>
>        <s:a href='%{abc}'></s:a>
> 
> This way it is opening an action in same page. I want it in the new window
> like in HTML tag we can do it by                         link .
> What is the way in struts 2 for this..?

Struts 2's s:a tag doesn't support this. The solution is to use a 
combination of s:url and a vanilla HTML anchor tag:

   <s:url id='abc' ...
    ${abc} 

-- 
View this message in context: 
http://www.nabble.com/How-to-open-a-page-in-new-window-with-%3Cs%3Aa%3E-or-%3Cs%3Aurl%3E-tag--tp16601857p16716797.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to