Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: how to open a jsp in a new jsp

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to open a jsp in a new jsp

    Hi Frnds,

    JSP "A" submits a form and the servlet calls appropriate class. The class pulls some data and the serlvet then forwards to JSP "B" populates the data.

    But JSP "B" should open in a new window. (JSP "A" should be retained in old window)


  2. #2
    Member DanBrown's Avatar
    Join Date
    Jan 2011
    Posts
    134
    My Mood
    Confused
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Default Re: how to open a jsp in a new jsp

    JSP "A" submits a form and the servlet calls appropriate class. The class pulls some data and the serlvet then forwards to JSP "B" populates the data.

    But JSP "B" should open in a new window. (JSP "A" should be retained in old window)

    Servlet code runs on the server and the HTML it generates is displayed in the client's browser and that HTTP requests return a response.

    When button presses in a Form , the browser sends an HTTP request to the server and the response from that request will be displayed in the browser where the page with the button was.

    You want to also have a new page displayed in a new window.

    A Javascript solution is needed. JS can create new windows and fill them with HTML.

    So back on the server, your servlet needs to write an HTML page that will replace the page with the button and also contain a JS script to create the new browser window with the results.

    ref: open a popup window using a servlet... [Archive] - CodeGuru Forums
    Thanks and Regards
    Dan Brown

    Common Java Mistakes

Similar Threads

  1. Open Text file
    By java_kiddy in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: October 5th, 2010, 02:52 AM
  2. Using JFileChooser to open and display an image
    By JavaN0ob in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 31st, 2010, 06:01 PM
  3. How to press button to open another window
    By vkokaram in forum AWT / Java Swing
    Replies: 1
    Last Post: July 18th, 2010, 03:51 PM
  4. Java program to open jsp page on client side instead of server side
    By khanshakil in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: July 8th, 2009, 06:26 AM
  5. Java program to open and close computer CD/DVD drive
    By JavaPF in forum Java Programming Tutorials
    Replies: 0
    Last Post: January 28th, 2009, 11:04 AM