File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes opening 2 JSP in the same browser (from an applet ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "opening 2 JSP in the same browser (from an applet )" Watch "opening 2 JSP in the same browser (from an applet )" New topic
Author

opening 2 JSP in the same browser (from an applet )

Wally Schnok
Greenhorn

Joined: May 31, 2001
Posts: 29
I've an applet and I need to open 2 jsp's in the same page (the same browser ) ( it should be a .html page with two frames,I think ).
How can I do it ?
Here's the code to open one page from an applet :
Thank you.

import java.net.*;
...
URL u = new URL("http://my_server/page1.jsp");
AppletContext ac = getAppletContext();
ac.showDocument(u,"_blank");
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
If the frames are in the same page as the applet, all you have to do is use the name of each frame in the showDocument call instead of _blank.
If you want a new window, why not have a plain HTML page that defines the frameset using the JSP pages.
Bill
Wally Schnok
Greenhorn

Joined: May 31, 2001
Posts: 29
"_blank" it opens a new browser and that's what I want .
Can you give me some example ?
Thanx.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
If you mean an example of a frameset made of two jsp pages - something like this:
<frameset rows="40%,60%" >
<framd src="http://someserver/somepath/page1.jsp" >
<frame src="http://someserver/somepath/page2.jsp" >
</frameset>
You need a good HTML reference to get the details.
I like "The Hip Pocket Guide to HTML 4" IDG books
Bill
 
Don't get me started about those stupid light bulbs.
 
subject: opening 2 JSP in the same browser (from an applet )
 
Similar Threads
Hit Counter
Opening Browser Window
Applet in a browser
Classloader and static variables
Calling a JSP using Swing