wood burning stoves*
The moose likes Servlets and the fly likes directing output to a frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "directing output to a frame" Watch "directing output to a frame" New topic

directing output to a frame

manav k

Joined: Oct 30, 2000
Posts: 19
I am calling a servlet from inside a frame..but the problem is that the output from the servlet is also directed to this particular frame...how can i redirect it to any other frame or say have it display on "top"

Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has a naming policy, described here and "manav k" is not a valid name. Please choose one which meets the requirements.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The way to direct the output from a servlet to another frame or window is to use the "target" attribute of the <a> and <form> tags. For example
<a href="/servlets/something" target=_top>Do It</a>
"_top" is a special name indicating the overall frame for the current window. Otherwise you may use the name of any window or frame that the browser knows about.
jQuery in Action, 2nd edition
subject: directing output to a frame
Similar Threads
Redirecting servlet to another frame
setting target on a href
HTML/JavaScript Issue
Servlet redirect & frames
basic question based on request & response ...