• 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

Child Window

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Friends,
Just like in JavaScript, can we open a servlet in a new window using java. If so, how? A piece of code can be very useful if possible.
Advance Thanks ....

------------------
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if you understand that servlets are entirely server-side software... basically, as far as a browser is concerned, a URL that accesses a servlet is the same as any other URL.
If you want to open the returned HTML from a servlet in a new window, use JavaScript, or just the "target" parameter in your anchor or form tag:
<A href="/servlet/MyServlet" target="_blank">open servlet page</A>
- or -
<FORM action="/servlet/MyServlet" method="POST" TARGET="_blank"> form contents... </FORM>
If you're displaying the page from an applet, just use the standard Applet call showDocument( URL, "_blank" ) to do that. If you need to POST data to that servlet and display the result to a new window... Well, I've done it, but you need to use Netscape's LiveConnect (yes, IE supports it) to communicate with JavaScript.
[This message has been edited by Rob Whelan (edited October 20, 2000).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic