This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes Opening a new browser window in Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Opening a new browser window in Action" Watch "Opening a new browser window in Action" New topic
Author

Opening a new browser window in Action

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1073
I see this question posted around, but never found an answer.

I wrote some JavaScript that opens a new browser window. Works fine. In that browser window, I display a PDF.

The question I keep getting is why didn't I use some "struts" mechanism to open a new browser window. My thinking is that Struts is limited to the HTTP protocol and thus can't do what Javascript can do on the client side (like open a new window...).

Is this correct or is there a way to open a completely new browser window on the client from, say, an Action method in Struts?

Thanks in advance.

Mike
Vj Borkar
Greenhorn

Joined: Jan 10, 2007
Posts: 7
Javascript is a client side scripting, where as Struts Action and/or Servlets/JSP is at server side.
So obviously, there is no way one can control browsing window from the code that would run purely at the Server in this case Struts. Some fragement should run at client side to make this happen.


Regards,
VJ
SCJP 1.4, SCJP 6.0, SCWCD 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Opening a new browser window in Action