Solved

respose.sendRedirect() to a specific frame

Posted on 2002-03-18
7
246 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

740 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