Solved

Redirecting one servlet into a Frame

Posted on 2001-06-20
4
235 Views
Last Modified: 2013-11-24
Hi,

I got one problem... after checking some conditions i need to call another html page which is possible through res.sendRedirect(URL) method.
calling html is in one frame...i need to call the new html into the same frame...(these htmls are actually servlets).
But when i call i am loosing other frames ....is there any way to do this in servlets....

Thanks in Advance
maluri
0
Comment
Question by:maluri
  • 2
4 Comments
 
LVL 2

Expert Comment

by:vpadma
ID: 6212034
You can set the target attribute to self.
TARGET=_self
This will work.

Padma.
0
 

Author Comment

by:maluri
ID: 6212307
If that is html page we can specify target as something...
but this is in servlet...how to specify the target...
0
 

Expert Comment

by:Nachiap
ID: 6212977
In the submiting servlet aslo u can set the target.
if you want the response in the same frame ,just give target of that form aobject as _self.
this is possible in servlets also ;-)
0
 
LVL 2

Accepted Solution

by:
vpadma earned 50 total points
ID: 6214461
Maluri,
Yeap, as pointed out by Nachiap, it is very much doable with servlets. Basically we need to understand that servlet finally renders html one way or the other and it IS possible to do all the stuff you would do to an html page.
One of the ways you can do this is encode it in the url,
for example,
http://your_host/servlet/YourServlet?target=_self

Just like how you would incluse any other parameter. I think this would work.

Padma.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

785 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