Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Servlet forwarding in new window

Posted on 2006-10-27
5
Medium Priority
?
494 Views
Last Modified: 2013-11-24
Hi,
I want that my sevrelt opens a *new* window and forward it to urlChat2
Like this line but this forward to urlChat2 in the *current* window :
getServletContext().getRequestDispatcher(urlChat2).forward(request,response);

And the current window must be forwarded to urlIndex


How can I do this ?

Thank u.
0
Comment
Question by:matthew016
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 10

Accepted Solution

by:
mbvvsatish earned 1000 total points
ID: 17818942
servlet can not open a new browser window, since it is a server side program.
you need to do this in the client side itself, by using javascript openwindow.
and use location.replace method to call the servlet from javascript
0
 
LVL 6

Expert Comment

by:valipotor
ID: 17818950
use response sendRedirect()
0
 
LVL 9

Author Comment

by:matthew016
ID: 17818982
Thank u for this.
However, I don't understand what u say of javascript since i don't know very well this language.
I already tried this in javascript, but I have a problem,
I'll post my problem in the javascript forum in some minutes.
I hope u can help me there !  thanks !
0
 
LVL 9

Author Comment

by:matthew016
ID: 17818985
Ah ? so it is possible ?
0
 
LVL 92

Assisted Solution

by:objects
objects earned 1000 total points
ID: 17824231
specify the target in the link to the servlet

eg.

<a href="MyServlet" target="_new">Click here</a>
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question