Launching same applet in new browser window

Hi,
I launched applet in netscape browser and it worked fine. Then I opened a new window and pointed same url as first browser, applet main window is launched but because of shared static variables the two applets conflict each other.
we understood that applet from same code base loads in to same name space so the static information is shared between different applet instances.
one solution might be creating our own ClassLoader- browsers SecurityManager dont allow outside application to create ClassLoader unless user sets security policy to allow.(I cant ask user to do that and I cant afford signed applet solution)
basically I am looking for a solution like
1. launching new instance of netscape which dont share its JVM with other netscape windows(I dont know how to make it)
2. triggering netscape to use different class loaders(its own classloader) every time.(How??)
3. heard mayscript html flag helps(I have no idea)
4. any better solution
Your help is very importent so any suggestion or solution is welcome
thanks in advance
rana pratap nama

the most simple idea is to avoid the usage of static variable when the values of theese variables will be private to each applet instance...
much more simple than create a new class loader...
remember: a static variable should be used only when you want the same value shared by all instances of a class... otherwise use the private ones...

Similar Messages

  • Default size of new browser window launched from community links portlet

    Does anyone know of a way to control the size of the new browser window that is launched when the user clicks a link in a Community Links portlet (or any other links that launch a new browser window)?
    We default all users to open links in a new browser window and I can't seem to find any rhyme or reason to how it sizes the resulting window. Some community links come out really skinny and un-user friendly, while others are nicely sized to near full screen.
    Is there some way to control this?
    Thank you.
    Darla

    Darla,
    Which version of the portal are you guys running? We are currently using 6.5 and all the links/Documents/ExternalLinks/Pages open up in a new browser window with the same sizes.
    Its basically controlled by javascript.
    G

  • Open new browser window from an Applet

    I have an applet that needs to initiate a new browser window to open and go to a specified URL. Can anyone help me with this?? Thanks in advance.

    http://developer.java.sun.com/developer/qow/archive/48/index.html

  • Not launching in new browser window?

    I have setup a Flash viewer in a HTML Div container. In the Flash I have put a button which, when clicked, launches a new browser window with another site I've done to appear in.
    When I test this in Flash its working fine and launches the new window as it should.
    But when I go into Dreamweaver where I have placed the Swf. in the Div container, I test it locally in a Firefox browser window. The viewer appears and it works correctly, but when I click the button to launch the new browser window it just opens a window with an error msg 'unable to connect, etc'.
    Any idea why this wont work? Is it because it needs to be live (online)?

    Hi,
    What is the link that you are trying to open.
    Please check if you have placed the protocol - like this http://www.xmy.com" format
    and used "_blank" as target in navigateToURL API.
    Warm Regards
    Deepanjan Das
    http://deepanjandas.wordpress.com/

  • Applet-to-Servlet results in a new browser window

    Hi Everyone,
    I am trying to show a page generated by some servlet in a new browser window when the button is clicked on the applet. I can accomplish that by using AppletContext as in:
    myApplet.getAppletContext().showDocument(servletUrl, "_blank");
    The only problem with this is that I don't have any control over how the new browser window is displayed. Using JavaScript I can set size, hide toolbar and address bar, etc. But how can I hide address bar on a new browser window generated in this scenario?
    I tried to call intermediate servlet from my applet which in turn generates a new window by writing out JavaScript code. This way I lose my previous page with the applet even though a new window is displayed the way I wanted but I want this new browser window to act as a pop-up box and my applet page stay on screen. Also, is there a way to send a POST request from an applet by using AppletContext.showDocument() method?
    Any help will be greatly appreciated!
    Thanks in advance,
    Y.M.

    Hi,
    You can specify an intermediary html which inturn will make the call to servlet.
    myApplet.getAppletContext().showDocument(html,
    "_blank");
    in the HTML onload make a call to servletURL using
    self.open(servletURL, "_self", options);
    in the options you can specify size, toolbar, etc.
    Hope this helps.
    KD
    Hi Everyone,
    I am trying to show a page generated by some servlet
    in a new browser window when the button is clicked on
    the applet. I can accomplish that by using
    AppletContext as in:
    myApplet.getAppletContext().showDocument(servletUrl,
    "_blank");
    The only problem with this is that I don't have any
    control over how the new browser window is displayed.
    Using JavaScript I can set size, hide toolbar and
    address bar, etc. But how can I hide address bar on a
    new browser window generated in this scenario?
    I tried to call intermediate servlet from my applet
    which in turn generates a new window by writing out
    JavaScript code. This way I lose my previous page with
    the applet even though a new window is displayed the
    way I wanted but I want this new browser window to act
    as a pop-up box and my applet page stay on screen.
    Also, is there a way to send a POST request from an
    applet by using AppletContext.showDocument() method?
    Any help will be greatly appreciated!
    Thanks in advance,
    Y.M.

  • Launch new browser window

    I have a PDF (created with InDesign) with URL links. Once opened in the browser, I cannot find a way to get the links inside the PDF to open a new browser window.
    I looked in FAQ and thought I found an answer, but it's not working for me http://www.adobeforums.com/webx/.3bbad470
    I'm using Windows XP, IE6, and Acrobat 8 Pro.
    Any ideas?
    Thank you,
    Jodi

    So if you are using AS2, then you should create the button you intend to use, place it on the stage, and with the button selected, enter an instance name for it in the Properties panel.  That instance name will allow you to interact with the button using code.  Then, in the timeline where the button is, in a separate actions layer, you could code it as follows (let's assume you gave it an instance name of "btn"):
    btn.onRelease = function(){
         getURL("myGallery.swf", "_blank");
    That should get your swf file opening in a new broswer window.  Just a note... when you open an swf file in a browser, it will size itself to fill the browser per whichever dimension hits the window frame first.  So if you want to control the size it displays at, you should use an html page to display it.

  • Open discoverer report in new browser window and without connections page

    Hi All,
    We are using Oracle 11g Discoverer 11.1.1.4.  Requirement is to open the discoverer report in a new browser window and without connections page.
    When we are running discoverer reports with this parameters we unwantedly get the connections page of the discoverer plus which we don't want.
    Went through the documentation given in this page and followed it still the issue persists, and i see couple of threads with my issue and no updates.
    This excerpt is from the documentation available in the link
    " _plus_popup=true and framedisplaystyle=embedded launches Discoverer Plus in a new pop-up browser window that contains the Plus applet embedded in it "
    http://www.art2dec.com/documentation/docs/oas10g1012/linux/bi.1012/b13918/urlstart.htm
    and Here is what we use to invoke our reports.
    http://ipaddress:port/discoverer/plus?cn=cf_123&_plus_popup=TRUE&framedisplaystyle=EMBEDDED&wb=disc_wb_1
    Request the forum users from PRO discoverer group to help me out of this issue and expect a good discussion on this.
    Thanks in advance

    Closing the thread
    We were able to achieve by changing the browser settings in the IE 8 Browser. Disabled Tabbed browsing.

  • Conditionally opening a new browser window from a JSP page

    When the user clicks on a button in my JSP page, I'd like to launch a new browser and display certain things in that browser window while leaving the original browser window open. The new browser should only be displayed if certain conditions are met.
    My thought was to invoke a javascript method in 'onLoad' which would determine if the new window needs to be launched.
    This is kinda what my page looks like:
    <jsp:root version="1.2" ................>
        <jsp:directive.page import="java.util.*, com.test.Configuration" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
         <ui:body binding="#{Page1.body1}" id="body1" onLoad="launchWindow();">     
         </ui:body>
       </f:view>
       <script type="text/javascript">
            function launchWindow(){
             if (Configuration.openWindow()) {
              window.open("hello.jsp", "newWindow", 'toolbar,width=400,height=400');            
        </script>     
    </jsp:root>
    My problem is that the call to "Configuration.openWindow()" does not resolve correctly. If I remove that call and simply make a call to "window.open()" all works. But once I put the condition in, nothing happens. I do not see an exception in my browser window but a new browser window does not open.
    Is my syntax correct. Can I make a call to the static method 'openWindow()' in my class 'Configuration.java'.
    I posted this same query on the JSF forum but received now replies. My question is more suited to the JSP forum and hence I'm posting this question here.
    thanks,
    tsc

    I have made some changes so that I do not directly access the 'Configuration' class in my javascript.
    I have a hidden field on my form and when the user clicks the button, in my back bean, I set a value for the hidden field. In the javascript function 'launchWindow()' I check if a value has been set for the hidden field and if yes, I open a new window.
    <ui:body binding="#{Page1.body1}" id="body1" onLoad="launchWindow(document.forms[0]);">
    <h:inputText id="hiddenField" value="#{formBean.hiddenValue}" />
    <script type="text/javascript">
            function launchWindow(form){
                alert("in lw");
                var test = form["form1:hiddenField"].value;
                alert("got test");
                if (test !=  "")
                    window.open("hello.jsp", "newWindow", 'toolbar,width=400,height=400');            
                alert ("done test");
    </script>When my page is first loaded, the launchWindow() is called and all the alerts popup as expected.
    When I click on the button (the back bean sets the value on the hidden field), my page is reloaded but this time its blank.
    Any ideas as to why this maybe the case?
    thanks,
    tsc

  • Want to open a new browser window and display the html file in locale disk.

    Hi,
    I want to open a new browser window and display the html file in local drive. The below html applet work in local system successfully. But i deploy the same in web server (Tomcat) and try the same in client machine it does not work. Please help.
    Note:
    The class below fileopen.FileOpen.class i make it as a jar and put it in jre\ext folder at the client machine.
    ------------------------------------FileOpen.html(Tomcat)-----------------------------------------------------
    <html>
    <body >
    <applet code="OpenFile.class" archive="loadfile.jar" width="100" height="100">
    <param name="path" value="file://c:/open.html" />
    </applet>
    </body>
    </html>
    -------------OpenFile.java in server(Tomcat)--------------------------------------------
    public class OpenFile extends Applet implements ActionListener{
    String path = "";
    fileopen.FileOpen open = null;
    Button b = null;
    public void init(){
    path = getParameter("path");
    b = new Button("Open");
    b.addActionListener(this);
    add(b);
    public void actionPerformed(ActionEvent ae){
    try
    open = new fileopen.FileOpen(this,path);
    catch (Exception e){
    e.printStackTrace();
    -------------------------------------------FileOpen.java /Client JRE/ext----------------------------------------------------
    package fileopen;
    public class FileOpen
    AppletContext context = null;
    URL url = null;
    public FileOpen(Applet applet,String path)
    try
    if(null != applet){
    context = applet.getAppletContext();
    if (null != path)
    url = new URL(path);
    context.showDocument(url, "_blank");
    }catch(Exception ex)
    ex.printStackTrace();
    Please help to solve this issue very urgent.
    Thanks in advance.
    By,
    Saravanan.K.

    zzsara wrote:
    I want to open a new browser window and display the html file in local drive. ...Did you ever pause to consider how ridiculous that is?
    The best audience for applets is people off the internet. 'People off the internet' might be using a computer that has no (what was it?) 'open.html' in the root of the C: drive. In fact (shock horror) they may not even be running Windows, and would therefore probably have no 'C:' drive at all.
    If you do not intend to distribute this to people off the web, an application makes a lot more sense, but even then, you cannot rely on the document being there unless you 'put it there' (during installation, for instance).
    As the other poster intimated, applets can load documents off the local disk as long as they are trusted. Here is an example*, but note that it is not so rash as to presume any particular path or file, and instead leaves it to the user to choose the document to display.
    * The short code can be seen at SDNShare on the [Defensive Loading of Trusted Applets|http://sdnshare.sun.com/view.jsp?id=2315] post.
    On the other hand, a sandboxed applet can load any document coming from its own server via URL, or get showDocument(URL) to work. In that case, the JRE must recognize that the URL is from its own server, so the best way to form URLs for applet use is via the URL constructor
    new URL(getDocumentBase(), "path/to/open.html");That is how I form the URL in this [ sandboxed example of formatting source|http://pscode.org/fmt/sbx.html?url=/jh%2FHelpSetter.java&col=2&fnt=2&tab=2&ln=0]. Of course, in this case the applet loads the document, then parses the text to draw the formatted version, but the point is that an URL produced this way will work with showDocument(URL).
    I am pretty sure showDocument() in an applet off the internet will work with an URL pointing to a foreign (not its own) server, but it will not be able to load documents off the end user's local disks.
    I suggest a couple of things.
    - Try to express this problem in terms of what feature it is that you want to offer the end user. Your question jumps directly to a bad strategy for achieving ..who knows what? An example of a feature is "Shows the applet 'help' files on pressing F1".
    - A good way to indicate interest in a solution is to offer [Duke stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview] to match that interest.
    Edit 1:
    ..and please figure out how to use the CODE tags.
    Edited by: AndrewThompson64 on Sep 12, 2008 11:14 PM

  • How to open new browser window on click of command button

    Hi,
    We have a requirement to open an image in new window when a command button is clicked. Is there any sample explaining how to do that?
    Thanks in Advance,
    Pradeep

    Hi,
    I have to load an applet viewer in the new browser window. I have URL to the PDF.
    I ma able to load the applet viewer in new browser window using javascript. But I have to load the new PDF if the same window in already opened.
    The issue here is , i am loosing the window handle if the parent page is refreshed. I want to store the window handle in session scope variable and use the same.
    How do i update the session scope variable using javascript?
    Thanks and Regards,
    Pradeep

  • "Go to URL" not opening in a new browser window

    We are using FrameMaker 10 and RoboHelp 9 in a Windows 7 environment.
    When we create hypertext links, we use the "Go to URL" command.  According to the FrameMaker 10 online help, this is what the command is supposed to do: "Launches browser and displays the specified Web page."
    Then we publish the content to RoboHelp's WebHelp.
    When we see the hypertext link in the WebHelp/HTML output, it looks like this: http://www.adobe.com
    When we click it, the Web page appears inside the content frame of the WebHelp.  It does not open a new browser window.
    We can manually go into the html file and look at the hypertext link.  It looks like this in the WebHelp output:
    <span class="FM_Link"><a href="http://www.adobe.com">www.adobe.com</span>
    In order to manually change the link so that it opens the Web page in a new browser window, we can edit the link as follows:
    <span class="FM_Link"><a href="http://www.adobe.com" target="_blank">www.adobe.com</span>
    After we manually edit the HTML file, save it, launch the WebHelp, and click the hypertext link...it now opens the Web page in a new browser window.
    Is there a way to create the hypertext link in FrameMaker so that the WebHelp output will open the Web page in a new browser window?
    Thank you in advance!
    Tim

    Please see the previous posts in this thread to review how you create hyperlinks in FrameMaker that open the Web page in a new browser window.
    The problem is this: If you publish the exact same file to PDF, the hyperlinks will not work.
    The properties (syntax) of the hyperlinks in PDF output need to look like this: http://www.adobe.com
    The hyperlink syntax in WebHelp (in FrameMaker) needs to look like this: http://www.adobe.com" target="_blank
    (...so when they are published to Webhelp, they look like this: "http://www.adobe.com" target="_blank")
    Other than going into either the HTML or the PDF output and manually changing each hyperlink URL syntax for the specific output, is there a syntax that opens a new browser window in both PDF and HTML with one single "Go to URL" command?
    Thanks in advance for your help.
    Tim

  • Using web.show_document the first time makes new browser window lose focus

    Hi,
    In our application we use show_document(url, '_blank') to open our reports (as pdf) in a new window.
    Our environment is Application Server 10g Release 2 with Forms 10g Release 2 and jinitiator 1.3.1.22.
    The first time I call a report, the new browser window containing the pdf is shown but loses focus after about 1 second. The focus is then returned to the applet window. When calling a report again it always keeps the focus.
    After closing the applet window and restarting the application, the same thing happens: first report called loses focus, all others keep the focus.
    Does anyone have any idea why this is happening? We want the focus to stay on the new browser window every time...

    Hi Jeroen,
    I m also facing a problem something similar to yours. If you got any solution please let me know.
    Problem-
    Currently my application is running on Forms 9.0.4.2 and my form calls another third party which displays the image in image viewer in new browser. When user clicks on the button to display image, then I m using the following Code -
    -- Method: displayDocuments ([Ljava/lang/String;)Ljava/lang/String;
    FUNCTION displayDocuments(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JARRAY) RETURN VARCHAR2 IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'com/hli/imaging/adapter/LK_FormsImagingAdapter', 'displayDocuments', '([Ljava/lang/String;)Ljava/lang/String;', args);
    END;
    Image is displaying fine but the focus is staying on the newly opened browser. I want it to get back the focus to the forms window.Is this possible ???
    Thanks in advance
    Sai                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • New browser window from single movie frame?

    Sorry but I am a total newbie>
    I have a 4 frame movie imported into one layer and want to
    specify a different URL to be opened in a separate window for each
    frame. So I have made each frame a keyframe and added from the
    behaviors a geturl event for each frame. When this is published it
    loops the movie and opens a new browser window for every frame for
    every loop, resulting in dozens of browser windows. How can I make
    this a mouse clickable event so only when I click on a frame will
    the new browser window launch?
    I am trying to use onrelease, but I am not sure how this
    should work as I can't find a good example.

    1) you can't 'click on a frame' in the SWF file when it's
    running, you must click on a 'button' or 'movieclip' instance the
    you construct ON a particular frame, or all in the same frame with
    different buttons on theStage.
    2) you need to add a 'stop()' action to your actions layer to
    stop the SWF from 'playing' which is why it continues to open more
    windows, MovieClip timelines play and loop by default.
    3) more information that you will ever need is located in the
    Flash Help files(F1) along with many tutorials to learn the basic
    concepts, open them and go to 'Getting Started in Flash' to learn
    some basics.

  • Call form in new browser window

    Hello all,
    I am trying to call a form that will appear in a new browser window, but be part of the same forms application. I am able to call the applet by using web.show_document, however you must log on to the forms services before you can access the form. I would simply like to click a button and have it call a form that opens in a new window. I am doing this for our data entry techs that need to utilize dual monitors looking at 2 separate tables.
    Thanks in advance,
    -Jordan

    Be aware that there are limitations with Forms if you are trying to run the application on the secondary monitor. Known issues related to dual monitors have been corrected in the upcoming patch set for 10.1.2. This patch is due for release soon (exact date unknown). A one-off patch is also available for 9.0.4.3.
    Take a look at this thread for more details:
    Users with two monitors

  • Open PDF link in new browser window?

    I'm viewing a newly created PDF in a browser.
    When clicking an internal link, the linked PDF loads into the same window
    I need it to launch in a new browser window.
    I have set the link to "launch new window" in Word where this file originated.
    I have also opened and resaved it in Acrobat 10 with preference "Open cross-document links in same window" deselected.
    Neither of these setting have change the behavior though all documentation I read seems to suggest they should.
    What am I missing here??
    -Blake

    That preference setting does not apply to web links and do not refer to a browser window, but an Acrobat window.
    There is a JavaScript method that might work. Try setting the link action to something like the following script:
    app.launchURL("http://www.example.com/", true);
    This was taken from the example here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.150.html
    The problem is if a user has Reader 10 and protected mode is enabled (as it is by default), it doesn't work and opens the link in the same browser window.

Maybe you are looking for

  • Problems on Workflow Deployment Wizard

    Dear all, After I fill in all the information in Workflow Deployment Wizard and press Finish Button. It displays the following Error messages: WKF0014:Cannot deploy to Workflow. The deployment failed with Workflow exception 6550 - ORA-06550: line 1,

  • SOftware for compressing, decompressing, encrypting and dencrypting files

    Hi, I'm new to the Mac world. I'm struggling to find a software that can open my .rar or .zip password-protected files (created in PCs) and that can create other password-protected either zip or rar files to be used in the mac or pc. I know all about

  • Portal configuration

    Hi, I am new to portal and just now installed my portal .As i move to UserAdministration>UserMapping it gives a portal runtime error .can anyone help me regarding this.thanks in advance the log files says: com.sapportals.portal.prt.component.PortalCo

  • HT4582 How can I get credits on my iPad without removing my mini sim?

    I have an iPad but to get credit I have to take the mini sim out and put it into my cell and get credits then put it back into the iPad. What is the easy way to do it?

  • Imac to macbook pro itunes help

    I have and imac that i have my itunes on. i got a macbook pro and noy i cannot get my new music on my phone to go on my macbook pro itunes, it will only go on the imac. does anyone know how i can fix this?