• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening a new browser window in Action

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic