File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes URGENT-->New Window from Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "URGENT-->New Window from Servlet" Watch "URGENT-->New Window from Servlet" New topic

URGENT-->New Window from Servlet

Mayank Chaturvedi

Joined: Oct 01, 2001
Posts: 4
I am calling a servlet from the Login Page . It does some check . If the check fails , I want a new window to open displaying the Error else if the check passes , the next page is loaded in the same window as the Login . In this case , no new window has to be opened .
Can someone tell me how we can open a new window from a servlet ?
anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91
Well its simple
use javascript this way
<% }
Mayank Chaturvedi

Joined: Oct 01, 2001
Posts: 4
Thanks for ur reply.
But , my problem is that I want to open the new window from the servlet code itself . So , I cannot use javascript there . So is there any code in Java from which I can open a new window ?
Mahajan Bhupendra
Ranch Hand

Joined: Dec 01, 2000
Posts: 118
i couldn't undrestand ur problem..
can't u use like this..

<B>Bhupendra Mahajan</B>
I agree. Here's the link:
subject: URGENT-->New Window from Servlet
It's not a secret anymore!