Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

response.sendRedirect  RSS feed

 
bhaskar reddy.b
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody,
please help me,i am in a cilly trouble.
i used 3 frames in my home page.
whenever i click on the submit button the result page is genrating in new browser window.
how should i redirect them to the specific frame.
i want the whole pages to be redirected or placed in frame 3 suppose,no new browser window.
i think u understood my problem in general please help me soon.
i am using response.sendRedirect("") but it is generating on new window.the result of the jsp file is comming in new window.
i think u people will help me .
waiting for ur reply
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This probably has a lot less to do with how you are redirecting than with how you've coded the page navigation in your HTML and javascript.
Short answer: look for target attributes in your HTML which could be causing the requests to be directed to the wrong place, and then use said target attribute to direct things to where you want them to be.
Longer answer: ask in (or have this topic moved to) the HTML/Javascript forum.
hth,
bear
 
bhaskar reddy.b
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello bear,
many thanx..
file that is calling a jsp file will have a target because it is an html file,but after the jsp file has been called and processed the jsp file will redirect to the concerned file.their there is no target frames.how can i give targets tfor redirection of the pages in jsp files.
can i give any targets in respose.sendRedirect("xx.html/jsp")
or may the url class can do me the favour.
please suggest me.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have something along the lines of

the response generated from the request created when the form is submitted is sent to the specified target (be it a frame or window -- depends on what the javascript reference resolves to).
As far as I know, you cannot change the target on the server side.
So you need to make sure that the HTML defining the request has the appropriate target in the first place.
This also applies if the request is generated via an anchor tag.
hth,
bear
[ March 22, 2002: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!