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.

Similar Messages

  • How can I pass the value to another frame?

    Hi all,
    The following is part of my coding of a frame. Once i click on the jButton2, the selected value will be stored into a variable named NAME and the value will be displayed by a label in same frame. At the same time, a new frame named TESTING3 will be set to visible.
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
    // TODO add your handling code here:
        String name = (String)jList1.getSelectedValue();
        jLabel1.setText(name);       //display the value in a label in same frame
        new testing3().setVisible(true);     //a new frame set to visible
    }      Question: How can I pass the value to TESTING3 frame and display it on that frame?
    Thanks,
    ning.

    just make an archive that save that variable and them get them from de clase were you save it
    public class sav {
    String n;
    public sav {
    n="";
    public void addn(String x){
    n=x;
    public String shown(){
    return n;
    and them save it from the frame
    sav sun = new sav();
    sav.addn(f);
    them call it from the other frame
    sav sin = new sav();
    String s = sin.shown();
    label.setText(s);
    and i think thats you want to do if its not please explain me better
    bye

  • How to make a link open in another frame in RH 7?

    Hello! In RoboHelp 7 I am doing a prototype for my work group using framesets. We want a navigation pane on the left side of every topic. I have learned how to create framesets and set the left and right frames to different topics. I cannot find information anywhere on how to do one thing. One, how do I set the links in the left navigation frame to open in the right (main) frame? Sounds like a simple thing, but I can't figure out how. Also, is it true that a person cannot see the code to the frameset? I can't find a way to do that, either. Thanks for anyone's help!

    Hi there
    When you created your Frameset you likely gave each frame a name. This part is very important and I'm not sure RoboHelp would even allow you to create the Frameset without naming each frame.
    So when you create your links, you target the Frame by clicking the drop-down and choosing the frame name.
    Click image below for possible larger view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • 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

  • 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 call JSP that outputs XML without HTTP request

    It should be a simple solution but I can't seem to find a concise recommendation anywhere. We are building a B2B subsytem for our app and we need to send XML to our vendor. I'm evaluating the possibility of using JSPs for that and everything looks good until the time you actually want to invoke it. It's obvious how to code the JSP itself, but I'm looking for an efficient way to call it to generate XML. We do not have an HTTP request or a servlet, the communication is on the EJB level. So I can't get a RequestDispatcher for example, and we don�t have HttpServletRequest/HttpServletResponse either. It is NOT a servlet or JSP calling another JSP, it's a regular Java class or EJB.
    Ideally, I would rather bypass the whole HTTP infrastructure and just use JSP as a formatter. So it boils to a question of how to invoke it and how to pass the parameters without HTTP session or request. One of the alternatives we are reviewing is using XSP but we would prefer JSPs if we can figure out how to call it efficiently. HttpUrlConnection is not a good option, we'd like a direct call.
    Any suggestions will be greatly appreciated.

    Thanks for the response. Let me clarify the requirements for the question. The way we are supposed to send XML to the vendor is via CORBA (don't ask me why:-) where the only parameter essentially is a string containing the XML document. So the quesiton is not how to send it to the vendor, but how to format our JavaBeans into XML.
    We can't use JAXB because it doesn't support schema. We tried a few libraries out there but they stumble on our schema and we can't change it because it comes from the vendor. So it sounds like our only choice for today is to generate XML ourselves.
    The data is stored in JavaBean packet objects and that's our input. Our output should be a string with XML document conforming to the schema. Posting a request to ourselves will of course work, but that's too much unnecessary overhead. Another option is implementing HttpServletRequest and HttpServletResponse and calling service method directly. Better suggestions?

  • Passing the output to another program

    Passing the output to another program
    The problem I have that I don�t know how to pass the results of my java Program ( as parameter) to another application!
    I have a class �A.class� should send result �VAR_result� to application �B.application�
    Now I am using it like this: System.out (VAR_result) >> B.application
    But it could not be the right way at least because I cant make any other System.out as debug now.
    My Question please: to pass a parameter to a java is clear: A.class ( var ..)
    But how to take a parameter from a class, to use it in another Applicatin ( script )?
    Thanks a lot

    slackware2007 wrote:
    Passing the output to another program
    The problem I have that I don’t know how to pass the results of my java Program ( as parameter) to another application!
    I have a class “A.class” should send result “VAR_result” to application “B.application”
    Now I am using it like this: System.out (VAR_result) >> B.application
    But it could not be the right way at least because I cant make any other System.out as debug now.Then move your debug to System.err and use System.out as it should be used and pipe stdout to the stdin of the other application..

  • How to call a exec prog in another prog

    how to call a exec prog in another prog.

    Hi,
    SUBMIT
    Basic forms:
    1. SUBMIT rep.
    2. SUBMIT (name).
    Additions:
    1. ... LINE-SIZE col
    2. ... LINE-COUNT line
    3. ... TO SAP-SPOOL List output to the SAP spool database
    4. ... USING SELECTION-SCREEN scr
    5. ... VIA SELECTION-SCREEN
    6. ... AND RETURN
    7. ... EXPORTING LIST TO MEMORY
    8. ... USER user VIA JOB job NUMBER n
    9. ...Various additions for passing parameters to rep
    10. ... USING SELECTION-SETS OF PROGRAM prog
    Effect
    Calls report rep.
    Regards,
    Andrej.

  • Capture standard output of another command-line program, with characters not in current codepage

    I'm using ProcessStartInfo.RedirectStandardOutput and Process.BeginOutputReadLine to capture the standard output of another program (specifically,
    youtube-dl.exe) and save them into a string variable.
    However the result variable contains only usual characters of my language such as traditional Chinese and English letters; characters such as Korean or Latin letters with accents simply vanished.
    I File.WriteAllText-ed the result variable and checked the file using serveral text editors, so I'm sure they're lost, not that they exist and merely be un-display-able by console window.
    Plainly executing youtube-dl in Windows Command Prompt displays complete messages including these foreign characters.  
    My youtubeDL_process.OutputDataReceived is simply:
    (s, e) => { if(!string.IsNullOrWhiteSpace(e.Data)) this._filename = e.Data; }
    How to make the redirected standard output string with foreign characters complete, just like one directly generated in a command prompt?

    Try a different experiment of starting your second EXE:
    string exe =
    @"path to your EXE with arguments . . .";
    Process p =
    new
    Process
    StartInfo =
    UseShellExecute = false,
    RedirectStandardOutput = true,
    StandardOutputEncoding = Encoding.UTF8,
    FileName = "cmd.exe",
    Arguments = "/C chcp 65001 > null && " + exe
    p.Start();
    string output = p.StandardOutput.ReadToEnd();
    p.WaitForExit();
    Specify the full path in the exe variable, using quotation marks if it contains spaces.
    Then check the value of output.

  • In Pages how do I save a file with another name

    In Pages how do I save a file with another name?

    I don't know if there is a less cumbersome way to do this (I'm still pretty new to Lion) but This is what I do - since "Save As" seems to be gone with Lion.
    I create a duplicate document - then click the red button to close the document - and a dialog box pops up and asks if you want to save the changes - I change the name in there and then save the file under the new name.
    You can also save the copy to the desktop - get info - and then change the name if the finder window.
    I copied this from the Pages help area. These help instructions were created pre-Lion I'm sure.
    Saving a Copy of a Document
    If you want to make a copy of your document—to create a backup copy or multiple versions, for example—you can save the document using a different name or location. (You can also automate saving a backup version, as Automatically Saving a Backup Version of a Document describes.)
    To save a copy of a document: 
    Choose File > Save As and specify a name and location.
    The document with the new name remains open. To work with the previous version, choose File > Open Recent and choose the previous version from the submenu.

  • How to keep the filtered output in a page after user navigates back?

    How to keep the filtered output in a page after user navigates back to all records from another page.
    Currently it clears the search

    Hi,
    user13091824 wrote:
    How to keep the filtered output in a page after user navigates back to all records from another page.
    Currently it clears the search---While returing from page AM Return status should be True in pageContext.setForwardURL.:::
    pageContext.setForwardURL("OA.jsp?page=/XXX/oracle/apps/po/msg/webui/SearchPG",
    "SUPP_SEARCH",
    OAWebBeanConstants.GUESS_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    ---After setting AM Status to true u can able to c the values.
    Regards
    Meher Irk

  • How to display  servlet dynamically generated image ?

    Hi,
    How to display servlet dynamically generated image ?
    I have a servlet generating a buffered image in the doGet. I want to display the image in a jsp page with other information. I'm not able to get it properly displayed.
    **Try n# 1 **************************************************************
    This displays my image but nothing elle :
    ServletOutputStream sos = pResponse.getOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
    encoder.encode(img);
    **Try n# 2 ****************************************************************
    I tried also :
    In the servlet :
         request.setAttribute("renderedImage", img);
    and in the jsp page :
         BufferedImage image = (BufferedImage) request.getAttribute("renderedImage");
         <img src="<%=ImageIO.write(image,"jpeg",response.getOutputStream())%>" width="300" height="280"/>
    This last try draws big crap in the jsp page, thank you in advance.
    Nelson

    Call another servlet from the IMG tag. Have the servlet stream out the image using ImageIO (instead of writing HTML).

  • Linux server(how to save command out put to another file. )

    hi all,
    i have Q ?
    how to save command out put to another file.
    Ex: #ps -ef
    that particular cmd output i need to save another file.
    is it possible ...if possible ..please let me know
    And how to save command history in Linux.

    df -h >> /oracle/output.log
    /oracle -- mount point name
    Regards
    Asif Kabir

  • How to run a java program in another folder

    Hello!
    I want to run for example the java class file in the path ./sourcecode/javafile.class. It works fine if I do the following:
    cd sourcecode
    java javafile
    but it cannot work if I do:
    java sourcecode/java
    The error it outputs is NoClassDefFoundError.
    Can someone tell me how to run a java program in another folder
    thanks a lot.

    You need to specify the classpath using the -cp flag when running. so instead of
    "java sourcecode/javafile"
    Try
    "java -cp sourcecode javafile"

  • Adding numbers in a file a and saving the output in another file.!

    can any one pls tell me how to add numbers from a textfile and save the output in another textfile. i'm new with java so pls help out..

    Hi Friend,
    your statement is not clear, it's bit confuse
    this is my unserstanding,
    you want to open a file and read the values then add numbers,
    latter save the sum in a new file.let me know if this is the thing, I can help u
    with Cheers
    Prasanna

Maybe you are looking for

  • How do you edit the duration of multiple still images?

    FCP X has a default duration for still images when you import them. After importing, how can I edit the duration of multiple clips? I've tried selecting them all, control-click and change duration, but nothing changes. BTW I want to make them 5 frame

  • Maximum partition size for external hard drives with G4 MDD?

    I have a Maxtor 300GB external hard drive. When I initially formatted it, I did so with 4 partitions because I knew there was a limit that G4s recognized with internal hard drives. Is that the case with externals as well or can I reformat it to be on

  • Contacts are not syncing to MobileMe, iPod or laptop

    Tried syncing after the MobileMe switch, and my calendars and bookmarks updated fine, but my contacts did not. I could not get new and modified contacts from my MacPro to my MacBook or my iPod Touch, even after trying numerous times. I tried resettin

  • Is it possible to block websites on Firefox (i.e. Facebook)

    I can't figure out how or if I can temporarily block websites.

  • PSE 8 Will Not Open

    I recently upgraded from PSE 6 to PSE 8 (I have Windows 7).  I have been using it less than a month.  The first problem started when I would get an error when using the Organizer to upload photos to Shutterfly.  The error said the Organizer stopped w