Solved

respose.sendRedirect() to a specific frame

Posted on 2002-03-18
7
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tomcat: Unable to run tomcat service. 2 34
Java program running SQL query 5 62
jmeter usage 4 62
Website checklist for browser compatibility? 2 57
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

732 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