• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open popup from servlet

 
Fernando Dominguez
Ranch Hand
Posts: 104
Debian Eclipse IDE Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to open a poppup from a servlet?

I don�t want to go to a jsp, and thrn open another window using javascript.

Any idea?

Thanks.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Popups are browser behaviour. Servlets are server side behaviour, so it can't interact with the browser directly. You'll need to serve some JavaScript to do it.
 
Steven Harmision
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good post.Popups are browser behaviour. Servlets are server side behaviour, so it can't interact with the browser directly. You'll need to serve some JavaScript to do it.

Relationship
Relationships
Relationship Problems
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add "target=_blank" to the link where the Servlet is called from.

e.g.


when the Servlet return to the client, then it will open in the new waiting window.

Otherwise you need to use some kind of javascript to configure a popup.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fernando Dominguez:
Is there any way to open a poppup from a servlet?
HTTP fortunately disallows PUSH. The whole web would have looked like very different.

Use target="_blank" in <a> or <form> element or use Javascript's window.open(). There are no more options.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic