• 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

opening a new window through response.sendredirect

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all...

I'm redirecting One.jsp to two.jsp.... now i want the two.jsp to open in a new window but it opens in the same window as of One.jsp... can any one plz tell me how i can open a new window from response.send redirect...

I don't want to use Javascript as i have to pass session attributes and also i have no buttons to click....!!!

Plz help..!
thanxs in advance..!
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you have to use JavaScript at some stage, because opening the new window is an action that the browser has to take, you can't do it on the server.

But you can still pass the session attributes, because since the new window is launched from the current window, it belongs to the same session.

If it needs to be done without clicking any buttons, you will need to use some other eventhandler like body's onLoad or a form's onSubmit.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also if a person has a pop up blocker installed, then it will not open up the window.
 
Sonny Gill
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A very valid point, that is often overlooked in the early stages!
Been there, done that
[ July 26, 2004: Message edited by: Sonny Gill ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic