Generated JNLP and closing the original browser window

Hi All, This is my first post so bear with me. Here is my problem.
I am using Web Start for an application.
I need to check to see if web start is installed or not.
If it is NOT I need to auto-install
if it is I need to call a servlet that dynamically generates the jnlp with the user that I passed in as <arguments/> maybe other arguments in the future also
I need to shut the original browser window
I will use this servlet in multiple web apps
I have it working like this but I don't think it is clean enough
I call a servlet with the syntax checkJREServlet?USER=username
this servlet writes out:
<html>
<body>
<h1>Installing Java Runtime</h1>
<OBJECT
CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="0" height="0"
codebase="http://<myservler>/<plugins folder>/j2re-1_4_2-windows-i586.exe#Version=1,4,2,0">
<PARAM NAME="code" VALUE="redirectAndClose.class"> //my applet class
<PARAM NAME="archive" VALUE="RedirectUtil.jar"> //the jar where my applet class is stored
<PARAM NAME="archive_cache" VALUE="RedirectUtil.jar">
<PARAM NAME="type" VALUE="application/x-java-applet">
<PARAM NAME="where_to_next" VALUE="http://<myservler>/<mywebapp>/openAppServlet?USER=username">
You did not install Java.
<p>Please use the <b>Back</b> button to return to the previous page.
</OBJECT>
</body>
</html>
I have redirectAndClose which is:
import java.applet.Applet;
import java.net.URL;
import java.net.MalformedURLException;
import netscape.javascript.*;
public class redirectAndClose
extends Applet
java.util.Timer timer = null;
int seconds = 5;
public void start()
try
getAppletContext().showDocument(
new URL(getCodeBase(), getParameter("where_to_next")), "_blank");
//now we have to close ourselves in 5 seconds
timer = new java.util.Timer();
timer.schedule(new java.util.TimerTask()
public void run()
timer.cancel(); //Terminate the timer thread
destroy();
, seconds * 1000);
catch(MalformedURLException e)
throw new RuntimeException(e);
public void destroy()
super.destroy();
//close this window because we don't need it
JSObject win = (JSObject)JSObject.getWindow(this);
win.eval("window.opener=self;self.close();");
If try to close without a timer my entier session gets killed, including my webstart app that the openAppServlet wrote out the jnlp for
I hate this because it is not definite. I want to DEFINITELY know when my webstart app is open and I can close this original window. Like a whenWindowExists then close me but I have no clue how to do this.
The "where_to_next" location is a servlet that will dynamically build a jnlp file specific for each web app building it from parameters in web.xml for each individual web app. Basically I will have to store the actual name of the class, the jar href's I will be needing, title, vendor, description, basically everything that can be different.
So what I need is some kind of library so I can include it in multiple web apps EASILY. I don't want to have to write a document on how to include this thing. It should be self explainatory. I originally just mapped to the first servlet in my web.xml and then included the jar file but it appears to be non-existent in my project. Maybe some suggestions on what others would do may help me.
Thanx in advance

I don't want to use a timer because who knows if the servlet that writes out the dynamic jnlp will get hung up for a little while or any number of other reasons. If that did happen the timer would kick off and close my web start app. I cannot have this.

