Applet in a war

Hi all,
I am trying to load an applet from my web app that is bundled in a war and deployed on tomcat 5.5 under /webapp.
Among other things, my webapp.war contains the following:
-test.jsp
-WEB-INF/classes/com/example/bus/MyApplet.class
I tried many codebase/code attribute combos without any luck. I just get a applet load failure and a java.lang.ClassNotFoundException in the console.
What should my <applet> tag in test.jsp look like to load MyApplet.class as an applet? If this isn't possible, what other alternatives do I have?

Presumably. As part of a web application it seems likely that there would be static content such as images, SWF files, etc., and these are all things that should be exposed to the user. On the other hand, most web deployments I've seen put that stuff on an entirely different server and don't even use a WAR file for that. I don't use Netbeans so I don't know how to configure it with respect to this issue.
You should probably ask on a Netbeans forum.

Similar Messages

  • Portlet with Applet in same WAR

    Repost from Jdev:
    Hello, I have a Portlet project in Jdev that includes a servlet and all is working well. I now have the need to include a java applet in the portlet. So I right clicked 'Portlets' in my application, chose 'New', chose 'Applet' and started programming. Now I can't figure out how to include this applet on the portlet page.
    It appears that the applet is included in the WAR file of the project -- I can see it in Application Sources. So I believe it is being deployed with the rest of my project. But I don't know how to define the <applet> tag's 'archive' parameter to point to the WAR file.
    I've tried the Applet HTML Page wizard hoping the applet tag would be defined correctly to launch the applet; but it's not.
    Is this the proper way to include an applet in your portlet projects?
    Does it need to be deployed separately -- not in the main WAR file?
    Thanks.

    FYI....
              I am using weblogic 5.1 with service pack 9. I think there is
              something that needs to be set in the weblogic properties file for it
              to interpret the <jsp:plugin> tag . Can someone pls. advise me.
              Thanks in advance,
              Vijay
              

  • War file and new Trusted attributes since SE 6 update 19

    We deploy a war file which provides multiple applets. The new mixed code warning dialog is being displayed multiple times per user session (whenever a user selects another applet). Our war file contains multiple signed jar files, and several other components/files that are not packaged in a jar file.
    Adding "deployment.security.mixcode=HIDE_RUN" to a client PC's deployment.properties file suppresses the new warning dialog, but is not a practical solution for our web customers.
    #1) Is there any logging facility available in a develop/test environment that identifies the offending unsigned item(s) ?
    #2) To use the Trusted-Only attribute, must every component/file in our war file be packaged in a signed jar file, or is there another alternative ?
    #3) For this issue and for similar deployment issues, how likely is the hope that the Oracle Java team will improve upon these Update 19 mixed code enhancements in a near-future Update ?

    What are you missing?
    I inherited this app and signing the third party jars is how it was setup, I was wondering the same thing too, why was it necessary to sign the third party jars?
    The applet runs in either JRE 1.6.0_13 or JRE 1.6.0_27 depending on the other Java apps the user uses. JRE 1.6.0_13 does not have the mixed code security (so it is like is disable), but JRE 1.6.0_27 does have the mixed code security and the applet will not launch with mixed code security enable, so we have to disable it. With all the hacking going on in the last two years, is important to improve security; so this is a must.
    Yes, I always clear up the cache.
    Any idea on how to resolve this problem?

  • Trouble loading java-applet from within browser

    hello,
              I'm kinda new to Java-applets and to Weblogic and consequently I've run
              into a problem. I'm having difficulties deploying an applet in a
              war-archive. My archive structure looks like this:
              --root of .war
              --index.jsp
              --WEB-INF
              --classes
              --test
              --testapplet.class
              my code to load the applet in my index.jsp file looks like this:
              <applet
              codebase = "http://localhost:7001/WebModule/WEB-INF/classes"
              code = "test.testapplet.class"
              name = "TestApplet"
              width = "400"
              height = "300"
              hspace = "0"
              vspace = "0"
              align = "middle"
              >
              </applet>
              Unfortunately the class is not found by the browser producing a
              ClassNotFoundException. I use Weblogic 8.1SP2 and Mozilla 1.6, both
              using J2SDK(JRE) 1.4.2-03. My IDE is Borland JBuilder X Weblogic edition
              and my host-OS is Gentoo-Linux.
              Can anyone point out what's my mistake?
              Thx in advance
              Nic
              

    Ok, thanks. I didn't know that.
              Nic
              Robert Greig wrote:
              > nkalkhof wrote:
              >
              >> Can anyone point out what's my mistake?
              >
              >
              > Code in WEB-INF/classes is loaded by the container for execution on the
              > server. It is not in the docroot, so is not accessible to the client.
              >
              > Move the classes into the docroot (i.e. the same level you'd put gifs or
              > html pages).
              >
              > See http://java.sun.com/docs/books/tutorial/applet/index.html for some
              > examples.
              >
              > Robert
              

  • Help with App Server when trying to deploy JDeveloper 9.0.3 JClient

    I want to deploy JClients (applets) created in JDeveloper (9.0.3). I would like to set up a web site/web page to allow access to these applets via the Internet. I assume I need Application Server for this? If so, what version will work with 9.0.3 of JDeveloper? I read the documentation in JDeveloper about deploying to Oracle App Server, but I have NO experience with ANY application servers, so it's a little confusing.
    Thanks!

    Debabrata,
    OK, I installed App Server 9.0.3, and I deployed my applet as a WAR file to 9iAS. I then created an OC4J instance in 9iAS, and deployed the WAR file to this instance. NOW, how does someone access this applet from a WEB browser. I noticed that the WAR deployment has an associated URL, but if I try to enter this URL on the browser (i.e. ../applications/MyApplet.ear), the browser says the page is not found.
    Help!

  • Icon tag in jnlp file

    Hello all.
    I've been trying to include a custom icon with my web start application by using the <icon href="/images/camera.gif"> tag in the jnlp file. The image is included in the .jar file properly and then in the .war file, but the default web start icon always shows up instead (ie: on the desktop, start menu, and in the Java Web Start launcher).
    Does anyone have any hints on what might be going on?
    Any help will be greatly appreciated!
    Thanks.
    Chris
    [email protected]

    I'm having a similar problem ... but I think the .jnlp is structured right...
    gfpr.jnlp file...
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for gfpr applet -->
    <jnlp
    spec="1.0+"
    codebase="$$codebase">
    <information>
    <title>Financial Planning & Reporting Accelerator</title>
    <vendor>Unilever Cosmetics International</vendor>
    <description>GFPR Applet</description>
    <description kind="short">The client applet for GFPR.</description>
    <icon href="minesweeper32.gif" width="32" height="32" />
    <icon href="minesweeper64.gif" width="64" height="64" />
    </information>
    <resources>
    <j2se version="1.3"/>
    <jar href="gfprclientapplet.jar"/>
    <jar href="xerces.jar"/>
    <jar href="xalan.jar"/>
    <jar href="log4j.jar"/>
    <jar href="jdom.jar"/>
    <jar href="uciutilities.jar"/>
    <jar href="f1j9swing.jar"/>
    <jar href="crimson.jar"/>
    <jar href="jaxp.jar"/>
    </resources>
    <applet-desc documentBase="$$codebase"
    name="GFPR applet"
    main-class="com.unilever.uci.gfpr.presentation.fprAccelerator"
    width="760"
    height="400">
    </applet-desc>
    </jnlp>
    WAR structure....
    /app/gfpr.jnlp
    /app/minesweeper32.gif
    /app/minesweeper64.gif
    /app/****.jar (all the referenced jars)
    /META-INF/MANIFEST.MF
    /WEB-INF/web.xml
    /WEB-INF/lib/jnlp-servlet.jar
    anyone have any ideas ??
    thanks
    dave

  • Making my classes visible

    I have compiled a java applet with the WAR directory structure, I am however confused, as the WAR directory structure prohibits users from accessing files within a WEB-INF directory. Can you please tell me how to access theese files
    Thank you

    Not at all. Where exactly are you reading that?
    Your structure should look something like:
    .../webApplication
    .../webApplication/WEB-INF
    .../webApplication/WEB-INF/classes
    .../webApplication/WEB-INF/lib
    When a client makes a request for say
    http://yourDomain/appContextName/someFilePath
    the webserver will look for a file in
    .../webApplication/someFilePath.
    provided the someFilePath is not a secure directory (WEB-INF is).
    So you can put your applets anywhere under
    .../webApplication
    so long as they are not under WEB-INF.
    e.g., You could create a directory called
    .../webApplication/applets
    and put your applets in that directory.
    The WAR directory structure only specifies where you should put servlet-api-specific files. Applets have nothing to do with servlets and vice versa - they are just two Java technologies that happen to be used to build Web sites.

  • Loading applet for a jar within an ear

    Hi,
    Apologies if my question sounds ignorant, this is the first time i'm playing with applets.
    I'm trying to load an applet from a JAR (applet.jar) which contains all the files specific to the applet. The applet.jar resides within an ear (application.ear) which is deployed on JBoss.
    The applet related stuff is in the package com.dms.applet (which makes up the applet.jar)
    My index.html resides in a war file (webapp.war), which essentially contains a bunch of servlets. Index.html is a two frame page, which tries to load the applet in one frame and a servlet in another (servlets work fine).
    My <APPLET> tag for the frame in which the applet is displayed (is another html file - applet.html) looks something like this:
    <html><body>
    <APPLET
         code="com.dms.applet.NavigationApplet.class"
         codebase=./"
         archive="applet.jar, application.ear"
         width=200
         height=500
    >
    </APPLET></body></html>
    however, the applet always fails to load, i get the following exception when i open the java console:
    java.lang.ClassNotFoundException:
    com.dms.applet.NavigationApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    load: class com.dms.applet.NavigationApplet.class not found.
    java.lang.ClassNotFoundException:
    com.dms.applet.NavigationApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    It seems evident that the applet class loader can't find my applet.class and hence can't load it. I guess that its something wrong with my <APPLET> tag, but can't quite seem to get my finger on it. Do i need to explicitly tell the class loader to look for it in the applet.jar which is in the applicatin.ear?
    Any help would be very much appreciated.
    Thanks in advance
    EnterpriseJavaBones

    Hi,
    I managed to fix this problem. For those who mite come across the same issue in the future, this is how i did it.
    I put the applets code in the war file under an applet dir. That the the index.html is in the root (of the war dir) and the applets code is in a /applet dir.
    Hence the codebase simply reads, codebase="applet/"
    Cheers
    EnterpriseJavaBones

  • Not able to run Applet after calling JSP with a Servlet

    Dear Java-Community :)
    At first I want to say, that my English isn't the best.. so I hope you'll understand my problem ;)
    I'm running a J2EE-Application, packed in a EAR-File, on my JBoss with following directory-structur:
    /jaw6c/bin
    /jaw6c/build
    /jaw6c/common
    /jaw6c/ejb
    /jaw6c/sql
    /jaw6c/src
    /jaw6c/webapp
    /jaw6c/webapp/build
    /jaw6c/webapp/build/classes
    /jaw6c/webapp/build/classes/com
    /jaw6c/webapp/build/classes/com/jbossatwork
    /jaw6c/webapp/build/classes/com/jbossatwork/ControllerServlet.class<<<<<<<<
    /jaw6c/webapp/build/distribution
    /jaw6c/webapp/build/distribution/webapp.war
    /jaw6c/webapp/build/gensrc
    /jaw6c/webapp/compile-lib
    /jaw6c/webapp/lib
    /jaw6c/webapp/src
    /jaw6c/webapp/src/com
    /jaw6c/webapp/src/com/jbossatwork
    /jaw6c/webapp/src/com/jbossatwork/ControllerServlet.java
    /jaw6c/webapp/web
    /jaw6c/webapp/web/WEB-INF
    /jaw6c/webapp/web/WEB-INF/classes
    /jaw6c/webapp/web/buyCarForm.jsp
    /jaw6c/webapp/web/carForm.jsp
    /jaw6c/webapp/web/carList.jsp
    /jaw6c/webapp/web/copy_darstellungErgebnisse.jsp
    /jaw6c/webapp/web/darstellungErgebnisse.jsp<<<<<<<<<<<<<<
    /jaw6c/webapp/web/default.css
    /jaw6c/webapp/web/diag.jar
    /jaw6c/webapp/web/diagram.class<<<<<<<<<<<<<<<<<<<<<<<<
    /jaw6c/webapp/web/error.jsp
    /jaw6c/webapp/web/index.jsp
    /jaw6c/webapp/web/selectBewertungslaeufeList.jsp
    /jaw6c/webapp/build.xml
    /jaw6c/build.xmlThe applet should be loaded in my "darstellungErgebnisse.jsp"-File.
    Now the strange situation:
    When I access "darstellungErgebnisse.jsp" DIRECTLY by entering a URL like "localhost:8080/jaw/darstellungErgebnisse.jsp" , the applet is loading perfectly !
    But when my server is forwarding me to the JSP-Site with
    RequestDispatcher dispatcher =  getServletContext().getRequestDispatcher(destinationPage);
    dispatcher.forward(request, response);
    . . . . . . . ..I'll get a ""java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file diagram
    " -Error what means (referenced on the articles I've read here), that the diagram.class Is not found !
    I have tried to put the class file in a JAR, in different locations... using the codebase and archive tag but NOTHING solved my problem.
    So my question:
    Why I'm able to access the JSP-File directly and seeing the applet but after forwarding to the JSP-File via the Servlet, I'm not able to see anything.
    Would appreciate your help
    Thank you and best regards
    Edit:
    1) I'm able to download the diag.jar and diagram.class file from different locations
    2)I recognized, that after using the servlet, my url is changing from
    localhost:8080/jaw
    to
    localhost:8080/jaw/controller
    I tried added the class file to the position, where the controller-class file is, but without sucess.
    3)Opening the class-file with a hex-editor shows me, that
    the first bytes are
    "CAFEBABE0000002E02B9070002010007"
    (http://forum.java.sun.com/thread.jspa?threadID=648990&messageID=3820701)
    Message was edited by:
    Khaled01

    Hello everybody,
    I finaly have found the solution (after 16 hours).
    Like I mentioned before, I recognized (maybe a little to late), that my path is changing when I'm using the servlet :
    localhost:8080/jaw
    to
    localhost:8080/jaw/controller
    (made by url-pattern in my web.xml).
    So when my JSP tries to acces the class file, It's looking at:
    localhost:8080/jaw/controller/applet/diagram.class
    but the file is in:
    localhost:8080/jaw/applet/diagram.class
    So the solution is, to but a codebase-tag in my applet-declaration with following delcaration "basedir="../applet"
    I hope I'll help somebody with the same problems. It took me a day to find out, that the solution was two points and a slash..... lol
    Regards to everybody

  • Using an Applet as a client

    Hi,
    I'm have created a .war file that contains an html page and a JApplet.
    When I deploy the .war file and connect to the server, the html page is found. but, I get an exception that the applet class can not be found.
    when I use the assembly tool that comes with J2EE 1.4, all classes (JApplet & other Swing) are written under the WEB-INF.
    How can I resolve this problem?
    Regards.

    Hi,
    I'm have created a .war file that contains an html page and a JApplet.
    When I deploy the .war file and connect to the server, the html page is found. but, I get an exception that the applet class can not be found.
    when I use the assembly tool that comes with J2EE 1.4, all classes (JApplet & other Swing) are written under the WEB-INF.
    How can I resolve this problem?
    Regards.

  • Pre-load servlets from a war-file

    Hello,
              is there a way to pre-load a servlet (or execute any other code)
              at server startup, when the application is deployed as a .war-file?
              I know how to use the weblogic.servlet.utils.ServletStartup and
              the weblogic.system.startupClass... property, but these two
              seem to require that the servlet (or application class, respectively)
              are found in the servlet classpath (or the weblogic.class.path,
              respectively), so these mechanisms cannot peek into war-files to find
              the class, am I right?
              The page http://www.weblogic.com/docs51/classdocs/webappguide.html#dtprops
              says:
              <load-on-startup>load_order</load-on-startup>
              (Optional) This property is not honored by WebLogic Server in this release.
              Is this still valid?
              Is there a workaround?
              When will this element be supported?
              Concerning a possible workaround, I have read:
              > Subject: Re: Pre-load
              > Date: Fri, 19 Nov 1999 14:38:41 -0500
              > From: Jeff Martin <[email protected]>
              > Newsgroups: weblogic.developer.interest.servlet
              > Tom Gerber wrote:
              > >
              > > How do you get your startup class to start? Do you have a
              > > script which calls your startup class via a URL? Or is
              > > there a setting in the weblogic properties file for it?
              > Starting WebLogic in unix is a shell script. Just add a line to run your
              > preload program (e.g. java Preload).
              > Some unixes have utilities to get a web page from the command line (to
              > do shell parsing on it); create a series of calls, one per page.
              That sounds like a possibility, but I do not understand exactly.
              1) Where do I have to put the line into the shell script?
              2) Which line is it?
              3) What is the UNIX utility?
              I am using WL 5.1 (evaluation) under Solaris.
              Any help appreciated,
                   Oliver Matz
              | _ \ / \ | __)( ) Oliver Matz, Engineer
              | _/( () )| __) | | fon: +49(0)40/60990-0
              |_| \__/ |___) |_| fax: +49(0)40/60990-113
              

    Yes you can load a java applet form a jar file.
    Here is the code for internet explorer.
    <body>
         <table align="center" border="1">
              <tr>
                   <td>
                        <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="10" height="10" codebase="/plugin/">
                        <param name="code" value="XXX.class">
                        <param name="archive" value="XXX.jar">
                        </object>
                   </td>
              </tr>
         </table>
    </body>
    </html>
    Just replace the XXX.class with the class containing the init() method and XXX.jar with the jar file.

  • JAR file does not get uploaded to client for my SERVLET generated APPLET

    Some help please...
    I have a servlet that generates the HTML code that contains an APPLET. This APPLET needs a JAR file that is listed under its ARCHIVE property. The SERVLET is in a JAR file that is in the same directory as the other needed JAR file. If I create a static HTML with the output of the SERVLET it works fine. But if go through Weblogic the needed JAR file does not get uploaded to the client so I get a java.lang.NoClassDefFoundError:and my APPLET does not load.
    Q1: I am not sure what to put under the CODEBASE tag. I tried "." and I also tried "http://mymachine" but both did not work. I also tried without the CODEBASE tag. No luck. The SERVLET is bound to http://mymachine/servlet.
    Q2: Does anyone have any suggestions on how to do this? Is there a way to force the browser to upload a certain JAR file?
    Thanks...

    It works!!
    This is what I did:
    The jar file in question was the weblogic.jar. I tried putting it under the lib directory of my war file but I had problems because the weblogic.jar contains other war files inside so when I tried to deploy my war file it also tried to deploy the inner war files which for some reason did not work. So I tried removing the war files from the weblogic.jar and this time I had no problems deploying my war file but I still could not find the classes I needed. So I tried moving the weblogic.jar to the root dir of my war file and it worked!! Now the trick here was: I did not set the CODEBASE AND I had the ARCHIVE paramenter set in TWO places like below:
    <APPLET CODE = "marketmap.client.MarketMapApplet"
    ARCHIVE = "weblogic.jar"
    WIDTH = "657"
    HEIGHT = "382"
    ALIGN = "BOTTOM"
    ALT = "APPLET tag not recognized">
    </XMP>
    <PARAM NAME = CODE VALUE = "MyApplet" >
    <PARAM NAME = "type" VALUE="application/x-java-applet;version=1.2.2">
    <PARAM NAME = "scriptable" VALUE="false">
    <PARAM NAME = ARCHIVE VALUE="weblogic.jar">
    </APPLET>
    Actually if you do not place a parameter named ARCHIVE (at the end) it wil NOT work. I tried with multiple jar files listed and it works great too.
    Anyway I figure I'd share. Thanks for the help too.
    Lastly for people who choose not to upload the jar files to clients, you should look at the bea documentation on applets. It lists a classpath servlet that allows you to provide classes to the clients without having to force them to download the jar file.

  • Applet works on eclipse but not on reg browser (not inited error)

    Hi everybody,
    I've just made an applet, but I don't know why it can't be shown. I'm working with Eclipse, and when I run the .java file, everything works fine. It even works fine when I specify parameters through the eclipse build file parameter arguments.
    Now I would like this to work by using the appletviewer and my html file. When I do this, the application doesn't work anymore and I get this error: Start applet not inited and shows loading java Applet failed when I scroll over to the java applet box on the browser. (Mozilla)
    I used this code in the html file:
    <html>
    <head>
    <title>MicroToolBus Example Plugin Applet 2 </title>
    </head>
    <body>
    <h1>MicroToolBus Example Plugin Applet 2 </h1>
    <hr>
    <applet code =MicroToolBus.class width=400 height=100>
    <param name="ModelName" value="edu.vt.vbi.pathport.client.plugin.microarray.MicroarrayModel">
         <param name="DataLocation" value="c:/eclipse/workspace/PathPort/xml/samples/mageml/pmml.xml">
    </applet>
    </hr>
    </body>
    </html>
    which is located at
    C:\eclipse\workspace\PathPort\build\edu\vt\vbi\pathport\client\toolbus\MicroToolBus.html
    The MicroToolBus.class file is located in the same directory. What am I doing wrong. I tried putting the class file and the html in the same directory as the actual .java file of the applet, but that didn't seem to work either. Thanks in advance; your help and suggestions are much appreciated,

    What am I doing wrong?Your getting caught in the Sun/Microsoft war. Numerous casualties. For rehab, see:
    http://www.MartinRinehart.com
    Click "Articles", "Launching Applets".
    Warning: make a big mug of java before you start. This is not trivial stuff.

  • JSP unable to load applet

    I'm trying to load an applet from my JSP (under WL 6.1 SP2 on Win2K) with
              the following code:
              <OBJECT ...>
              <PARAM NAME = "CODE" VALUE = "com.foo.bar.MyApplet" >
              <PARAM NAME = "CODEBASE" VALUE = "/classes/[email protected]/" >
              </OBJECT>
              Before you say "try the <jsp:plugin> tag..." - I did and got nothing except
              the display from the <jsp:fallback> tag. At least with the <OBJECT> method I
              can see the errors... once I get it working with <OBJECT>, I'll switch over
              to <jsp:plugin>!
              Anyway, my applet is located in a JAR, which is located in an EAR. I'm sure
              that my problem is not having the correct CODEBASE, but just what should
              that CODEBASE be? According to the docs, /classes/ear@war/ should work...
              but using that I get a FileNotFound exception from the Java PlugIn. Am I
              missing something in a deployment descriptor? Ideally, I would like to have
              my JAR loaded from the root of the EAR, not the WAR... is this possible
              using /classes/my.ear@/ as the CODEBASE?
              Any help would be greatly appreciated!
              Thanks!
              Steve
              

    1 - Place your applet class in the CLASSPATH. Not in the web application
              that your jsp is in.
              2 - In your jsp do something like this:
              <html>
              <body>
              <P>Applet below</p>
              <APPLET CODE="com.applet.TestMyApplet.class" CODEBASE="/classes/" WIDTH=600
              HEIGHT=100></APPLET>
              </body>
              </html>
              Regards,
              Joseph Nguyen
              BEA Support
              "Steve Soloski" <[email protected]> wrote in message
              news:[email protected]...
              > I'm trying to load an applet from my JSP (under WL 6.1 SP2 on Win2K) with
              > the following code:
              >
              > <OBJECT ...>
              > ...
              > <PARAM NAME = "CODE" VALUE = "com.foo.bar.MyApplet" >
              > <PARAM NAME = "CODEBASE" VALUE = "/classes/[email protected]/" >
              > ...
              > </OBJECT>
              >
              > Before you say "try the <jsp:plugin> tag..." - I did and got nothing
              except
              > the display from the <jsp:fallback> tag. At least with the <OBJECT> method
              I
              > can see the errors... once I get it working with <OBJECT>, I'll switch
              over
              > to <jsp:plugin>!
              >
              > Anyway, my applet is located in a JAR, which is located in an EAR. I'm
              sure
              > that my problem is not having the correct CODEBASE, but just what should
              > that CODEBASE be? According to the docs, /classes/ear@war/ should work...
              > but using that I get a FileNotFound exception from the Java PlugIn. Am I
              > missing something in a deployment descriptor? Ideally, I would like to
              have
              > my JAR loaded from the root of the EAR, not the WAR... is this possible
              > using /classes/my.ear@/ as the CODEBASE?
              >
              > Any help would be greatly appreciated!
              >
              > Thanks!
              >
              > Steve
              >
              >
              >
              

  • Using the import on a page with an applet.

    I imported an HTML page that loads an applet I wrote (which works fine locally), but after I imported it, I'm having trouble figuring out how to get it to load when I build it from JSC.
    Anyway, here is what I have in my JSP page that calls out to the applet (DisplayMonoApplet).
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <title>Model Viewer</title>
                </head>
                <body>
                    <h1>Model Viewer</h1>
                    <hr/>
                    <!--"CONVERTED_APPLET"-->
                    <!-- http://surewebdev:18080/sureweb/ -->
                    <!-- HTML CONVERTER -->
                    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                        codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,0" height="600" width="800">
                        <param name="CODE" value="DisplayMonoApplet.class"/>
                        <param name="type" value="application/x-java-applet;version=1.5"/>
                        <param name="scriptable" value="false"/>
                        <comment>
                            <embed code="DisplayMonoApplet.class" height="600" model="models/HyaluronicAcid.xyz"
                                pluginspage="http://java.sun.com/products/plugin/index.html#download" scriptable="false"
                                type="application/x-java-applet;version=1.5" width="800"></embed>
                            <noembed>alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." Your browser is completely ignoring the <APPLET> tag!</noembed>
                        </comment>
                    </object>
                    <!--
    <APPLET CODE = XYZApp.class WIDTH = 300 HEIGHT = 300>
    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
        Your browser is completely ignoring the <APPLET> tag!
    </APPLET>
    -->
                    <!--"END_CONVERTED_APPLET"-->
                    <hr/>
                    <a href="XYZApp.java">The source</a>.<script language="JavaScript" src="/js/omi/jsc/s_code_remote.js" type="text/javascript"></script>
                    <h:form binding="#{modelviewer.form1}" id="form1"/>
                </body>
            </html>
        </f:view>
    </jsp:root>The page loads fine but the applet will not load because it cannot find the DisplayMonoApplet.class.
    Here is the exact error:
    load: class DisplayMonoApplet.class not found.
    java.lang.ClassNotFoundException: DisplayMonoApplet.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    What I did was add my applet in Project Navigator like this:
    Left clicked on my project name
    Right clicked to selectfile view
    Expanded src, then src again
    Right clicked on myapp and added a Java file named DisplayMonoApplet
    When I build this in JSC, the DisplayMonoApplet can be found in the WAR file in the following location:
    WEB-INF\classes\myapp\DisplayMonoApplet.class
    I have tried every configuration I can think of (myapp/DisplayMonoApplet, http://myserver:18080/myapp/.....etc.) but no luck.
    Do I need to add something to my web.xml file like you do for servlets (I can call servlets in this app just fine)?
    What am I doing wrong?
    THANKS!

    Wait a second...there is more to that error message that I overlooked before.
    There might be something other than just the way I set the CODE and CODEBASE parameters wrong here
    Any ideas?
    Here is the entire messsage:
    load: class DisplayMonoApplet.class not found.
    java.lang.ClassNotFoundException: DisplayMonoApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more

Maybe you are looking for

  • APXIIMPT-PayablesOpen Interface FND_REQUEST.submit_request returns 0 inToad

    I am submitting APXIIMPT (Payables Open Interface Import) FND_REQUEST.submit_request from Toad and it returns 0 . I am setting context before I submit the request. Not sure what is missing. Any help is very much appreciated! Here is my code: BEGIN Fn

  • Slow since upgrading to yosemite

    Hello I'm a new mac user and need some info. I noticed that my mac is a bit slower since upgrading to Yosemite. I get to see many times when opening an app the spinning colourful ball. I did an etrecheck since i read on an over discussion that this m

  • Video chat with AIM on a pc

    I am having trouble video chatting with my friend who has a pc. When we connect with video chat, both of us can only see me. I have an imac- Any ideas? Sound works fine imac   Mac OS X (10.4.9)  

  • U44m1p7 - Can't get rid of this error!

    I have searched and followed every single suggestion I could find.  I have totally uninstalled every single CC app on my computer (even used Revo Uninstaller to make sure everything was removed), run CCleaner, etc., etc., and no matter what I do, whe

  • Files no longer default to SRGB after processing

    I still have the ICC profile box checked when ave a Jpeg after processing. Noticed that there was a bit of color shift on some images viewed on my web site in firefox---- checked the color space---unassigned!!  That usually only happened the check bo