• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening another browser window

 
Gabriel Cane
Ranch Hand
Posts: 39
  • 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: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic