wood burning stoves 2.0*
The moose likes Servlets and the fly likes Launch a new window from a servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Launch a new window from a servlet?" Watch "Launch a new window from a servlet?" New topic
Author

Launch a new window from a servlet?

Paul Richards
Greenhorn

Joined: Jul 25, 2001
Posts: 19
Folks
Is it possible to launch a completely new window from a servlet and if so how?
cheers Paul
Angela Margot
Ranch Hand

Joined: Feb 07, 2002
Posts: 80
You could do it in Javascript - or with an anchor/target. This is the html that would open a link a new window
<a href="mywindow" target="_blank">Open Window</a>
There are 4 pre-defined frame targets:
_blank --> Opens page in a new blank browser window
_self ---> Opens page in the same frame where it was called from
_parent -> Opens page in parent frame of where it was called from
_top ----> Opens page on top of all frames

Does this help any??


Angela Margot <img src="smile.gif" border="0"> <br />Sr. Software Engineer<br />SCJP2 SCWCD MCSD MCP
Jim Petersen
Ranch Hand

Joined: Jul 24, 2001
Posts: 241
From above I think you could wrap it in the out.println("...") call but to my mind this seems messy and seems to lead to an unclear separation of role (unclear separation of presentation and control etc)
Just my 2p...


- Jim Petersen <br />SCJP2<br />SCWCD<p>- but then again, I could be wrong...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Launch a new window from a servlet?
 
Similar Threads
How to by pass pop up blockers while using window,open()
Scope in Struts bean
Testing client crashes
cookies exist when we close browser?
session question