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)
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.
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)
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