Applet embedded in JSP doesn't run on browser with older than JRE-1.6

I have embeded an Applet in my JSP Page which used JDK1.6's getHardwareAddress() method to get user's physical address.
I have embeeded this into a JAR file and used it in my JSP where this applet run on onload() event of the form --> runs the applet --> and gets physical address of user machine and prints it in one of the text boxes on the form.
Now, the issue is that the applet doesn't run on browser that doesn't support JRE 1.6
My concern is that how can I run this (if at all possible) in browsers that support lower versions of JRE or is it possible to check that if the browser doesn't support JRE 1.6 then load the basic version of form without running the applet. Can i actually check the version of browser JRE somehow and stop to execute the applet. Because what happens as of now is that if the applet doesn't execute, the complete form fails to load.
The last option is that I give a message on my web page that redirects user to Sun Java site and asks them to update their browsers.

Personally, I have no knowledge about Applet but have you checked this link?
[http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101|http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101]

Similar Messages

  • Debug applet embedded in jsp using tomcat and eclipse

    I am trying to debug applet embeded in jsp. I have deployed my application on tomcat.
    The steps I followed
    1. Added JVM rumtime parameters in Java plugin control panel
    -Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8000,suspend=n
    2. Added JPDA_ADDRESS = localhost:8000 and JPDA_TRANSPORT=dt_socket to catlina.bat
    3. I start my server from commandline prompt "catalina.bat JPDA start"
    4.I have made a new configuration for remote debug in eclipse debug>new> connection type (socket attach) >port 8000
    5. when I open my application url in browser browser closes and command prompt displays "*Debugger failed to attach , timeout before handshake*"
    Any help on this ?
    Thanks in advance

    Personally, I have no knowledge about Applet but have you checked this link?
    [http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101|http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101]

  • Can't run my app with older version of jre anymore.  Help!

    Java Web Start is supposed to allow applications to use older versions of Java JRE. My applet uses 1.6.0_31 because it doesn't work with 1.7. (Backward compatibility? Don't ask.)
    When I first set it up a couple of weeks ago, it worked. Now, with JRE 1.7 officially released it does not. When I try to run it, I get the following message:
    "This application would like to use an older version of Java (1.6.0_31) that is not installed on your system. We recommend running the application with the latest version o java on your computer. Then there are two buttons.
    One button says "Run with latest version". The other button says "Cancel". When I click on "Cancel" the application fails with the following
    basic: LaunchDesc location: http://relativitysimulation.com/Applet.jnlp
    network: Created version ID: 1.6.0.31
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7
    network: Created version ID: 1.6.0.31
    network: Created version ID: 1.6
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7
    network: Created version ID: 1.6.0.31
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7.0.03
    network: Created version ID: 1.7
    java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.ExitException[ 0]
         at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
         at java.util.ResourceBundle.getString(ResourceBundle.java:353)
         at sun.plugin2.applet.Applet2MessageHandler.getMessage(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.logAppletStatus(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:722)
    basic: ExitException[ 0]
    ExitException[ 0]
         at com.sun.javaws.ui.SecureStaticVersioning.showCannotDownloadDialog(Unknown Source)
         at com.sun.javaws.ui.SecureStaticVersioning.canAutoDownload(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager$JnlpLaunchState.doJvmSelection(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
         at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:722)
    security: Accessing keys and certificate in Mozilla user profile: null
    security: Reset deny session certificate store
    Looks to me like Cancel does not mean "Run Older Version". While I am debugging why I can't use the latest version of jre, can someone please tell me how to use the older version?
    Edited by: 932841 on May 8, 2012 8:54 AM - corrected typo

    I'm the developer. And thank you for your prompt response. I have been given a work around so that the applet can use version 1.7. But that still doesn't explain what I am doing that makes Java fail to use the older version.
    I put this code in my jnlp file on March 27th when I realized that my app didn't work with version 1.7. I tested it at that time and it worked. In the process I installed and uninstalled java 1.6.0_31 ( and 1.7) several times. Maybe something important got corrupted then.
    <resources>
         <j2se version="1.6.0_31" href="http://java.sun.com/products/autodl/j2se"/>
    Added this -----
    Oh, if someone else wants to try this app on their machine, feel free. It is at
    http://www.relativitysimulation.com/Applet.html
    Edited by: 932841 on May 8, 2012 11:13 AM

  • The internet browser with more thane one video running is keep crashing after installing Adobe flash.

    If I run any website contains more than one video like this website for example :
    http://www.neatoxv-21.org ,where it has two videos talking about the cleaning vacuum neato xv-21, and both videos
    are running at the same time, then suddenly the explorer will crash, But in other broswers like google chrome it works fine.
    To double check, I un-installed the software and then I restarted my computer, I installed the software again but the same issue.
    I am using windows 7, so to be sure I missed nothing I updates the windows from Microsoft website and also
    I am sure that I have the latest internet explorer update.
    Now, the funny thing, I did the same process with Google chrome and it works fine!!!
    I am totally confused, wht could be the reason??
    Please advice..

    Update - I've now tested this with different internet connections, different computers and different operating systems. I've also just received a response from my internet service provider who said:
    "I've tested in Firefox, and it looks as if the buttons are crashing the browsers' flash plugin. This being the case, it is not going to be anything related to your computer, the internet connection, or the web server. 
    In all likelihood, it will be an issue with how the flash tour is coded, which I presume is created automatically by the Tourweaver package you mention. You will need to pursue their support for advice on this problem as it is something with the flash file)s( which isn't working correctly."
    So, hopefully Easypano support will be able to fix the problem. Obviously no connection at all with Adobe After Effects

  • Applets embedded in JSP

    Hi,
    Another newbie question here sorry.
    I have the following directory structure in my web app:
    root_dir
    root_dir/JSP_dir1/JSP_sub_dir1/main.jsp
    root_dir/WEB-INF/lib
    main.jsp has an embedded apple - the markup looks like this:
    <applet
      code="com.somepackage.somesubpackage.Class"
      archive="../WEB-INF/lib/myjar1.jar,
            ../WEB-INF/lib/myjar2.jar,
         ../WEB-INF/lib/myjar3.jar,
         ../WEB-INF/lib/myjar4.jar,
         ../WEB-INF/lib/myjar5.jar"The problem is that when I access main.jsp the applet doesn't show up - instead there are errors and JavaConsole shows the following:
    load: class com.somepackage.somesubpackage.Class not found.The relevant JAR's are in the WEB-INF/lib folder. Given the directory structure I mentioned above is it possible that the class could not be found because I am pointing to the location incorrectly? If that is not the case could anyone please suggest what the issue might be?
    Thanks.

    Thanks, this is very helpful. I guess the other part of my question is, if my JSP's are in the following directory structure:
    App-Root/JSP/JSP_subfolder/main.jsp.
    And the AppletJars folder is:
    App-Root/AppletJars/And the applet is embedded in main.jsp, the libs I reference out of that JSP, does their dir path have to be preceded by../../ or only ../. In other words, JSP's that are located two directories down, do they have to look two directories up?
    It may sound like a stupid question, but it is not obvious to me that after the JSP gets compiled into a Servlet it keeps its directory tree. I also think I encountered a situation recently where even though the JSP was nested within 2 folders it had to look only one directory up for something. Am I wrong?

  • Imac running Safari Browser with Linksys wrt54gs version 6 wireless router

    I am having problems getting the router to work properly I think. I am not sure that I have it connected correctly. This is my situation, I am able to go on the internet with no problems I have Airport extreme built into my mac and it is turned on.I am ale to go to that Ip link that allows you to enter in security information for the router. After I enter in the information such as changing the name and giving myself the wep security choice when I choose save changes then safari comes up saying that I am not connected to the internet. Ok now that is strange and in order for me to be able to go back to that Ip address in the web browser I have to reset the modem over again to be able to go back and enter Admin to access the linksys security settings again. So as it is right now it bothers me that I am a open network I am not secured. I have tried talking to linksys over the phone and nothing seemed to work. we make the necessary changes but then it wont allow to save because then it says that I am not connected to the internet at that point.I have right now the ethernet blue cable going from my Imac to my cable modem right now. I disconnected the linksys until I figure this out. Please if someone who has a built in Airport Extreme on there Imac could help me out with this I would be greatly appreciated.

    well....if you have a windows computer I would suggest you to upgrade the router's firmware first...One of my relatives had a similar kind of problem and the issue was resolved by just upgrading the router's firmware

  • Sample code with more than one ResultSet in JSP

    Hi
    Can anyone give me sample JSP code using crystal reports JRC with more than one ResultSets which works, since mine always seem to be giving error .
    Thank you
    Selvi
    RCAgent5 detected an exception: Cannot modify a read-only collection.
         at com.crystaldecisions.reports.common.e.a.clear(Unknown Source)

    You can access the JRC samples from SDN in the Business Objects Portal.  The link to them can be found [here.|https://smpdl.sap-ag.de/~sapidp/012002523100006008982008E/crxi_r2_jrc_web_smpl.zip]  There is a sample called jrc_resultset_datasource that shows how to pass a result set to a report; you can use this and modify it to allow another result set to be passed in.
    As a note, if you are having issues and believe it is your code, start with the sample and take small steps when adding new functionality so that you can determine where things go wrong.

  • Why can't I run my Java program with just the JRE, the JDK is required?

    I've recently written 3 programs in Java using the Netbeans IDE with JDK 1.6 as the default Java platform. The compile-time libraries include the Swing Application Framework. I use BuildDesk from ProductiveMe to package the each program into a Windows installer.
    When I install the programs on a new computer without a JRE or JDK being present, and attempt to run them I get an error (as expected) stating that there is no JVM. The messages says that I need to install JDK 1.3 or higher. I downloaded the latest JRE onto the new computer and attempted to run the programs and I get the same error message. My question is, why can't I run these programs with just the JRE installed? Why do I need the JDK? When I install the JDK, the programs run fine. The typical user may not have the JDK on their system, but they likely have the JRE if they've run Java programs before.
    Is the answer as simple as there must be library functions being used by the programs that belong to the JDK, but not the JRE? I'd rather a user not have to install the JDK verses the JRE because they may also have to update some Windows environment variables.
    Thank you for any help on this issue.

    915088 wrote:
    Thanks for your replies. I further investigated BuildDesk and found an option which allows a JVM check but that check needs the JDK. I stopped the JVM check and rebuilt using BuildDesk and it now only requires the JRE to run the programs. The reason why I use BuildDesk is to package more than just the jar file for the user. BuildDesk allows me to create a installation folder structure as well as include any other files in the build. I could just as well zipped all this together for the user but decided against that method.I don't think anyone will question your usage of an installer tool; that is entirely up to you. But what is questionable is that you have problems with that installer tool and then go look for help in a Java programming forum. The next time, go look for help at the source. If there is no way to acquire help (support, a forum, a mailinglist, anything) then that is a very good reason to not use the product in question.

  • Please help -- Why the applet doesn't run with jre1.4.1_01?

    Hi,
    I have an applet embedded in a remote-server page. It can be loading from the server and running in the local computer with Jre1.3.1. After I uninstalled jre1.3.1 and installed JRE1.4.1_01. My applet doesn't run. Here is the message from Java Consol:
    java.lang.NullPointerException
    at sun.plugin.cache.CachedFileLoader.writeHeaders(Unknown Source)
    at sun.plugin.cache.CachedFileLoader.createCacheFiles(Unknown Source)
    at sun.plugin.cache.CachedFileLoader.access$200(Unknown Source)
    at sun.plugin.cache.CachedFileLoader$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.cache.Cache.privileged(Unknown Source)
    at sun.plugin.cache.CachedFileLoader.download(Unknown Source)
    at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
    at sun.plugin.cache.FileCache.get(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.connectWithCache(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1197)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:247)
    at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:250)
    at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
    at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
    at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
    at sun.applet.AppletPanel.run(AppletPanel.java:292)
    at java.lang.Thread.run(Thread.java:536)
    I copy the my html file which has this applet built-in to my local computer. The webpage can be openned and the applet running fine even with jre1.4.1. Why it didn't run with Jre1.4.1 and it did run with jre 1.3.1 when loading remotely? Could someone tell me what the above messages mean? Is this a bug from Jre1.4.1_01?
    I have running server at 206.29.25.29. and select "read sensor". Jre1.4.1_01 will not let the applet run, but jre1.3.1 does.
    Is there any body know about this issue?
    Thanks,
    Kunlun

    In fact, I have run many tests and the only failures are when the plugin is 1.4.2 and the app server is on Unix:
    Build      Deploy      Build JDK     PlugIn JDK     App Server JDK     Result
    Win     Win     1.4.2_02     1.4.2          1.4.2          Success
    Win     Win     1.4.2          1.4.2          1.4.2          Success
    Win     Win     1.4.1_02     1.4.2          1.4.2          Success
    Win     Win     1.4.2          1.4.0          1.4.2          Success
    Win     Win     1.4.2          1.4.1          1.4.2          Success
    Win     Win     1.4.2          1.4.2          1.4.2          Success
    Unix     Win     1.4.2          1.4.2          1.4.2          Success
    Unix     Win     1.4.2          1.4.2          1.4.1_02     Success
    Unix     Win     1.4.2          1.4.2          1.4.0          Success
    Unix     Unix     1.4.2          1.4.0          1.4.0          Success
    Unix     Unix     1.4.2          1.4.1          1.4.0          Success
    Unix     Unix     1.4.2          1.4.2          1.4.0          Failure
    Win     Unix     1.4.2          1.4.0          1.4.0          Success
    Win     Unix     1.4.2          1.4.1          1.4.0          Success
    Win     Unix     1.4.2          1.4.2          1.4.0          Failure

  • Get JSP file to run with an applet tag under JDeveloper

    I Created an applet and an html file under JDeveloper. with the applet tag in the html file.
    when I run the html file the applet runs perfectly.
    I Created a jsp file in the same project with the applet and the html file under JDeveloper. I copied and pasted the applet tag from the html file to the jsp file.
    When I try to run the jsp file under JDeveloper I get
    java.io.FileNotFoundExceptions for all of the jar files in the Applet tag ARCHIVE and for the applet tag CODE
    This is the applet tag that I copied and pasted from the html file to the jsp file
    BEGIN:
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    END:
    Here three example of the exceptions that I got BEGIN:
    1.
    java.io.FileNotFoundException: http://139.169.225.224:8988/JspToAppletWS-JspAppletInstantiation-context-root/jdev-rt.jar
    2.
    java.io.FileNotFoundException: http://139.169.225.224:8988/JspToAppletWS-JspAppletInstantiation-context-root/jdev-rt.jar
    3.
    java.lang.ClassNotFoundException: myapplet.Applet1
    Here three example of the exceptions that I got END:
    This is the html file that works BEGIN:
    <HTML>
    <HEAD>
    <TITLE>
    Title
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    This is sample HTML text.
    </H2>
    <BR>
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    </BODY>
    </HTML>
    This is the html file that works END:
    This is the JSP file that does not work BEGIN:
    <!--%@ page contentType="text/html;charset=windows-1252"%-->
    <%@ page import = "myapplet.Applet1, java.util.Enumeration, java.util.Vector, javax.swing.JFrame, java.lang.*" contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET-->
    </body>
    </html>
    This is the JSP file that does not work END:
    I would like to know what I need to do so that I can run
    the Jsp file under JDeveloper with the applet tag without any exceptions.

    Hi,
    I meet the same problem and can not get a solution from this forum or other forum in internet, either.
    Have you already solved this problem? Can you tell me your solution? thanks in advance.
    Regards

  • JAVA Applet embedded in a JSP MI Application.

    Hi
    I am trying to include a Java Applet into a JSP page in my MI application. The code is as follows:
    <jsp:plugin type = "applet"
         code = "com.mycompany.applet.myApplet.class">
    </jsp:plugin>
    It gave me a Class Not Found exception. If I place the class in the same directory that the JSP resides it works properly. It seems that I need to set the codebase and/or archive property to work. But every value I use to set them still gaves me the CLASS NOT FOUND Exception. I am using MI2.5 and the jar file is located at MYAPPS/WEB-INF/lib folder. Any suggestion will be appreciated.

    Hi,
       plz try the following and see whether it can be of any help.
    <jsp:plugin type = "applet"
    code = "com.mycompany.applet.myApplet.class         
    codebase=”http://localhost:4444/*”>
    </jsp:plugin>
    OR
    <jsp:plugin type = "applet"
    code = "com.mycompany.applet.myApplet
    archive="Applet.jar"       -
    > jar  
    codebase=”http://localhost:4444/*”>
    </jsp:plugin>
    The codebase plays an important role as when u r running it relatively on a web server, the path for code base becomes relative as is described above.
    plz try this and let me know.
    regards
    anubhav

  • My applet doesn't run in a browser.

    I written the following code:
    import javax.swing.*;
    public class Logo extends JApplet
         JButton button ;
         Icon icon;
         JPanel panel;
         public void init()
              icon = new ImageIcon("smilogo.gif");
              button = new JButton(icon);
              panel = new JPanel();
              panel.add(button);
              getContentPane().add(panel);
    I also have my html file with the code :
    <HTML>
    <HEAD></HEAD>
    <BODY >
    <CENTER>
    <APPLET code = "Logo.class" width = "100" height = "100"></APPLET>
    </CENTER>
    </BODY>
    </HTML>
    when I run the html file with the appletviewer the image gets loaded like I
    expect it to. But when I run the file in a browser (IE version 5)after converting
    it using the HTMLConverter, the image doesn't load.
    What could be the problem. The code was compiled with J2sdk1.4.0.

    It's a JApplet, it needs the java plug in....
    If you've already got the plugin installed you'll just need to change the tag you're using to load the applet... it'll either be an embed tag or an object tag.. (embed for Netscape, Object for IE)...

  • How do you close a dragged applet, as Stage.close() doesn't work?

    I'm trying to implement a close button in a draggable applet, but Stage.close() doesn't work, and there's an odd little "X" icon which is causing me problems...
    My starting point and example is the simple draggable applet from the API documentation. It's the code listed under "User-Specified Close Example":
    http://java.sun.com/javafx/1.2/docs/api/javafx.stage/javafx.stage.AppletStageExtension.html
    import javafx.scene.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.paint.*;
    import javafx.scene.shape.*;
    import javafx.scene.text.*;
    import javafx.stage.*;
    var textContent = "Click the box to return to the browser";
    var outside: Boolean = false;
    var s: Stage = Stage {
        title: "AppDeploy Demo"
        width : 300 height : 200
        style: StageStyle.TRANSPARENT
        opacity: 0.5
        scene : Scene {
                content: [
                    Text { content: bind textContent 
                           x: 25 y:35 fill: Color.BLACK
                           font: Font{size: 24}
                    Rectangle { x: 100 y: 100 width: 100 height: 100 fill: Color.RED
                                onMouseClicked: function(e: MouseEvent): Void {
                                    s.close();
        extensions: [
            AppletStageExtension {
                shouldDragStart: function(e: MouseEvent): Boolean {
                    return e.shiftDown and e.primaryButtonDown;
                useDefaultClose: false
    }However, the Stage.close() function in the user code doesn't seem to close the applet once it's dragged. It seems this can only be achieved by a mysterious little "X" in a box top right, acting as a close button.
    Here's a demonstration of the problem once you've compiled that code:
    1. Open browser with applet (I'm using IE8 on Windows XP)
    2. Shift-drag the applet out of the browser. Notice the little X in a box appears when you drop the applet on the desktop.
    3. Click the red rectangle to invoke the Stage.close() function in the user code.
    4. Applet disappears from screen and does not reappear in the browser.
    5. But minimising all the icons on the desktop shows the little X in a box is still there sitting on your desktop (actually I find the X has gone, but the box is still there). This suggests the applet is still running.
    6. Close the browser. The little X's box is still on the desktop.
    7. After a short pause a Java dialog box appears: "Desktop integration warning. The application would like to create shortcuts. Do you want to continue? OK/Skip" The applet wasn't closed, it is still running!
    8. Click Skip. Dialog box disappears. But the little X's box is still on the desktop. Is the applet still running?
    9. Try to recompile app again into a deployable Jar (I'm using Eclipse for this).
    10. The compiler stops with "ERROR: Jar file C:\[...].jar could not be deleted. The Jar is probably locked by running application, Web browser, emulator or antivirus. Please check that all windows related to the application have been closed." Yes, the applet Jar is still being used.
    11. Minimise all the windows. The little X's box is still on the desktop.
    12. Click the little X's box.
    13. After a few seconds the box disappears. Does this mean the applet is no longer in use...?
    14. Recompile the app again into a deployable Jar. It works!
    By the way, you get the same experience with another Sun sample: the DraggableMP3Player at
    http://javafx.com/samples/DraggableMP3Player/index.html
    That, too, thinks it's implementing it's own close button, and again the same problem occurs.
    So it seems Stage.close() doesn't properly close the applet, and only the the little X in a box will do this.
    I'd like to be able to really close the applet from my own code. How can I do this?
    Many thanks
    Nik
    Edited by: nik.silver on Aug 6, 2009 12:48 PM

    After double tap home button, swipe up on the app card that appears above the icon.

  • Parsing in Weblogic/jsp doesn't work; application-mode (command-line) works

    Hello-
    Parsing my XML file in Weblogic/jsp doesn't work, whereas it works
    in application-mode... (albeit on two different machines)
    Here are the parameters:
    server1:
    weblogic 6.0
    win2k server
    jre1.3
    my personal machine:
    ***no weblogic***
    win2k server
    jre1.3
    When I run my code as an application (command-line style) on my machine,
    parsing in my xml file works fine, and I can do a root.toString() and it
    dumps out the entire xml file, as desired.
    However, running my code inside weblogic (on server1) in JSP, parsing in
    my file and doing a root.toString() results in the following: [dmui: null]
    (where dmui is my root)
    (even though i'm running it on two different machines, i'm positive its the
    same code (the servers share a mapped drive)...
    So, I think its probably because I'm using a different parser, as
    specified by weblogic? There are no exceptions being thrown. Here's my
    (abbreviated) code, which is called either command line style or in a JSP:
    // Imports
    import org.w3c.dom.*;
    import org.w3c.dom.Document;
    import javax.xml.parsers.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    DocumentBuilderFactory docBuilderFactory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    mDocument = docBuilder.parse (inFile);
    myRoot.toString()
    -END
    Doing a System.getProperty("javax.xml.parsers.DocumentBuilderFactory")
    results in:
    server1 (weblogic/jsp):
    "weblogic.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
    my machine (application-mode):
    null
    Does anyone have any ideas about how to get this work? Do I try to set it
    up so that they both use the same parser? Do I change the Weblogic parser?
    If so, to what? And how?
    Am I even close?
    Any help would be appreciated..
    Thanks, Clint
    "[email protected]" <[email protected]> wrote in message
    news:[email protected]...
    No problem, glad you got it worked out :)
    ~Ryan U.
    Jennifer wrote in message <[email protected]>...
    I completely missed setting the property(:-o), foolish mistake. That wasit. Thanks.
    "j.upton" <[email protected]> wrote:
    Jennifer,
    Personally I would get rid of import com.sun.xml.parser.* and use xerces
    which comes with WLS 6.0 now, unless like I said earlier you have a need
    to
    use the sun parser :) Try something like this with your code --I've put
    things to watch for as comments in the code.
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.w3c.dom.*;
    import java.io.FileInputStream;
    public class BasicDOM {
    public BasicDOM (String xmlFile) {
    try{
    FileInputStream inStream;
    Document document;
    /*You must specify a parser for jaxp. You can in a simple view
    think
    of this as being analogous to a driver used by JDBC or JNDI. If you are
    using this in the context of a servlet or JSP and have set an XML
    registry
    with the console this happens automatically. You can also invoke it in
    the
    context of an application on the command line using the -D switch. */
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
    >>>
    "weblogic.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
    // create a document factory
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    // specify validating or non-validating parser
    dbf.setValidating(true);
    // obtain a factory
    DocumentBuilder db = dbf.newDocumentBuilder();
    // create a document from the factory
    inStream = new FileInputStream(xmlFile);
    document = db.parse(inStream);
    }//try
    catch (Exception e)
    System.out.println("Unexpected exception reading document!"
    +e);
    System.exit (0);
    }//catch
    }//BasicDom
    // Main Method
    public static void main (String[] args) {
    if (args.length < 1)
    System.exit(1); file://or you can be more verbose
    new BasicDOM(args[0]);
    }//class
    =============================================
    That will give you a basic DOM you can manipulate and parse it fromthere.
    BTW this code
    compiled and ran on WLS 6.0 under Windows 2000.
    Let me know if this helped or you still are having trouble.
    ~Ryan U.
    "Jennifer" <[email protected]> wrote in message
    news:[email protected]...
    Actually I included com.sun.xml.parser.* as one last febble attempt toget
    it working.
    And as for source code, I included the code. If I just put that oneline
    of code
    in, including the imports, it fails giving me an error listed above inthe
    subject
    line. Here is the code again:
    package examples.xml.http;
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.*;
    import java.util.*;
    import java.net.*;
    import org.xml.sax.*;
    import java.io.*;
    public class BasicDOM {
    static Document document;
    public BasicDOM (String xmlFile) {
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    } catch (FactoryConfigurationError e){
    System.err.println(e.getException());
    e.printStackTrace();
    // Main Method
    public static void main (String[] args) {
    BasicDOM basicDOM = new BasicDOM (args[0]);

    Hi, Rob
    Does it work in WL9.2?
    It seems I do it exactly as the explained at http://edocs.bea.com/wls/docs81/programming/classloading.html - and it fails :o(.
    I try to run my app.ear with WL9.2 There are 2 components in it: webapp and mdb. The webapp/WEB-INF contains weblogic.xml:
    <weblogic-web-app>
    <container-descriptor>     
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    </weblogic-web-app>
    Mdb is expected to run in the same mode, i.e. to prefer the webapp/WEB-INF/*.jar over the parent Weblogic classloader. To do so I add the weblogic-application.xml to the app.ear!/META-INF:
    <weblogic-application>
    <classloader-structure>
    <module-ref>
    <!-- reminder: this webapp contains
    prefer-web-inf-classes -->
    <module-uri>webapp</module-uri>
    </module-ref>
    <classloader-structure>
    <module-ref>
    <module-uri>mdb.jar</module-uri>
    </module-ref>
    </classloader-structure>
    </classloader-structure>
    </weblogic-application>
    Now, when classloader-structure specified, both webabb and mdb prefer the weblogic root loader as if prefer-web-inf-classes not defined at all.

  • Applet Focus in JSP.

    I have an applet embeded in a JSP page. In this applet I have some text feilds for data entry. After the each data entry this field get validated . If the entered data is wrong then it popup a message using the JOptionPane.
    Now the problem. :- after message, I want to set back the focus to the respective fields. I had used setfocus(), grabfocus() etc..But nothing get worked.. Please advice ... tanx in advance...........
    Rgds
    Joe

    Did you try requestFocus()? There is no setFocus().
    Although grabFocus() is supposed to do the same thing, I've never used it, probably part of that switch from AWT to Swing some 8 years ago.

Maybe you are looking for

  • SAP Business Connector on Windows XP

    I've been trying to get the SAP Business Connector 4.7 to work on Windows XP professional but haven't been very successful. The business connector seems to install okay, but when I try to start the business connector through the server.bat file it ge

  • What is the cost of replacing the battery in the ipod 4th 32G

    Is this something to do myself or should I take it to Apple ?

  • S_alr_87012078.. curr. translation key

    While executing the report S_alr_87012078. I got the following message: Currency translation key 899 has not yet been defined Message no. KH292 Can any body explain me wht is the all about...!? Regards....AJ

  • No mapping between account IDs and security was done

    I upgraded to Windows 8.1, it blew up my SQL Server Developer installation. So I traveled 400 miles to get my DVD and reinstall SQl Server. I saw on th eforum that several people had similar problems and they said selecting the repair option of the i

  • How to decie required how much limit rquire to MAX_DUMP_FILE_SIZE

    Hi Team, I am junior oracle DBA. Please suggest that "How to decie required how much limit rquire to MAX_DUMP_FILE_SIZE". I understood , default size of MAX_DUMP_FILE_SIZE is unlimited. But, I receiving mails from application team,how much require. f