jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Launching Browser from servlet. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Launching Browser from servlet." Watch "Launching Browser from servlet." New topic

Launching Browser from servlet.

Jane Arndt

Joined: Nov 09, 2001
Posts: 1
I have a program on my local drive that 'bridges' and starts a servlet running. The servlet is to map some data,
and then launch the browser & jsp to display pages with data
captured from the program that was on the local drive.
at the end of my doPost method in my servlet, I've tried:
RequestDispatcher rd = getServletContext().getRequestDispatcher("myjspname.jsp");
But this has not worked. I know I'm missing something here.
Thanks in advance.
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
Server-side code (servlets) can't start a browser. The browser must be running already...
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Can you convert your bridging program into an HTML page with nothing on it but one submit button that says "Start Process".

That way you could launch it from the browser, and the response would show up in the browser window.

[This message has been edited by Mike Curwen (edited November 10, 2001).]
I agree. Here's the link: http://aspose.com/file-tools
subject: Launching Browser from servlet.
It's not a secret anymore!