Applet in IIS

I have created a simple Applet and using IIS to acces the applet in a html file. In the browser applets are running fine as I tested some applets of live sites. But when I acces the applet which I created it doesn't work. I get following error in Java console :-
Error loading class: LoginApplet
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: LoginApplet
     at com/ms/vm/loader/URLClassLoader.loadClass
     at com/ms/vm/loader/URLClassLoader.loadClass
     at com/ms/applet/AppletPanel.securedClassLoad
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.run
     at java/lang/Thread.run
The login.html code is
<APPLET CODE="LoginApplet" WIDTH="10" HEIGHT="10"></APPLET>
My LoginApplet.class is also lying with login.html in same directory. I tried all possible things but no luck. Is there any specific setting we need to do in IIS.

I use IIS & Vignette for applets, but you don't need to do anything special as far as I know. One way to make sure your JAR or class file is where you think it is is to type in the URL in a browser and see if the browser attempts to download the file.
i.e., http://myserver/mydirectory/myappletdirectory/myapplet.class
Are you using a JAR file to house the applet code?
If so you'll need to add ARCHIVE="myJARFile.jar"
And then you would have to use something like:
http://myserver/mydirectory/myappletdirectory/myJARFile.jar to see if it is downloading correctly.
If you can download the file, then your problem is probably something to do with the CODEBASE=, CODE=, and ARCHIVE= parameters.
if your JAR is downloadable from
http://myserver.com/mydirectory/myappletdirectory/myapplet.jar
and the document root of your server is /myserver.com/
then you need an applet tag something like the following:
<APPLET CODEBASE="/mydirectory/myappletdirectory/"
CODE="com.mycompany.mypackage.Myclass.class"
ARCHIVE="/mydirectory/myappletdirectory/myapplet.jar">
...parameters...
</APPLET>

