File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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 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="/" 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
I agree. Here's the link:
subject: Open new window using Struts