Similar Messages

  • Trouble with the Open Browser Window behavior

    I have a page with thumbnail images. I want to be able to
    click the thumbnail and have a new window open with just that image
    in the window. If I don't assign a link to the thumbnail, and
    select the Open Browser Window behavior, the only 3 options for
    when to open the window are onLoad, onError, or onAbort. I want it
    to be opened onClick. If I do assign a link to the image, and then
    select the Open Browser Window behavior, it gives me the option to
    open the window onClick. However, when I test it, it opens 2 new
    windows - the one I want, and the one that is the link that I
    assigned to the image.
    I can't figure this out! Any help would be greatly
    appreciated.
    Sam

    You must always do the following when applying behaviors to
    images:
    1. Assign a link to the image first, even if it is a null
    link. Use the
    Property inspector to do this.
    2. Click on the image in Design view, then click on the
    <a> tag that you
    see on the Tag inspector bar at the bottom of the document
    pane so that the
    anchor tag is selected.
    3. Now apply your behavior.
    You *can* usually truncate this process as follows -
    1. Select the image in Design view and make sure that
    <img> is selected on
    the Tag selector bar.
    2. Apply the behavior.
    3. Use the behavior panel to set the event desired to
    <A> onClick, or <A>
    onMouseOver, or any of the appropriate "<A>" containing
    items in the list.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "sammas" <[email protected]> wrote in
    message
    news:f8t28c$b6j$[email protected]..
    >I have a page with thumbnail images. I want to be able to
    click the
    >thumbnail
    > and have a new window open with just that image in the
    window. If I don't
    > assign a link to the thumbnail, and select the Open
    Browser Window
    > behavior,
    > the only 3 options for when to open the window are
    onLoad, onError, or
    > onAbort.
    > I want it to be opened onClick. If I do assign a link to
    the image, and
    > then
    > select the Open Browser Window behavior, it gives me the
    option to open
    > the
    > window onClick. However, when I test it, it opens 2 new
    windows - the one
    > I
    > want, and the one that is the link that I assigned to
    the image.
    >
    > I can't figure this out! Any help would be greatly
    appreciated.
    >
    > Sam
    >

  • I have problems with gameplay(zuma blitz and bejeweled blitz)in the firefox browser window. the game is latent and play is very jerky..can u please help. i played them in the IE8 browser with no problem

    i've tried playing zuma blitz and bejeweled blitz in the firefox browser window and the play is very jerky and slow.

    Just had the same thing happen AGAIN. Suddenly - a blank iPlayer Desktop which failed to download new programmes. All previous programmes were still in the repository folder. This time the sequence I outlined previously didn't work.
    What eventually got things working this time was to reinstall Adobe Air as part of the BBC iPlayer Desktop installation process - and not separately.
    So:
    a) Move iPlayer to trash.
    b) Find and delete the following folder: Users/Yourname/Library/Preferences/BBCiPlayerDesktop.61DB7A798358575D6A969CCD73DDBBD 723A6DA9D.1
    c) Find and delete the following folder:
    Users/Yourname/Library/Application Support/Adobe/AIR/ELS/BBCiPlayerDesktop.61DB7A798358575D6A969CCD73DDB BD723A6DA9D.1
    d) Find and delete the following folder:
    Users/Yourname/Movies/BBC iPlayer/repository/cache
    e) Find and run: Applications/Utilities/Adobe AIR Uninstaller
    f) Empty the Trash. I found that bits and pieces of BBC iPlayer were still running despite having been quit and dumped in the trash - and so it wouldn't allow me to complete this part. Restarted the computer, then empty the trash.
    g) Find the folder: Users/Yourname/Movies/BBC iPlayer/repository and rename it repository2
    h) Reinstall iPlayer. It will tell you that you have no programmes to view. Quit the programme.
    i) Find and delete the folder: Users/Yourname/Movies/BBC iPlayer/repository
    j) Find the folder: Users/Yourname/Movies/BBC iPlayer/repository2 and rename it to repository.
    k) Relaunch iPlayer
    It would be terribly nice if the BBC or Adobe stopped buggering about with this . . .

  • I used to be able to move tabs right or left by drag and drop in the same browser window. Now, after updating to 35-Mac, i can't do that. How can I do that now?

    using FF 35 on MacBook Pro

    Thank you for your response -- It seems the "classic theme restorer" add-on is the problem. With that enabled I cannot move tabs. With it disabled I can. I've used that add-on for years without issue on Mac and PC. The PC is still fine, just the Mac is problematic since the FF update about a week ago.
    So I guess that's the answer unless anyone knows of some other trick or setting to change so FF is able to have tabs below the address bar AND be able to move tabs left to right within the same browser window!

  • I have just launched icloud on my windows 7 laptop, and stupidly added my outlook email contacts - ie addresses to my icloud contacts. So, there are now 1000's of contacts.  How do I delete these and preserve the original telephone and address contacts,?

    I have just launched icloud on my windows 7 laptop, and stupidly followed the instructions and added my outlook email contacts which come up as email addresses to my whole icloud contacts. So, there are now 1000's of contacts which have now appeared on my iphone.
    How do I delete these email addresses and preserve the original straightforward names with telephone and address contacts?  I am not very technical and am frustrated in my attempts to rectify the situation.
    Thanks

    For your contacts go to settings on your phone - mail contacts and calendars - scroll down to contacts and change display order to the one you want ( you can also change sort order, but ususally people prefer last name first and see if that is what you have).
    For your yahoo emails go on your computer open outlook
    In Outlook 2010, choose File > Accounts.
    Click account settings and confirm the command by clicking "Add and remove accounts or change existing connection settings."
    Select account and click "Change."
    Click "Advanced."
    Click "More Settings."
    Click the "Advanced" tab.
    Enter "7" in the box to the right of "Remove from server after."
    Click OK.
    Close Account Settings.
    If you have outlook 2007
    In Outlook 2007, choose Tools > Account Settings.
    Click the account you wish to edit and then click Change.
    Click the "More Settings" button.
    Select the Advanced tab located across the top of the window.
    Select the "Leave a copy of messages on the server" option.
    Select the "Remove from server after" option.
    Enter 7 in the box to the right of "Remove from server after."
    Click OK.
    Close Account Settings.

  • Closing the Application Browser.

    Hi Experts,
    I had been Posting on the forum about closing of the Application Window.
    Thanks a lot for the ideas,the purpose is yet to be solved.
    Let me explain my requirement in detail.
    I have an application in which there are View Layouts.
    I am able to close the Application Window on Click of a Button(say CLOSE).
    But the requirement is such that,the Application Browser window needs to be closed.
    Is it Possible in Web-DynPro to Close the Browser window on Click of a Button.
    Please provide the necessary information in this regard.
    Thanks and regards,
    Chandrashekar.

    chk it
    closing browser window via button
    How to close parent window

  • How do I find the current browser window width in pixels?

    I'm writing a PHP script that will use the current browser
    window width
    and height, but I don't know how to find that. Is there some
    way to
    capture the width and height of the current window in pixels?
    TIA

    Thanks Micha, you certainly may ask why.
    I posted a message some time ago in the appdev forum about
    the Recordset
    Paging server behavior being geared toward use with tables. I
    was
    frustrated because I wanted to do something with repeated
    div's in a
    liquid site. But the Recordset Paging s.b. locks the number
    of records
    per page to a fixed number. I'm trying to figure out how to
    make the
    records per page a variable that's determined by the window
    width. I've
    created a liquid site with a products page that contains both
    text and
    thumbnail product images. The text occupies 2/3 of the width
    of the
    window, and the div container that holds the floated div
    thumbnails I
    want to account for the other third. The thumbnail div's are
    produced by
    a WHILE statement and I want them to be paged based on the
    number of
    div's that will fit within a container that occupies a
    percent of the
    browser window width. Here's what I've got so:
    $window_size_wide = ; // Current browser window width in px
    $window_size_tall = ; // Current browser window height in px
    $thumb_cont_wide = $window_size_wide * .3; // 30% of window
    width incl.
    padding in px
    $thumb_cont_tall = $window_size_tall * .4; // 40% of window
    height incl.
    padding in px
    $thumb_size_wide = 100; // thumbnail div width incl. margins
    in px
    $thumb_size_tall = 100; // thumbnail div height incl. margins
    in px
    $no_thumbs_wide =
    ceil(($thumb_cont_wide/$thumb_size_wide)-1);
    $no_thumbs_tall =
    ceil(($thumb_cont_tall/$thumb_size_tall)-1);
    $records_per_page = ($no_thumbs_wide * $no_thumbs_tall);
    $offset = ($thispage - 1) * $records_per_page;
    $total_pages = ceil($total_records/$records_per_page);
    etc.
    What I don't know is how to find the current window width or
    height. I
    would also like to know if the $thumb_cont_wide and the
    $thumb_cont_tall
    can be determined in some way based on the div size generated
    through my
    CSS. In other words, I don't want to declare the percent of
    height and
    width in this script, I want to declare it only in my CSS and
    have it
    determined by the browser window width and height. The only
    element I
    want to hard code is the size of the thumbnails as they will
    always be
    the same. It seems to me that something like this could be
    done to make
    recordset paging scalable to match a scalable web page.
    So the question is, can I define a PHP variable based on a
    Javascript
    variable? If so, how? If not, how can I accomplish this? Is
    this just
    not possible?
    Thanks for your help.

  • Multitouch zoom in google maps on a windows 7 tablet leads to a zoom of the whole browser window including tools.

    Using a tablet with windows 7 and multitouch screen and the actual firefox version. If i open google maps and want to zoom the map with the zoom gesture, firefox zooms the hole browser window including the tools instead of the map. If i open another empty tab and closing it before using the zooming gesture, everything will work. Would be helpful if someone could give me a hint how to overcome these problems without always opening a new empty tab.

    Well, the touch problem was first observed with Firefox Version 21. The Versions 21 to 23 offers the workaround with opening and closing a new tab. Since Version 24 also the workaround didn't work anymore and the problem, that the multitouch gestures zooms the hole browser window is still present. Maybe this makes it clear for now. So would be helpful if anybody could give me a real hint how to overcome these problem.

  • Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Yoh, what is FSCCommanr ? sorry man I am an absolute beginner in Flash. I tried the code:
    /* Click to Go to Web Page
    Clicking on the specified symbol instance loads the URL in a new browser window.
    Instructions:
    1. Replace http://www.adobe.com with the desired URL address.
       Keep the quotation marks ("").
    instance_name_here.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
    function fl_ClickToGoToWebPage(event:MouseEvent):void {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the same code I used before and it opens a pdf file in a web browser, and it doesn't open an AutoCAD file.

  • Diappearing photos replaced by an exclamation point within a triangle.  Prior to loading Lion I could put the image number in finder and locate the original file for that photo.  How do I restore photos now?

    I had problems with photos disappearing and being replaced by an exclamation point within a triangle.  I can see the photo in the thumbnail summary but when you click on it, the screen goes black and the exclamation point within a triangle appears along with the info on the original image number (i.e., img_1120.jpg). Prior to loading Lion, I could go to Finder, enter the image number and locate the original file for that photo.  I could then restore it for editing, copying into Print Shop directly, etc.   That no longer works after installing Lion.   How do I restore photos now?  I have 100s of photos that I have been going back to the original files and restoring and I am frantic that I will no longer be able to get to the original files.  Please help!  Thanks

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    What version of iPhoto? Assuming 09 or later:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Opening hyperlinks in the same browser window

    Hey Gang!
    How does one create a hyperlink such that it opens in the
    same browser window and doesn't keep opening a new window each
    time?
    Cheers!
    Gregory

    Do you meant that you want to "open the hyperlinks of your flash file in the same browser window"
    You flash file will be put on the internet and I think you have to configure your brower to achieve this goal.
    We all know that IE can be configured to open the hyperlinks in the same window.
    Thus if you want your flash file achieve this feature you need to write a code to control your brower.
    This code can be a simple JS code. You can just google this to find out the answer.
    good luck
    I love using flash quiz generator

  • I've a video with an extra translator voice how can I remove the translator and keep the original voice ?

    I've a video with an extra translator voice how can I remove the translator and keep the original voice ?

    I got the quicktime 7 pro but that did not solve my problem I need to listen to the origenal voice on my video  however  in window properties there is only delete the it deleted all the voices together :'( helllllllllp someone

  • How can I open the Wndows Browse window from forms..

    I am using forms 5.0 and at run time I want to open the
    MSWINDOWS "BROWSE" window.Can any body help me?.

    I found this example in a book, which is useful for retrieving an
    image file from a local drive and inserting it into a table.
    I hope you find this helpful.
    DECLARE
         v_dirname          VARCHAR2(255);
         v_filename          VARCHAR2(255);
    BEGIN
         v_dirname := 'C:\';
         v_filename := get_file_name(v_dirname, NULL,
              'Bitmap file (*.bmp)|*.bmp|'                    ||
              'JPEG file (*.jpg)|*.jpg|'                         );
         IF v_filename IS NOT NULL THEN
              read_image_file(v_filename, 'ANY', 'av_data_image.blob_data');
         END IF;
    END;

  • When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name.  How I can prevent the original file name being replaced during the downloading process?

    When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name.  How I can prevent the file name being changed during this downloading process?

    Hi Glenyse,
    Here are my steps.
    1.  I upload multiple image (jpg) files onto my photo album.
    2.  I select the "sharing" by email option for this album.
    3.  I enter the recipient's email address.
    4.  The recipient receives my message and clicks on the link.
    5.  The recipient accesses my photo album and clicks on one of the images.
    6.  The image opens up to its own screen.
    7.  The recipient selects the "download" and then save file option.
    Here is the part I do not understand.  For some reason, during this "download" process, the original name which I have given to the file is replaced by different name.  So I was hoping that someone knows how to prevent the file name from being changed during the "download and save" process.
    Much appreciated if you can help me find a solution to this problem.
    Mary  

  • Drill to link - How can integrate the new browser window inside the report

    Hi, I'm using Discoverer Plus/Viewer 10.1.2.48.18 and I just created successfully a "Drill to Link to an Internet Page" related to my field "Ticket Id"
    So, when, from Viewer, I select the link, a new tab from a new browser session is opend and I see all the details related to the Ticket Id chosen.
    This is right because on the manual is written:
    Discoverer behaves as follows: if you drill out to an Internet page, Discoverer displays the Internet page in a new browser window.
    Now my question is this: is there a way or a workaround to integrate the new browser window's content inside my report ?
    In other words, instead to see the all the Ticket id details (graphs included) in a new browser window, my customer asked me to see these details inside the same report, just below the field with the link.
    Any help will be appreciated
    Thanks
    Alex

    Hi, I'm using Discoverer Plus/Viewer 10.1.2.48.18 and I just created successfully a "Drill to Link to an Internet Page" related to my field "Ticket Id"
    So, when, from Viewer, I select the link, a new tab from a new browser session is opend and I see all the details related to the Ticket Id chosen.
    This is right because on the manual is written:
    Discoverer behaves as follows: if you drill out to an Internet page, Discoverer displays the Internet page in a new browser window.
    Now my question is this: is there a way or a workaround to integrate the new browser window's content inside my report ?
    In other words, instead to see the all the Ticket id details (graphs included) in a new browser window, my customer asked me to see these details inside the same report, just below the field with the link.
    Any help will be appreciated
    Thanks
    Alex

Maybe you are looking for

  • Mac OS X Lion Problems (Sound, Resolution, Missing Partition, and Crashes)

    Ohia everybody! So recently I installed Mac OS X Lion (GM) on my Mac Mini. It's been installed for about 2 weeks, but I quickly noticed a couple of problems with it. Problem 1 - Screen Resolution: When I had Snow Leopard installed and I held alt to s

  • Flat XML in the WSDL

    hello I am recieving in RFC2WS a WSDL. in the respone the WSDL look like this: <s:element name="GetZagmshDataResponse">   <s:complexType>     <s:sequence>         <s:element minOccurs="0" maxOccurs="1" name="GetZagmshDataResult">      <s:complexType

  • SC in awaiting approval is not editable.

    Hi Gurus, We are on SRM 7.03. When a requester order a shopping cart and it's in awaiting approval. Then if the requester select the SC created, edit button is grayed out. If the shopping cart is displayed, edit button is not available. Is it a stand

  • Migrating from Sybase Anywhere to ASE

    I am in process of migrating from Sybase Anywhere to ASE and trying to import a table from Anywhere to ASE, I getting following error message that could not find appropriate data type for column - now this column from Anywhere has data type of dateti

  • Creating PDF thumbnails in Flash cs5.5 AIR

    I need a way to create a thumbnail of the first page of a PDF. I am downloading a pdf and saving it locally. I just don't know a way to get the contents of the first page to a bitmap, bitarray or jpg format.  I have been using jpgencoder for other im