File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening another browser window

 
Gabriel Cane
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I use either the servlet API or another Java API to open a new browser window from a servlet.
Furthermore, is it possible for servlets to interact with both browser windows interchangibly?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gabriel, servlets operate completely on the server side and cannot directly cause browser actions. What your servlet can do is return javascript in the response that will cause another browser window to open. Or, depending on what your intent is, the URL that activated the servlet on the first place might be directed to a new browser window via a window.open() call, or through use of the "target" attribute on a form or anchor tag.
hth,
bear
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic