Solved

respose.sendRedirect() to a specific frame

Posted on 2002-03-18
7
241 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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 …
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…
This video teaches viewers about errors in exception handling.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now