• Post Reply Bookmark Topic Watch Topic
  • New Topic

opening a new window through response.sendredirect  RSS feed

 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • 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..!
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • 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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!