Solved

respose.sendRedirect() to a specific frame

Posted on 2002-03-18
7
245 Views
Last Modified: 2011-09-20
Hi,

I have a servlet called from one frame that will respond to a different frame. How can I do this?

Currently I have tried:

res.setHeader("Window-target","main");
res.sendRedirect(req.getScheme() + "://" + req.getServerName() + ":"+ req.getServerPort() + "url here");

Thanks,

Matt
0
Comment
Question by:MatthewL
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 200 total points
ID: 6877396
In the html of the first frame use:
<a href="your servlet url" target="the name of the second frame">something ..</a>
0
 
LVL 1

Author Comment

by:MatthewL
ID: 6877589
Hi Venci75,

I need to do this from within the Servlet as this action will be the result of a submit from one of the child frames.

Matt
0
 
LVL 2

Expert Comment

by:bagi112599
ID: 6877613
Then you can't do it.
Probably you should try to change your design logic,
while keeping your business logic about the same.
Why don't you give a brief description of what you are doing?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Expert Comment

by:maggari
ID: 6877675
<a href="your servlet url" target="the name of the second frame" onClick="javascript:document.yourFormName.submit();">something ..</a>
0
 

Expert Comment

by:maggari
ID: 6877678
don't put anything in the href..

say href=""
0
 
LVL 9

Expert Comment

by:Venci75
ID: 6879559
or - you can declare you form as:
<form  target="the target frame name" action="your url" form attributes like "action" or "method" >
use standard submit button:
<input type=submit>
</form>

0
 
LVL 1

Author Comment

by:MatthewL
ID: 6880175
Hi Venci75,

I realised I had misinterpeted your answer.  Works perfect now!

Thanks,

Matt
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question