Dedirect to another frame in Servlet

Hi...
I am an HTML page contains two frames say A and B .
Frame A contains some links that display the output in frame B. [Given the target of frame A as B ] .But some times depends on my request , i want to display the page in the paret frame instaed of frame B .
Is there any way in Servlet to redirect to another frame. Plz help....
Thanx in advance
~ Suresh G

Give TARGET="_parent"
Dynamically you can change the target attribute of the form
based on the request.
Message was edited by:
CjavaVM

Similar Messages

  • How to instruct servlet to output to another frame?

    Hi all,
    This is what my application is about:
    Display a page with 3 frames.
    The 1st frame is a form, and the user is to fill out the form and submit a post request. The servlet invoked will perform some query and generate a list of results with links in another frame.
    Then the user will click on a link and more computation will be performed and result will be displayed in the 3rd page.
    my first question is: how to generate the result in another frame using servlet? Is RequestDispatcher an answer? I've tried using RequestDispatcher to forward the request to the .jsp file which represents the 2nd frame but nothing in the 2nd frame happens when I submit the form in the 1st frame. Rather, the 1st frame displays a page with message "The page cannot be found."...
    My second question is: should I write 3 separate .jsp files for each frame? Do I need a jsp file for the 2nd frame? I don't really understand how I can generate result in the 2nd frame which will in turn generate other results in the 3rd page when the user submits request in the 2nd frame.
    Thanks for your attention. Your help will be greatly appreciated!

    Have a look at a problem posted by nalinisp today. It might help.

  • Frames with Servlets. Techniques?

    I built some frames with servlets with Jdevelopper
    like HOTEL EJB application from the Technet.
    Working in a frameset, after getting the parameter from fhe
    first frameset, i want to generate a new page in an other
    frameset or another frame ( from left to right for example).
    I don't know how to make it.
    Does anybody has an idea?
    Thanks
    null

    Chris Tournier (guest) wrote:
    : I built some frames with servlets with Jdevelopper
    : like HOTEL EJB application from the Technet.
    : Working in a frameset, after getting the parameter from fhe
    : first frameset, i want to generate a new page in an other
    : frameset or another frame ( from left to right for example).
    : I don't know how to make it.
    : Does anybody has an idea?
    : Thanks
    I had the same doubts as you.
    In the main page (FRAMESET) you should set the name of
    the frames , for example "LPAGE" for left frame and
    "MAIN" for right frame.
    In the hyperlinks of left page you must put the
    reserved word "TARGET" with the destination frame name :
    <A> HREF="www.dummy.com" TARGET="MAIN" dummy page </A>
    This should resolve your problem.
    Eduardo Murai
    [email protected]
    Discover Technology
    null

  • How to define target window when redirecting within frames using servlet?

    Howdy:
    Is there a way to define target window when redirecting within frames using servlets?
    How to do it in JSP as well?
    T.I.A.
    Oriental Spirit

    Your servlet (or JSP) can't decide where it is going to be displayed. The browser has already decided that when it makes the request to your servlet.

  • How can I Copy/paste the pixels within a frame in a video layer to another frame? (It duplicates the whole frame instead.)

    I'm making a handdrawn animation in the timeline using video layers, so each video layer contains the frames for the animation. The method works great..except for this -
    If lasso select a section of one frame and try to paste into another frame, it duplicates the the whole frame and pastes it with an arbitrary long frame duration for some reason (not the same duration as the frame its copied from)....not at all what I'm trying to do. Any work around? I've tried all the variations of 'paste special' to no avail.
    Thanks.

    Images and other object can either be floating or be inline. Yours are floating and will not move with the text. Inline object will move with the text but can't be outside the text layer. It doesn't help if you have created section in the document. Floating images doesn't care. Nor will it help if you create several documents that you want to merge later. Doesn't make any difference.
    My suggestion is that until your text is finished you have the images inline. Then as a last editing you can start make the images floating and move them a little.

  • How to put a string from one Frame to another Frame?

    Dear all,
    How can I put a String from one Frame to another Frame?
    When the application started, the Frame 'WindowX' will be displayed. After you press the 'openButton', a whole new Frame (inputFrame) will be shown. In this Frame )(inputFrame) you can write a String in a TextField. After pressing the okButton, this String will be sent to the first Frame 'WindowX'.
    But does anyone know how to realize the sending part?
    I've tested this code on Win98 SE and JDK1.2.2.
    Hope someone can help me. Thanks in advance.
    import java.awt.*;
    import java.awt.event.*;
    public class WindowX extends Frame implements ActionListener, WindowListener
         private Button openButton;
         private TextField resultField;
         public static void main(String [] args)
              WindowX wx = new WindowX();
              wx.setSize(300,100);
              wx.setVisible(true);
         public WindowX()
              setLayout(new FlowLayout());
              openButton=new Button("open");
              add(openButton);
              openButton.addActionListener(this);
              resultField=new TextField(10);
              add(resultField);
              resultField.addActionListener(this);
              addWindowListener(this);     
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==openButton)
                   inputFrame ip=new inputFrame();
                   ip.setSize(200,80);
                   ip.show();
         public void place(String theString) //this doesn't work
              resultField.setText(theString);
         public void windowClosing(WindowEvent event)
              System.exit(0);
         public void windowIconi......
    class inputFrame extends Frame implements ActionListener,WindowListener
         String theString = "";
         Button okButton;
         TextField inputField;
         WindowX myWX=new WindowX();   //??
         public inputFrame()
              setLayout(new FlowLayout());
              inputField=new TextField(10);
              add(inputField);
              inputField.addActionListener(this);
              okButton=new Button("OK");
              add(okButton);
              okButton.addActionListener(this);     
              addWindowListener(this);     
         public static void main(String[] args)
              Frame f = new Frame();
              f.show();
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==okButton)
                   theString=inputField.getText();
                   myWX.place(theString);   //??
                   dispose();
        public void windowClosing(WindowEvent e) {
        dispose();
        public void windowIconi......
    }

    Thanks for your reply!
    But I got an other problem:
    I can't refer to the object (wx) made from the main Frame 'WindowX', because it's initialized in 'public static void main(String [] args)'...
    Hope you can help me again... Thanks!
    import java.awt.*;
    import java.awt.event.*;
    public class WindowX extends Frame implements ActionListener, WindowListener
         private Button openButton;
         private TextField resultField;
         public static void main(String [] args)
              WindowX wx = new WindowX();   //!!
              wx.setSize(300,100);
              wx.setVisible(true);
         public WindowX()
              setLayout(new FlowLayout());
              openButton=new Button("open");
              add(openButton);
              openButton.addActionListener(this);
              resultField=new TextField(10);
              add(resultField);
              resultField.addActionListener(this);
              addWindowListener(this);     
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==openButton)
                   inputFrame ip=new inputFrame(wx);
                   ip.setSize(200,80);
                   ip.show();
         public void place(String theString)
              resultField.setText(theString);
         public void windowClosing(WindowEvent event)
              System.exit(0);
         public void windowIconi....
    class inputFrame extends Frame implements ActionListener,WindowListener
         String theString = "";
         Button okButton;
         TextField inputField;
         WindowX parent;
         public inputFrame(WindowX parent)
              setLayout(new FlowLayout());
              this.parent=parent;
              inputField=new TextField(10);
              add(inputField);
              inputField.addActionListener(this);
              okButton=new Button("OK");
              add(okButton);
              okButton.addActionListener(this);     
              addWindowListener(this);     
         public static void main(String[] args)
              Frame f = new Frame();
              f.show();
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==okButton)
                   theString=inputField.getText();
                   parent.place(theString);
                   dispose();
        public void windowClosing(WindowEvent e) {
        dispose();
        public void windowIconi..........
    }          

  • ADF : How to pass a variable from one frame to another frame ?

    Hi,
    I have an html page divided into 3 frames, all inside a frameset. Each frame are linked to a specific .jsf page (src attribute). When I list a list thanks to a ADF datatable in ONE frame, each row has a "show more" button. When I click this button I succeeded to print row detail inside the same frame thanks to the processScope ADF's native variable. The problem is that I want to display the row detail in another frame, clicking from this current frame. So for this I need to reload the other frame which display the content of the processScope variable.
    For this I use the javascript code :
    => parent.frames['bottomRight'].location.reload()
    Just before refreshing, I put the variable in the processScope of course like it appears in the backing bean :
    FacesContext context = FacesContext.getCurrentInstance();
              CLPRMBuilding building = (CLPRMBuilding)
         context.getApplication().getVariableResolver().resolveVariable(context, "building");
         if (building == null)
         return "error";
         AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
         afContext.getProcessScope().put("buildingDetail", building);
    Next, when the user click on the button "show more" a binding CoreCommandButton component is done. And the accessor's code is executed :
    public void setShowMoreCommandButton(CoreCommandButton showMoreCommandButton) {
              this.showMoreCommandButton = showMoreCommandButton;
              showMoreCommandButton.setOnclick("parent.frames['bottomRight'].location.reload()");
    And so the other frame is reloaded ! But the "buildingDetail" variable seems not to be present in the processScope because in the jsf page displayed by the other frame no content is printed, like if the variable were not initialized. How to do then ? How to pass the buildingDetail variable to the other frame which I need to reload to refresh it's content ?

    elaine_g wrote:
    I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
    class B {
      int b;
      A r = new A();
      r.a;  //syntax error
    }Why? Class definition restricts what you can define within a class to a few things:
    class X {
        Y y = new Y(); //defining a field -- okay
        public X() { //defining a constructor -- okay
        void f() { //defining a method -- okay
    }... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
    This is also illegal syntax:
    int doB() {
          A r = new A();
          r.a;  // error: not a statement
    }Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that.

  • Applet navigator to open a page in another frame.

    Hello to the Java gurus out there,
    I was wondering if someone could give me a pointer as to how I can get an applet navigator to open a page in another frame of the web browser?
    Say for example, I have two frames in the main HTML page where one frame contains an Applet navigator, and the other page can be loaded based on where the user clicks on the applet navigator.
    Capturing the mouse click event is all good, but then how do I load a page in another frame ??
    Any help would be much appreciated.
    J. Park

    In your applet class do the following
    getAppletContext().showDocument(new URL("somepage"), "Target");
    See the AppletContext class in http://java.sun.com/j2se/1.3/docs/api/index.html for more information.

  • How to check whether music has finished playing and go to another frame

    I have a bunch of music samples which are set up to play on
    the click of a button, and at the same time go to another frame in
    the movie clip so it says 'playing', with a stop button that takes
    you back to frame 1. If you don't click stop, though, when the song
    ends, it stays on this second frame, even though there is nothing
    playing anymore, which is a bit confusing for the viewer.
    So I need to tell flash to check whether the song is finished
    playing, and then if it is, go back to frame 1. I have no idea how
    to do this; have basically done it all using tutorial and samples
    and my limited actionscript knowledge, but I can't find this
    particular code, and don't really have any idea how to write it
    from scratch.
    Many thanks!
    Here's my first frame actionscript:
    stop();
    this.createEmptyMovieClip ("mcSoundHolder",
    this.getNextHighestDepth());
    var mySound:Sound = new Sound (mcSoundHolder);
    btn_Song1.onRelease = function():Void {
    stopAllSounds();
    mySound.loadSound("Soaring1-Burlesque.mp3", true);
    gotoAndPlay("Song1");
    btn_Song2.onRelease = function():Void {
    stopAllSounds();
    mySound.loadSound("Soaring2-PopCyclePotpourri.mp3", true);
    gotoAndPlay("Song2");
    btn_Song3.onRelease = function():Void {
    stopAllSounds();
    mySound.loadSound("Soaring3-PopCycle-SongofLight.mp3",
    true);
    gotoAndPlay("Song3");
    and so on...

    I am not sure how Tomcat handles this, but you need to use two-way (mutual authentication) request but not enforce SSL between Tomcat and the client browser. This will make the browser prompt the user for the cert they want to send. Then you'll need to tackle the other part of your problem, getting the correct content displayed depending on whether the user sent a cert or not. I'm even less help there than I was on the first part of your question.
    So, yeah - good luck with that
    Lee

  • Spinning a wheel, randomly stops and then takes you to another frame.

    I would like to be able to spin a wheel in flash, this wheel has 8 sections to it split up equally, it spins for a random amount of time, 3 - 7 seconds and then stops. the section which lands on the marker is the result and will take you to a specific frame. Also i would like it when it stops to gradually slow down however this is not vital.
    this code works for just rotating a wheel but i want to know how to randomly stop it and how to take it to another frame.
    onClipEvent (enterFrame){
    this.ang=ang+0.01;
    _alpha=190*Math.sin(this.ang)+190;
    _rotation++;
    _xscale=260*Math.sin(this.ang)+1900;
    i do not know a lot of coding, so do not use complicated words and if you could post how to do this it would help alot.
    thanks

    import mx.transitions.Tween;
    var obj:Object = {};
    start_mc.onRelease=spinF;
    function spinF(){
    obj.x = wheel_mc._rotation;
    var myTween:Tween = new Tween(obj, "x", mx.transitions.easing.Strong.easeInOut,0, Math.random()*360*5, 3+Math.floor(Math.random()*5), true);
    myTween.onMotionChanged = function() {
        wheel_mc._rotation = obj.x
    myTween.onMotionFinished=function(){
    yourmovieclip.gotoAndStop("yourframelabelornumber");
    p.s.  please mark helpful/correct answers.

  • How can redirect the errorPage to another frame?

    Please advise, I have been sticking to this problem for a whole day and still can't solve it. :-(
    What I basically want to do is to redirect the errorPage to another frame, say, the main frame.
    My application has 2 frames, the main frame is a search page, the left frame is a tree which is written by JavaScript and it is a hidden frame. The form code of the search page in the main frame is like that:
    <form name="form1" method="post" action="FindAgent.jsp" target="leftFrame">
    when the submit button is clicked, it will invoke the FindAgent.jsp which will update the tree and also has codes to catch any exception if there is. The problem is that when exceptions occur, the errorPage will be shown in the leftFrame which is hidden frame so it doesn't show anything. So how can I make the errorPage displayed in the _TOP window?
    I would not mind to have the errorPage displayed in the mainFrame by changing the target to "_SELF" or doesn't specify the target attribute at all in the search page. But anyother problem arose by doing that is that the search page will go away and try to display the FindAgent.jsp which doesn't have any appearance code after submitting. So how can I keep the current search page still but the submit() has been called actually, i.e. submit the form without redirecting the current search page.
    Any suggestions? Thanks in advance!

    Here's an idea. Have your error page (in the hidden frame), look something like this:
    <%
      String strErrorMessage = ... // get your error message text here
    %>
    <html>
    <head>
      <script language="JavaScript">
        parent.mainframe.location = "ErrorPage.jsp";
      </script>
    </head>
    </html>So the error page loads in the hidden frame, which then extracts the error information from the exception object. Then, using javascript, the hidden frame tells the main frame (using window references) to reload to the desired page. The only issue is how to get the error message text to the new page since your exception object is lost. You can store it as a session variable, and then pass the id of the message in the url to the new page, or you could just pass the text in the url itself.
    I hope that gives you some ideas!
    Michael

  • Menu made in movie clip - with sub-section we can click on to go to another frame

    I would like some help about that:
    I want to do a menu made all in movie clip (NO button). In
    this menu, when we click on one of the part (sub-section) of the
    button (which is a mc), we must go to another frame in the main
    scene.
    It is working for the roll-over and mousedown for my button
    (with the _up, _over and _down labels). But it's not working then
    to put, i don't know, another movie clip inside with alpha 0 to
    make another onRelease and then gotoAndStop(20); ...
    Here is the code I have in the main scene (first frame):
    stop();
    mon_clip_mc.onRelease = function() {
    //this._root.gotoAndStop(20);
    And here is the code I have in the first frame of the movie
    clip of the button:
    stop();
    I'd really appreciate some help! Thanx

    lalapinerouge,
    as far as I can see with your method for buttons, is that it
    only reads 1 button inside mon_clip_mc..
    I cant figure out why, i've tested it over, made new fla's
    with your method, and i still cant get it to work, nor do I
    understand why..
    I need to study abit more.
    Maybe someone in the Forum will have a look at this topic,
    and know what's going on with your method.
    In the mean time, heres a submenu I made for a site a while
    ago. This doesnt use timeline actionscript, ( because i was a
    newbie then ) =)
    if you have a look through the whole FLA, ( it's quite abit)
    you can get an Idea of how i do my movie clip buttons, till this
    day, i still use the same method, only i use mainly timeline
    actionscript..
    the main point to notice is that EVERY button ( even submenu
    ) is it's own movieclip...no button in there holds multiple sub
    buttons inside... This gives you complete control of each button,
    and endless possibilities for animation, tweens, and anything extra
    you would want to add to a button.
    Sorry I couldnt help you figure out your problem fully. Im
    still going to mess around with it abit more to see if i can figure
    it out..
    Hope you can addopt some useful info from this FLA.
    HERE

  • Send Response to another frame

    Hi...
    I am an HTML page contains two frames say A and B .
    Frame A contains some links that display the output in frame B. [Given the target of frame A as B ] .But some times depends on my request , i want to display the page in the paret frame instaed of frame B .
    Is there any way in JSP to redirect to another frame. Plz help....
    Thanx in advance
    ~ Suresh G

    [url http://forum.java.sun.com/thread.jspa?threadID=745944&messageID=4274494] This thread  should help.
    ram.

  • Link a word in a sentence to go to another frame?

    I want to be able to do the following:
    Type out a sentence and then highlight one of the words in the sentence and create a link to go to another frame.
    Is this possible?
    The only other way which is time consuming (Especially with possibly hundreds of sentences) is to create each word as a button and then fit each word as a sentence together.
    surely there is an easier way?
    It will be the basis of an Elearning course for kids to click on a word in a sentence and based on their choice they go to a Correct or Wrong frame.
    Captivate cannot do this unfortunately.

    I'm not sure regarding the whole typing/highlighting end of things if you mean to do that will the file is running.   But in the authoring mode if you use the htmlText property of the textfield you can assign links in the text and use the TextEvent class to listen for clicking of the links and then take action on that.
    aTextField.htmlText = "Here's <a href=\"event: frame10\">One Link</a> and here's <a href=\"event: frame20\">Another</a>";
    aTextField.addEventListener(TextEvent.LINK, linkEvent);
    function linkEvent(evt:TextEvent):void {
         var frameLabel = evt.text;
         gotoAndStop(frameLabel);

  • Moving to another frame as a result of the previous

    Hello again guys,
    Just another question - is it possible to go to another frame as a result of the previous one you came from. So for instance, I have some a picture displayed on frame 1 that I wish to keep referring to. So in frame 2 I create a button that goes back to frame 1, equally I do the same in frames 5 and 6, so there are 3 frames that return to frame 1. I then want frame 1 to return to each of the individual frames based on the one you have just come from. So for instance, I returned from frame 5 to frame 1, I then wish to return from frame 1 to frame 5 by pressing another button. The same button must then return you to frames 2 and 6 respectively based on which frame you just came from (2 back to 2 and 6 back to 6). Is this possible or am I barking up the wrong tree and am I going to have to make multiple frames with the same picture and changing the action script for the button?!
    Cheers,
    Chris

    assign a variable to store the previous frame and use that variable in your frame 1 button:
    //frame 1:
    returnBtn.onRelease=function(){
    if(previousFrame){
    gotoAndStop(previousFrame;
    // your other frames:
    previousFrame=this._currentframe;

Maybe you are looking for