jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Open new window using Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Open new window using Struts" Watch "Open new window using Struts" New topic

Open new window using Struts

Tanu Gulati
Ranch Hand

Joined: Oct 06, 2008
Posts: 113


I tried opening a new window using html:link attribute but could not do so. I got to know that it is possible only through javascript window.open method.(is it true that struts 1.1 do not provide this functionality)

Any way when i tried using window.popup my jsp page did not load since the page which I am giving to javascript method is relative path (like /jsp/projectLeader.jsp) do I need to pass a full path (I dont think so there must be some way)

Tanu Gulati
Chandan Sarma

Joined: Oct 04, 2011
Posts: 14
Hi Please use it <a href="/SelectName.do" target="Name">Select</a> . for me its opening a new window.
Tomas Bilek

Joined: Nov 17, 2011
Posts: 5
You must use attribute "target".

<s:a href="" target="_blank"/>

_blank Open in a new window or tab
_self Open in the same frame as it was clicked
_parent Open in the parent frameset
_top Open in the full body of the window
framename Open in a named frame
It is sorta covered in the JavaRanch Style Guide.
subject: Open new window using Struts
It's not a secret anymore!