Similar Messages

  • Authenticate twice when launching applet from IIS

    Help! Once a user is successfully logged in using basic authentication on IIS, he still gets prompted for a username/password from the sun JVM after the applet is launched. Is there any way around this other than:
    1) Using the MSJVM
    2) Making that directory that launches the applet Anonymous.
    Thanks
    Zamil

    If IIS got Basic or Intergrated Authentication on than updating would fix this.
    The jre will use the browsers settings to connect. I had this problem trying to see applets on the Internet
    through a proxy that required NTLM. 1.4.0 could not authenticate at all and 1.4.2 kept asking for my domain
    ID. Since this is a bad habbit for users to fill out their ID and password when opening Inernet pages we
    waited for a newer release and that fixed it.

  • Database applet not working in browser

    I am working on windows 2000 server. I have an applet that connects to a ms access database.Everything works in appletviewer. When i try to view the applet in ie i get the following error:
    Error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    null
    Error: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    null
    access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    Basically i am trying to serve the applet on IIS. When I try to access the html page from
    a different machine, the applet loads and looks good except fails to connect with the database and display
    data.
    Any help will be highly appreciated.
    fnjoel

    You are not allowed to access Databases directly form an applet
    This is a security issue in Java Applets.

  • NoClassDefFoundError  when loading Applets from IIS5.0

    Hi
    I am having trouble loading applets from IIS 5.0. Here is my html code
    <applet code="Appli/Loader.class" width="100%" height="100%">
    </applet>
    All my clases and packages reside in the same directory from where this html is loaded.
    The trouble is that it behaves erratically. At times the Applet works fine and at times, the browser cannot locate some class.
    The funny part is this behaviour is not consistent. Some times the browser is able to load all the classes and the applet function very well.
    Any suggestion/advice/tip will be great help
    Thanks

    Add the codebase parameter and see if it works.
    <applet code="Appli/Loader.class" codebase="DIRECTORY_WHERE_YOUR_CODE_RESIDES" width="100%" height="100%">
    </applet>

  • Java.io.StreamCorruptedException: InputStream does not contain a serialized

    I am getting this error retrieving data from a JSP onto a applet. The JSP is on weblogic and the applet on IIS. What is the problem? Please help.

    its not clear. Can you please elaborate or post code snippet ?

  • Windows deployment

    Post Author: mhorv
    CA Forum: JAVA
    Hi there. I've got two questions/issues 1) I'm developing on an XP Pro box and need detailed instructions
    for deploying a report as part of a Java applet using IIS as the web
    server. All the docs I've seen refer to Tomcat deployments. I saw one
    this morning that stated IIS was a supported web server but still the
    docs deployment instructions only dealt with Tomcat. The report was
    developed using CR XI Developer edition release 2 and I'm connecting to
    a PostgreSQL database.2) The production deployment will be on a
    Windows server 2003 box.  If the install here is significantly
    different than the one above, I'll need help with that as well. Thank you very much for your help! Marc

    Hi Microsoft,
    I still have no answer to my Questions.
    Thank you for your answers & help!

  • Windows deployment - please help.

    Post Author: mhorv
    CA Forum: Deployment
    Hi there. I've got two questions/issues 1) I'm developing on an XP Pro box and need detailed instructions for deploying a report as part of a Java applet using IIS as the web server. All the docs I've seen refer to Tomcat deployments. I saw one this morning that stated IIS was a supported web server but still the docs deployment instructions only dealt with Tomcat. The report was developed using CR XI Developer edition release 2 and I'm connecting to a PostgreSQL database.2) The production deployment will be on a Windows server 2003 box.  If the install here is significantly different than the one above, I'll need help with that as well. Thank you very much for your help! Marc

    The intent of the OEM product key that is embedded into to BIOS is to use it with the Lenovo factory preload.  To use it in another way is not something we can help with.  My advice is to post this question to a Microsoft forum, or else just try it and see if it works.

  • IIS, Javascript, Signed Applet and ASP Blank Page Problem

    Hi,
    I'm having a problem using a Signed Applet in a site that runs in a IIS (Windows Server 2003).
    My aspx web page uses the applet to read my smart card and get information from it.
    This applet uses an auxiliar dll (stored in a second Signed Jar file) in order to read the information from my smart card.
    The way the solution is design:
    1) Aspx page is asked from server
    2) Internet Explorer recieve the page and asks the server for it content (images, applet, javascripts, etc)
    3) After this the JVM runs (console opens)
    4) After the Aspx page render fully a javascript register onload fires and call an applet method
    5) Applet receive the call and run the logic of the method:
         - reads the smart card;
         - calls Javascript function in order to fill aspx fields with information from smart card
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    5) The server makes some logic with the information receive and responds to client registering in aspx page a call to another Javascrit function
    6) The client received the asnwer from server and runs the Javascript function registered on step 5)
         This Javascript calls another method from applet and runs the following logic:
         - reads more information from smart card;
         - call javascript function in order to fill more fields of aspx page with the information readed
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    7) The server makes some logic and call another pages with no Applets
    8) Client asks for a second page with the same applet and we start with another logic express on steps 1);2);3),4);5) and then 7).
    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
         - with fiddler I can seer the request for the aspx page (that uses the applet)
         - but server responds with a blank html page
    The JVM doesn't fire.
    The IIS log don't show errors.
    The eventviewer doesn't show errors.
    The problem is solved with an IIS reset or a Application Pool reset.
    After a while the problem returns.
    This problem occours for other user in another machine, the server just stops responding correcly to request regarding pages with applets, the other pages still continue to work.
    If we disable Java Control Panel->Advanced->Java Plug-in->Enable the next-generation Java Plug-in the problem seend to stop, but we can't force all clients to disable this option right?
    Or there is a way to force the Applet to run with this option disabled?
    As anyone experience similar problem?
    Regards,
    OF

    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
    - with fiddler I can seer the request for the aspx page (that uses the applet)
    - but server responds with a blank html pageWell, if http requests look identical in case of success and failure (pay attention to cookies, etc) then it has to be something on the server side.
    It could be that server gets into this wrong state because of previous requests made by applet but it is hard to tell.
    I am not clear how old/new plugin can make a difference unless your applets run in the legacy mode (i.e. you are actually trying to reuse SAME instance of the applet when
    it is loaded next time).
    I'd start with
    1) carefully comparing good/bad sessions
    2) checking whether server will serve correct response to another client when it serves "bad" page for current client
    3) add debug statements to aspx - it is scripted page, may be some condition is not met and then it returns blank?
    4) record all http requests in one session until you get to "error" state and then use any http server testing tool to "replay" this set of requests.
    You should be able to get server into the same state without use of applet. Then you can try to tweak set of requests to see what makes a difference.

  • How to set IIS for Applet making it can run at any IE client.

    I made an applet with java. It works fine under JDK.
    After that, I made a web page with the applet embedded in.
    But it can only run on those client computers if the computers has installed JDK.
    Could you tell me how to set IIS so that my applet can run on all the client computers no matter whether they have JDK installed or not?

    It would have nothing to do with IIS. Your applet apparently requires a "newer" version of Java than what comes with the browser by default. So either make your applet comply with the lowest common denominator (no Swing classes, only AWT, for example), or require your clients to install the newer Java plugin.

  • Applet won't run on the IIS Server/...

    I have a very simple applet which connects to my Personal Oracle 8...
    When the applet starts on the web browser, it gives me this message...
    Any ideas???
    Any help would be great...
    Java(TM) Plug-in: Version 1.2.2.px
    Using JRE version 1.2.2
    User home directory = C:\WINNT\Profiles\Administrator
    Proxy Configuration: no proxy
    JAR cache enabled.
    Opening http://tuc_wkst/test/package1/Applet1.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\8XY3K12Z\Applet1[1].class
    Opening http://tuc_wkst/test/oracle/dacf/control/swing/TextFieldControl.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\0PMRQ5MN\TextFieldControl[1].class
    Opening http://tuc_wkst/test/oracle/dacf/control/Control.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\GHINCHMR\Control[1].class
    Opening http://tuc_wkst/test/javax/infobus/DataItemChangeListener.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\4LQBSTU3\DataItemChangeListener[1].class
    Opening http://tuc_wkst/test/javax/infobus/ImmediateAccess.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\85UZK96V\ImmediateAccess[1].class
    Opening http://tuc_wkst/test/oracle/dacf/control/ControlEnabledListener.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\OLMNATCD\ControlEnabledListener[1].class
    Opening http://tuc_wkst/test/oracle/dacf/dataset/AppModuleInfo.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\4LQBSTU3\AppModuleInfo[1].class
    Opening http://tuc_wkst/test/oracle/dacf/dataset/ModuleInfo.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\O10Z6DYZ\ModuleInfo[1].class
    Opening http://tuc_wkst/test/oracle/dacf/dataset/ResultSetInfo.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\85UZK96V\ResultSetInfo[1].class
    Opening http://tuc_wkst/test/oracle/dacf/dataset/InfoObject.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\Administrator\Temporary Internet Files\Content.IE5\4LQBSTU3\InfoObject[1].class
    Opening http://tuc_wkst/test/oracle/dacf/dataset/DacObject.class no proxy
    java.lang.NoClassDefFoundError: oracle/dacf/dataset/DacObject
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    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 java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    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 java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(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)
    null

    for more info: I deinstalled all plug-in versions and then ran the applet. I prompted to download plugin-1.2. Clicked ok. The plug-in downloaded and installed. But after that when I run the applet, the applet viewer(browser) loaded for a sec. then disapears.
    Any help please. Thanks.

  • PersistenceService denies permission when running an Applet

    I'm converting an application that uses JWS to run inside a browser. Ok, so it's not just a matter of changing <application-desc> to <applet-desc> (which is just about the only change I made to the jnlp), but the problem I'm getting is not one I expected.
    try {
          URL newURL = new URL(newURLBase);
          InputStream is = ps.get(newURL).getInputStream();
          userProps.load(is);
          is.close();
        } catch (FileNotFoundException fne) {
          // nothing to do
        } catch (Exception e) {
          // any other error is bad
          Globals.nonFatalMsg(null, classId, propsFailureMsg, newURLBase, e.getClass().getName(), e.getMessage());
        }This code is throwing a MalformedURLException. (ps is an instance of PersistenceService). The Message returned by getMessage() is that access to persistent data was denied for the URL.
    This exact code works perfectly well when run from the desktop application. I'm serving the same jar for the application and the applet. So the URL in newURL is exactly the same for both the application and the applet (I'm serving them both from the same IIS web site). Just the HTML and the JNLP are different.
    I thought JWS applets and applications run in exactly the same sandbox. And I thought PersistenceService didn't need any kind of permissions. (Although the JavaDoc does say this can happen.)
    Could this be a Browser issue? I get the same result in FireFox and IE. Could it be a java.policy issue?
    I'm running 1.6.0_20.

    Doctor_Dad wrote:
    I converted Andrew Thompson's JotPad application, which illustrates the use of the Persistence Service in a JWS Application, to run as an Applet and got exactly the same result.
    From which I can only conclude that the Persistence Service doesn't work with Applets.
    Has anyone out there ever used the Persistence Service with Applets? Short story, no. I had your post flagged from when I first saw it, thinking "When I get time.." - but had not found any time yet.
    I'll check the Bug Parade to see if this has been reported...Good idea. It is not quite clear how a variety of the services of the JNLP API should translate to embedded applets. These would namely be.
    - SingleInstanceService // not an applet's right to control browser instances
    - BasicService.showDocument(URL) // replaces the applet page or opens new browser/tab?
    - IntegrationService // 1.6.0_18+ - shortcuts and menu items are not appropriate for an embedded applet.
    I was about to include the PersistenceService in that list, but ultimately it makes every bit of sense to allow embedded JNLP applets to have access to serialisation between runs. The older methods of applets storing data are now probably blocked to the JNLP embedded applets (e.g. creating a cookie).
    If you cannot find anything in the bug DB, please raise a bug report and request the documentation address all these areas.
    Edit 1:
    By 'bug report' above, read 'request for enhancement'. Whether it is a bug depends on Sun's expectation of what they wanted the API to do. ;)
    Edited by: AndrewThompson64 on Jun 15, 2010 10:06 AM
    Edit 2:
    BTW - did you try it with a free-floating applet as well, or just an embedded applet?
    Edited by: AndrewThompson64 on Jun 15, 2010 10:47 AM

  • Applet Error:java.security.AccessControlException: access denied

    Hi,
    I just successful deploy an business component project to oralce 8.1.6 as an EJB Session bean, and
    the test of application module is successful. In the same workspace, I create an new project with
    an applet(which contains only an grid control)as a client of the business component. Everything works
    fine within the Applet viewer, however, when I trying to load the applet in IE5.5 I got the following
    error message in java console:
    Java(TM) Plug-in
    Using JRE version 1.2.1
    User home directory = D:\Documents and Settings\ERic
    Proxy Configuration: no proxy
    JAR cache enabled.
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.debugoutput read)'
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.timing read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.function read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.level read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.show.linecount read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.logging.trace.threshold read)'
    Failed to query environment: 'access denied (java.util.PropertyPermission jbo.jdbc.driver.verbose read)'
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission org.omg.CORBA.ORBClass read)
    at java.security.AccessControlContext.checkPermission(Compiled Code)
    at oracle.aurora.jndi.orb_dep.Orb.<clinit>(Orb.java:24)
    at oracle.aurora.jndi.sess_iiop.sess_iiopURLContext.<clinit>(sess_iiopURLContext.java:9)
    at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:588)
    at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:537)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:274)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.connectToService(AuroraEJBAmHomeImpl.java:179)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.createSession(AuroraEJBAmHomeImpl.java:152)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.initRemoteHome(AuroraEJBAmHomeImpl.java:123)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBAmHomeImpl.<init>(AuroraEJBAmHomeImpl.java:59)
    at oracle.jbo.client.remote.ejb.aurora.AuroraEJBInitialContext.createJboHome(AuroraEJBInitialContext.java:47)
    at oracle.jbo.common.JboInitialContext.lookup(JboInitialContext.java:72)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at oracle.dacf.dataset.SessionInfo._createAppModule(SessionInfo.java:2330)
    at oracle.dacf.dataset.SessionInfo.connect(SessionInfo.java:1799)
    at oracle.dacf.dataset.SessionInfo.openProducerObject(SessionInfo.java:1848)
    at oracle.dacf.dataset.ProducerObject.open(ProducerObject.java:94)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java:1305)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java:1287)
    at broadcastapplet.myBroadCastApplet.init(myBroadCastApplet.java:70)
    at sun.applet.AppletPanel.run(Compiled Code)
    at java.lang.Thread.run(Thread.java:479)
    The Oracle 8.1.6 runs on Win2000, I put the JAR & related zip files in the same machine's IIS webserver.
    Is anyone can help?
    ERic

    Hi Shaji,
    Are you calling a webservice from within an Xacute Query for your applet?  On first glance, it looks like a web service call is being rejected due to security permissions.  If you have a webservice call (or HTTP post/get), can you test it separately with the same credentials as the webpage is using?
    Regards,
    Mike

  • Applet does not work with a proxy server.URgent

    Hi,
    I have an asp page being hosted from a IIS server.
    The asp page has an applet which gets data from a server side component which is hosted as a service on the server side.For connection to the server I am using URLConnection object and trying to connect over a TCP connection.
    The problem occurs when I use an proxy in the middle.
    I have changed the browser settings to include the proxy.
    The following is the error I recieve:
    Full :http://172.25.11.63:4590/
    <-------------------------------->
    OPening input stream
    in Run ::::
    ERROR: Created data socket but can't open stream on
    it.172.25.11.63:4590//
    172.25.11.63:4590//
    java.io.FileNotFoundException: 172.25.11.63:4590//
         at com/ms/net/wininet/http/HttpInputStream.connect
         at com/ms/net/wininet/http/HttpInputStream.<init>
         at com/ms/net/wininet/http/HttpURLConnection.createInputStream
         at com/ms/net/wininet/WininetURLConnection.getInputStream
         at TalkClientApplet.rendezvous
         at TalkClientApplet.actionPerformed1
         at TalkClientApplet.start
         at com/ms/applet/AppletPanel.securedCall0
         at com/ms/applet/AppletPanel.securedCall
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
    ...Disconnecting.
    Following is my code.
    url = new URL("http://" + host +":"+i);
    urlconnection = url.openConnection();
    urlconnection.setDoOutput(true);
    urlconnection.setDoInput(true);
    System.out.println("Successfully opened the URL connection at " + "http://" + host + ":" + i );
              System.out.println ("Protocol: " + url.getProtocol());
              System.out.println ("Host :" + url.getHost());     
              System.out.println ("Port :" + url.getPort());
              System.out.println ("File :" + url.getFile() );
              System.out.println ("Full :" + url.toExternalForm());
              System.out.println ("<-------------------------------->");
    os = new BufferedWriter(new OutputStreamWriter(urlconnection.getOutputStream()));
    System.out.println("OPening input stream ");
    // is = new DataInputStream(urlconnection.getInputStream());
         System.out.println(urlconnection.getInputStream());
    is = new DataInputStream(urlconnection.getInputStream());
    The exact place where I get the error is whn i call URLConnection.openInputStream().
    Usually this error comes with a malformed URL.But the same code words without a proxy.Also I am not making any changes to my code in both scenarios that is with or without proxy.
    Please help.This is urgent and a showstopper

    Thanks for your nice solution, but unfortunatelly it does not work with lines longer than 100 chars with Netscape. It works fine with IE and appletviewer too.
    Example:
    I use this code:
    try {
                URL url = new URL(protocol,hostName,portNumber,URLstring);
                InputStream in = url.openStream();
                BufferedInputStream bis = new BufferedInputStream(in);
                StringBuffer input = new StringBuffer(60);
                int c;
                while ((c = bis.read()) != -1){
                    System.out.print((char)c);
                    input.append((char)c);
                bis.close();
                dataFromServer = input.toString();
            catch(Exception ex) {
                ex.printStackTrace();
            }I use input file test.html with exactly 100 chars ('a')
    Netscape Java Console:
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadataFromServer : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaI use input file test.html with exactly 101 chars ('a')
    Netscape Java Console:
    ?JL?yyxk?cedataFromServer : ?

  • Unable to download images in a swing applet (1.3.1) behind proxy

    Hi
    One of my client have a proxy server and firewall and when they try to access my webserver
    then all the AWT applet are downloaded and rendered on client properly. However, the swing applet written
    using JDK 1.3.1 is downloaded and rendered but it doesn't display anything properly as images
    are not down loaded. I have used media tracker to add images to it like oMediaTracker.addImage( oImage, index );
    and then oMediaTracker.waitForAll();
    Java console display at client looks as follows:
    Java(TM) Plug-in: Version 1.3.1
    Using JRE version 1.3.1 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\toy
    Proxy Configuration: no proxy
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Applet Initialization start...
    Applet Image Initialization start...
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    Opening      http:MyServer/24/x.gif
    Connecting     http:MyServer/24/x.gif with no proxy
    Connecting
    http:MyServer/24/x.gif with cookie "ASPSESSIONIDGQGQQVWC=DLNBDAOABFANEPJFFIGOOIPG;
    JSESSIONID=25Ais2tF1eBkevUhAa2akocfShzNdzyL7yC1I7UhJl7Z6BLZrnQK!
    -1149265879"
    Opening      http:MyServer/40/y.gif
    Connecting      http:MyServer/40/y.gif with no proxy
    Connecting      http:MyServer/40/y.gif with cookie "ASPSESSIONIDGQGQQVWC=DLNBDAOABFANEPJFFIGOOIPG;
    JSESSIONID=25Ais2tF1eBkevUhAa2akocfShzNdzyL7yC1I7UhJl7Z6BLZrnQK!
    -1149265879"
    Opening     http://MyServer/sun/beans/infos/PanelBeanInfo.class
    Connecting     http://MyServer/sun/beans/infos/PanelBeanInfo.class with no proxy
    Connecting http://MyServer/sun/beans/infos/PanelBeanInfo.class with cookie "ASPSESSIONIDGQGQQVWC=DLNBDAOABFANEPJFFIGOOIPG;
    JSESSIONID=25Ais2tF1eBkevUhAa2akocfShzNdzyL7yC1I7UhJl7Z6BLZrnQK!
    -1149265879"
    Opening http://MyServer/java/awt/ContainerBeanInfo.class
    Connecting http://MyServer/java/awt/ContainerBeanInfo.class with no proxy
    Connecting http://MyServer/java/awt/ContainerBeanInfo.class
    Client machine tries to access these images but i never receive a call at web server end when i see
    IIS log.
    CLient environment:
    -Windows 2000/XP/NT
    -Internet explorer 6.0 SP1 or IE 5.5 SP2
    with connection->LAN Setting->Use Automatic configuration script(only checked)
    -Java Plugin configured like proxies->Use Browser Setting
    -JDK 1.3.1 plug in at client(downloaded and Installed automatically on demand)
    -Object tag used to download applet and plugin
    -Firewall and proxy(i don't know about vendor)
    My webserver environment
    Windows 2000/iis 5.0 with anonymous authentication and
    cache-control header set to no-store (so that proxy doesn't cache anything)
    QUESTIONS:
    ~~~~~~~~~
    Q.1. When i try from home network that has a proxy then everything works fine. At client site everything except
    image download works fine. I mean jars are downloaded and i can see anything drawn using JAVA API.
    When i try from home i see following java console trace
    Java(TM) Plug-in: Version 1.3.1
    Using JRE version 1.3.1 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\wuko
    Proxy Configuration: Automatic Proxy Configuration
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    Applet Initialization start...
    Applet Image Initialization start...
    Opening http://MyServer/24/connec.gif
    Connecting http://MyServer/24/connec.gif with proxy=197.168.1.100:808
    Connecting http://MyServer/24/connec.gif with cookie "ASPSESSIONIDQQGQQCYU=GBJFAOABCJFPDMGFHEKLDACA; JSESSIONID=26yu5m1b4upVuXoAoDmtMbWXQmetQpyzqjFANszo9vFubujT4qGX!-1149265879"
    Opening http://MyServer/24/cool.gif
    Connecting http://MyServer/24/cool.gif with proxy=197.168.1.100:808
    Connecting http://MyServer/24/cool.gif with cookie "ASPSESSIONIDQQGQQCYU=GBJFAOABCJFPDMGFHEKLDACA; JSESSIONID=26yu5m1b4upVuXoAoDmtMbWXQmetQpyzqjFANszo9vFubujT4qGX!-1149265879"
    etc
    I can't set the plugin at client to use automatic script just like IE browser uses. This option is not supported in JRE1.3.1. Looks to be supported in JRE1.4.1. My client doesn't want to set manual proxy ip and port in plugin as they don't want to reveal this info to everyone within the company for security reason.
    Q.2. Why some classes like PanelBeanInfo.class, JAppletBeanInfo.class are downloaded
    from my server while it doesn't exist at my webserver. Any thing stupid IE or plugin doing
    at client. Any Idea?
    Thanks in advance for any help.
    Ratan

    Thanks to Mike and other friends who already replied on this topic.
    Here is my research analysis:
    Answer to Question 1:
    ~~~~~~~~~~~~~~~~~~~~~
    The solution is to bundle all the images with JAR. Bundle with jar whichever needs it. However, it might require duplicacy.
    Image img = null;
    try
    img = Toolkit.getDefaultToolkit().getImage(getClass().getResource(fileName));
    catch (Exception e) { }
    In this case make sure that you have image at the same location where you access it. For example if you have to access an image in package class com.awt.ui.MyClass then your image should also be at location ..\com\awt\ui
    Note: It will require image duplicacy in your JAR but it solves the problem. It gives the advantage of fewer download from server.
    Answer to Question 2:
    ~~~~~~~~~~~~~~~~~~~~~
    IE treats applet as an active-X and try to look for these classes in your JAR. SUN has stopped its support in JDK1.3.1 and plus. What one can do is to create dummy classes with these names and bundle it with your JAR. You have to create these dummy classes if you enable Basic authentication on your web server then browser will try to look for these classes on the server and continue to prompt you for login and password. It might bother your customer un-necessarily to enter login and password too many times prompted by plug-in (plug in).
    --Ratan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Cant figure out whats wrong with my applet, help pls??

    this applet checks a string against one in a database then if passwords match, a new url is opened. the applet loads in webpage with no problems. it just doesnt seem to work. have granted full access to code base in policy file.
    heres the code:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.applet.*;
    import java.sql.*;
    import java.net.*;
    public class LoginApplet extends Applet implements ActionListener
        Panel top;
        Panel bottom;
        TextField nameField;
        TextField passField;
        Label userNameLabel;
        Label passwordLabel;
        Button loginButton;
        public void init()
            setSize(230,200);
            setBackground(Color.white);
            // Create panels, labels, and text fields
            top                = new Panel(new FlowLayout(FlowLayout.LEFT));
            bottom                = new Panel(new FlowLayout(FlowLayout.LEFT));
            nameField           = new TextField(15);
            passField           = new TextField(15);
            userNameLabel      = new Label("User Name:", Label.LEFT);
            passwordLabel      = new Label("Password:   ", Label.LEFT);
            loginButton          = new Button("Login:");
            loginButton.addActionListener(this);
            // Mask the input so that people looking over your shoulder
            // won't be able to see the password
            passField.setEchoChar('*');
            // Add items to their panels
            top.add(userNameLabel);
            top.add(nameField);
            top.add(passwordLabel);
            top.add(passField);
            bottom.add(loginButton);
            // Set the applet layout
            setLayout(new GridLayout(3,3));
            // Add the panels to the applet (skip this
            // part and you won't see the panels on screen)
            add(top);
            add(bottom);
        public void actionPerformed(ActionEvent e)
                   String name      = nameField.getText();
                   String pass      = passField.getText();
                   try
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                        // set this to a MS Access DB
                        String filename = "e:/iain/College/Y4/SWP/Program/website/database/loginDetails.mdb";
                        String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
                        database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
                        // now we can get the connection from the DriverManager
                        Connection con = DriverManager.getConnection( database ,"","");
                        Statement s = con.createStatement();
                        s.execute(" SELECT [password] FROM logindetails WHERE [username] = '" + name + "' "); // select the data from the table
                        ResultSet rs = s.getResultSet(); // get any ResultSet that came from our query
                        if (rs != null) // if rs == null, then there is no ResultSet to view
                             while ( rs.next() ) // this will step through our data row-by-row
                                  String passtmp = "";
                                  passtmp = passtmp + rs.getString(1);
                                  if(passtmp.equals(pass))
                                       String url = "E:/iain/College/Y4/SWP/Program/website";
                                       Runtime rt = Runtime.getRuntime();
                                       String[] callAndArgs = {"\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"", url };
                                       try
                                            Process child = rt.exec(callAndArgs);
                                            nameField.setText("");
                                            passField.setText("");
                                       catch (Exception eee)
                                            eee.printStackTrace(System.err);
                                  else
                                       System.out.println("Invalid Password " +name);
                                  s.close(); // close the Statement to let the database know we're done with it
                                 con.close(); // close the Connection to let the database know we're done with it
                   catch (Exception ee)
                        System.out.println("Error: " + ee);
    }

    this is the initial error, when applet is run:
    java.security.policy: error adding Entry:
    java.net.MalformedURLException: unknown
    unknown protocol: eI don't know where that's from that code, but e isn't a protocol. If it's a file, you should append "file:///" to the full path.
    then when trying to read from db:
    Error: java.security.AccessControlException: access
    denied (java.lang.RuntimePer
    mission accessClassInPackage.sun.jdbc.odbc)
    didnt think of running it through applet viewer.
    the whole thing will be running on the same server
    using IIS over a LANYou don't connect to a local file system thru an applet without a signed applet. Period.

Maybe you are looking for

  • Hi, I accidentally deleted a project in trash. How do I get it back into final cut pro X. It is still sitting in trash,

    Hi, I accidentally deleted a project in trash. How do I get it back into final cut pro X. It is still sitting in trash.

  • Multiple Picture files

    Hi, I have 120 png photos all named in sequence. Im trying to highlight them all in the library and drag them to the stage. I want flash to automatically distribute them to individual frames. Is there a way to do this so I dont have to manually line

  • Submit Actionin JSR-168 do not work

    I have istalled the SAP CE 7.2 trial Version. If i try to test the guessNumber portlet an type an number into the input field and press the submit button it only refreshes the portlet but not show the next page. in 7.1. this works. This behaviour is

  • How to save PDF's after opening them in Safari.

    I try to safe the PDF ( a syllabus for college) and even though the shows an icon that looks like an arrow pointing down to a computer screen, clicking the icon does nothing. So i was wondring how do I save it to a folder in my Mac?

  • Photoshop Elements 7  Windows

    I'm trying to install on a 2nd computer; I'm getting the error 1324 message: "the path custom shapes contains an invalid character." It won't let me continue installation. Any ideas?