Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening a new browser window in Action

 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic