Applet in web

I was not able to view Applet application
in website.I was not able to view applet
image,instead of that Iam getting a
a small cross icon in the box.

Hi mVinu!
Better to have a small cross than a gray box (a fatal error).
Check if Java is enabled (browser) and if JVM version is the right one.
Check the applet declaration, all parameters with detail (sizes, codebase and code assignments, etc)
I suppose it works fine in appletviewer, but some guys forget to compile using the right target.
If it is to be used in IE 5.5 or lower and not using Swing, must to compile using -target 1.1.
Report us about running details to better answer your question.
Best Regards.

Similar Messages

  • Applet in Web Dynpro??

    Hi All,
    Is it possible to open an applet from web dynpro screen?
    And after the user has done few task using the applet, the control should go back to WD screen which is in turn will be embeded inside portal.
    Is this possible to do in WD?
    Pls help.
    Thanks
    Sandip

    Hi ,
    You can create a JSP application.. embed your applet code in it.
    Create a portal component iview out of the par.
    In your webdynpro ,(for versions of NW2004s), there is a feature called suspend and resume plug.
    You can fire a suspend plug to the jsp application url.. do the operation there.. and use resume plug in your portal application to resume operations back  in webdynpro.
    This works both in and out of portal.
    if suspend/resume feature is not required..
    Or you can simply use EPCM.doNavigate() to navigate across apps ..
    Regards
    Bharathwaj

  • Send data from applet to web server

    Hi,
    I want to send data(event notification) to resource through web server using url.
    Like,As long as perticular action or event is occuring I am sending that message to url.
    I reffered Sevlet theory uses HTTPMessage,but I am confused how should start and what would be feasible?
    Even when I run my code I am not finding browser.How should I place an applet in web server page?
    Regards,
    Palak
    Message was edited by:
    palak_shah

    Hi
    I agree usage of HttpClient is a better and a simple method.
    But If your Application Requirements are Simple you may go by using URL & URLconnection Objects in java.net package.
    Just to Add In You Can Checkout the links given below to have a better understanding of how the communication works...
    The Example APPLET code:
    http://mindy.cs.bham.ac.uk/AppletServletExample/EgApplet.java.txt
    The Example SERVLET code:
    http://mindy.cs.bham.ac.uk/AppletServletExample/EgServlet.java.txt
    and the Example AppletDemo Class
    http://mindy.cs.bham.ac.uk/AppletServletExample/EgApplet.class
    Hope this helps :)
    REGARDS,
    RaHuL

  • Java Control Panel wont open at all and any Java Applets crash web browsers

    Hello,
    I recently installed a fresh fully updated copy of Windows 7 Home Premium 64 bit, and I have not for the life of me been able to get Java working at all. Java version is the latest JRE 6U31. I only have Internet Explorer 9 installed but I doubt it is a browser issue since I cannot even open the Java control panel. I have tried using the 32 bit version of Java, and the 64 bit. Anytime I try to open the Java control panel with either 32 bit or 64 bit, I get an error message (click link below to view error message):
    http://i65.photobucket.com/albums/h204/gobigjeff/Java%20Error/javaerror.png
    I can only bring up the Java Control Panel using the command “javaws –viewer” . Anytime I try to load a web page with a Java applet in either 64 bit or 32 bit, it freezes and crashes. I am running Internet Explorer 9 and have tried both the 32 bit and 64 bit browser versions. I saw Java’s recommendation to only use the 32 bit version so I have mainly been trying to get the 32 bit version working 1st, with no success. I have tried ALL of the following steps, and have done some exhaustive research on this problem. It seems others have had this issue as well, with no solution to be found:
    •     Uninstalled and reinstalled only Java 32 bit JRE 6u31 multiple times (Used Javara and reg cleaner to remove all old Java traces)
    •     Uninstalled and reinstalled only Java 64 bit JRE 6u31 (Used Javara and reg cleaner to remove all old Java traces)
    •     Uninstalled and reinstalled bit JRE 7 (Used Javara and reg cleaner to remove all old Java traces)
    •     Used SFC /scannow in safe mode to verify Windows files
    •     Ran spyware and virus scan with no issues detected
    •     Added all java processes to windows firewall
    I am out of solutions here. If anyone has had this problem with Java or knows what I need to do to fix the problem your advice would be greatly appreciated. I don’t think reinstalling windows is the solution because this is a fresh install.
    Edited by: 918650 on Mar 4, 2012 1:16 PM

    I figured it out. I changed the installation folder to C:/Java and it finally worked!

  • Applet hangs web server when upgrading from 1.6 to 1.7

    I've got a client-side printing application which works fine on 1.6 and fails on 1.7 where it essentially hang the server on the connect option to the server and loading the jar file. Specifics:
    PC Client running windows 7 x64
    Browser versions IE9, IE10, Firefox 17.0.1 (PC-client) all fail
    Client PC has latest Java 1.7.0 10-b 18 installed
    Web server is Apache2.4.3 x64 running on Windows 2008 Server R2 through the network
    Jar file is signed and the certificate is loaded
    Apache server is sitting on another server through a network connection. Backrev java to 1.6 and it passes. I've specified the -Djava.net.prefIPv4Stack=true option in the applet call but it doesn't fix the issue.
    The java console loads but then hangs on the connecting portion:
    Java Plug-in 10.10.2.18
    Using JRE version 1.7.0_10-b18 Java HotSpot(TM) Client VM
    User home directory = C:\Users\user
    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
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@1ae81ab
    security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
    security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws
    security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws
    security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy
    security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy
    security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
    security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.
    security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws
    security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws
    security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy
    security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy
    security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
    security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
    security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
    security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
    security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.org.glassfish.external.,com.sun.org.glassfish.gmbal.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
    security: --- parseCommandLine converted : -Djava.net.preferIPv4Stack=true
    into:
    [-Djava.net.preferIPv4Stack=true]
    basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@8bbbf4
    basic: Plugin2ClassLoader.addURL parent called for http://10.100.1.61/patholog/java/patholog/dist/PathologLibS.jar
    security: Blacklist revocation check is enabled
    security: Trusted libraries list check is enabled
    network: Cache entry found [url: http://10.100.1.61/patholog/java/patholog/dist/PathologLibS.jar, version: null] prevalidated=true/0
    cache: Adding MemoryCache entry: http://10.100.1.61/patholog/java/patholog/dist/PathologLibS.jar
    cache: Resource http://10.100.1.61/patholog/java/patholog/dist/PathologLibS.jar has expired.
    network: Connecting http://10.100.1.61/patholog/java/patholog/dist/PathologLibS.jar with proxy=DIRECT
    network: Connecting http://10.100.1.61:80/ with proxy=DIRECT
    network: Connecting http://10.100.1.61/patholog/java/patholog/dist/PathologLibS.jar with cookie "Patholog=vl141e491gffhpc07aupt0rnq5"
    What is most irritating is that a local instance for debugging (i.e. apache2.4.3 x64) running locally and running the application on the same machine) passes perfectly so it appears that it involves a network connection rather than a localhost operation.
    I noticed on a good connection the server returns with ResponseCode 304. I do not see that line in the log on the failing applet load. Apache logs set at debug show no errors even though the operation hangs the server.
    Anyone got any ideas on how to debug and resolve this?
    -Thanks
    -G

    More information:
    Installed jre.1.6.37 (x32 version) along with 1.7.10 (x32 version) and the applet loads. Installed 1.7.10 (x32 version) only on the windows 7 x64 client fails. I've done both the x-java-applet method and the JNLP method and both hang. The JNLP j2se version is set to "1.6+" so in theory 1.7 should jre should work fine without a 1.6.37 loaded.
    I've got wireshark dumps that I'm analyzing and noticed that there two OCSP responses (successful) but nothing after that, specifically where it hangs. Any ideas on how to debug this further?

  • Applet or web-start? How can I package a memory intensive app?

    Dear All,
    I'm new here - I'm learning about Java with a particular project in mind, and looking for advice from people with more experience before I start coding! Your opinions would be very useful.
    I would like to write a small scientific application, to be distributed by the web, easy to run as a normal user (without administrator rights), with a good GUI. So Java sounds very good for this. However, the application will be very memory intensive (and quite CPU intensive) with several large arrays. It may require ~1 to 2 Gb of memory at times. I have three simple questions:
    1) If I write it as an applet, will my users hit memory 'heap size' limits when they try and run it if it tries to use ~1 Gb memory? Can I control this?
    2) If I write it using JNLP (e.g. Sun's Java Web-Start), will my users get memory limit errors if my application tries to use ~1 Gb memory? Can I control this?
    3) If more and more people start using the Java browser plugin, will they get Web-Start installed at the same time? Or will Web-start become less common?
    Any other advice about this choice, problems with web-start or resource hungry applets would also be gratefully received.
    With thanks and best regards,
    andy_g
    (PS: I'm not worried about the performance of Java compared to other languages - I'm worried about hitting memory limits imposed by the JVM settings or Java language!)

    Hi ChuckBing,
    Thanks for your reply - it's given me some valuable information. In light of your post I think I'm going to try a very simple test code which does some simple operations with representative big arrays and see if I can get that working well on a range of machines before I spend time writing the real thing. I hadn't appreciated the need for contiguous memory in the Java heap.
    As for comparing JNLP and applet memory control, after another intensive bout of google searching, I found more information about controlling heap size for applets at:
    https://jdk6.dev.java.net/plugin2/jnlp/
    From my (novice) reading of this page, it seems that from 1.6 you can now control the heap available to an applet in a similar manner to JNLP. I've added this link in case other people stumble across this post with a similar questions about applet memory limits.
    Thanks again,
    andy_g

  • ClassNotFound error while running applet from Web application

    hi everyone,
    I have a web application deployed in Tomcat web server. I have HTML file at the level of WEB-INF. And all class files under WEB-INF/classes. But while ruuning the application it giving following error.
    load: class com.app.AppletTest not found.
    java.lang.ClassNotFoundException: com.app.AppletTest
         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
    Here the HTML file applettest.html
    <html>
         <head>
              <title>Multiple Image Upload</title>
         </head>
         <body>
              <applet code="com.app.AppletTest" width="300" height="300">
              </applet>
         </body>
    </html>
    And Java applet file is
    package com.app;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Graphics;
    public class AppletTest extends Applet
         public void init()
              System.out.println("Init called");
              this.setBackground(new Color(180,200,250));
         public void start()
              System.out.println("Start called");
         public void paint(Graphics g)
              g.drawString("welcome Hello World",50,50);
              System.out.println("Paint called");
         public void stop()
              System.out.println("Stop called");
         public void destroy()
              System.out.println("Destroy called");
    Thanks.

    Hi,
    if u put ur com.app.AppletTest file @ WEB-INF Directry, then this problem will solve easily.
    you have to put applet package(com.app.AppletTest) @ WEB-INF Directry. Since
    Applet is using by html, u have to keep applet with html file.
    if applet class have interaction with other classes, u have to seperate all related class to applet to seperate package and put them @ WEB-INF folder.

  • Corrupted image in applet from web cam

    Hi there I created a little webcam server application that listens to port 8080 for requests, then displays an image. The image is jpeg encoded frame grabbed from a logitech web cam using the java media framework. I got the code from this forum.
    I have tried it across a 56kb modem on four different computers. On three the applet displays the images without problems. On the fourth the image is corrupted like it didn't receive all the data.
    Anyone have any idea why this occurs in one and not the others
    Here's some of the source
    The applet just uses getImage( http://[host]:8080 )
    and media tracker with a thread sleeping for a second
    public class WebCamServer extends JFrame
         // class variables
         private HttpServer webserver;
         private int port = 80;
         private ServerSocket server;
         private ImageIcon gfr;
         private Color backcolour = new Color( 255, 255, 255 );     
         private Player player = null;
         private MediaLocator ml = null;
         private JPanel campanel = null;
         public boolean active = false;
         public Buffer buf = null;
         public VideoFormat vf = null;
         public BufferToImage btoi = null;
         public Image img = null;
    public WebCamServer()
              // initialise Frame with this heading and font
              super( "eyespyfx - Web Cam Server" );
              setFont( new Font( "Verdana", Font.PLAIN, 12 ) );
              // initialise web server
              startServer();
              // set up ServerSocket to listen for requests on port 8080
              try
                   server = new ServerSocket( 8080 );
              catch( IOException e )
                   System.err.println( "Server Socket Error" );
                   System.err.println( e.getMessage() );
                   shutdown();
              // set frame icon to gfr.gif
              gfr = new ImageIcon( "gfr.gif" );
              this.setIconImage( gfr.getImage() );
              // get content pane set a layout
              java.awt.Container c = getContentPane();
              c.setLayout( new BorderLayout( 0, 0 ) );
              // create panel to hold web cam image
              campanel = new JPanel();
              campanel.setLayout( new BorderLayout( 0, 0 ) );
              campanel.setPreferredSize( new Dimension( 320, 240 ) );
              // locate web cam from JMF Registry
              ml = new MediaLocator( "vfw://0" );
              // set lightweight renderer for improved framerate
              Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, new Boolean(true) );
              try
                   // create realized video player
                   player = Manager.createRealizedPlayer( ml );
                   //start player
                   player.start();
                   Component comp;
                   // display the visual component
                   if ( ( comp = player.getVisualComponent() ) != null )
                        campanel.add( comp, BorderLayout.CENTER );
              catch (Exception e)
                   System.err.println( "Exception in creating or displaying player" );
                   System.err.println( e.getMessage() );
              // add campanle to the frame
              c.add( campanel, BorderLayout.CENTER );
              // size & colour of frame
              c.setBackground( backcolour );
              setBounds( 0, 0, 0, 0 );
              setResizable( false );
              setSize( 350, 250 );
              show();
              // active set to true - means software is listening for image requests
              active = true;
         // Thread listener for image requests
         public void execute()
              // while active is true          
              while ( active )
                   try
                        // client connects
                        ClientApplet newclient = new ClientApplet( server.accept(), this );
                        // Grab a frame
                        FrameGrabbingControl fgc = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
                        buf = fgc.grabFrame();
                        // Convert it to an image
                        btoi = new BufferToImage((VideoFormat)buf.getFormat());
                        img = btoi.createImage(buf);
                        // set client thread with image
                        newclient.setImage( img );
                        // start the client thread
                        newclient.start();
                   catch( IOException e )
                        e.printStackTrace();
                        System.exit( 1 );
    // ClientApplet class to manage each Client Applet as a thread
    class ClientApplet extends Thread
         // class variables
         private Socket connection;
         private PrintWriter out;
         private BufferedReader in;
         private WebCamServer control;
         protected boolean threadSuspended = true;
         public Image img;
         // constructor creates a socket on port 8080
         public ClientApplet( Socket s, WebCamServer t )
              connection = s;          
              control = t;
         // grabbed frame set as output image
         public void setImage( Image img )
              this.img = img;
    public void run()
              // image is buffered to create a 2D graphics object               
              BufferedImage bi = new BufferedImage(240, 180, BufferedImage.TYPE_INT_RGB);
              Graphics2D g2 = bi.createGraphics();
              g2.drawImage(img, null, null);
              OutputStream out = null;
              // create an output stream to the socket
              try
                   out = connection.getOutputStream();
              catch ( IOException io)
                   System.out.println("Error getting socket output stream");
                   System.err.println( io.getMessage() );
              // create jpeg encoder on output stream
              // set the image as a parameter
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
              param.setQuality(0.25f,false);
              encoder.setJPEGEncodeParam(param);
              // encode the image through the output stream
              // close IO connections
              try
                   encoder.encode(bi);
                   out.close();
                   connection.close();
              catch ( IOException ioe )
                   System.out.println("JPGE IO exception");
                   System.err.println( ioe.getMessage() );
              // end of thread image is served to webpage or applet
    }

    Hi,
    I don't know how to solve this problem,
    but I want to ask you how you managed to get
    FrameGrabbingControl which is not null.
    I use Logitech QickCam and everytime when I try to get a FrameGrabbingControl from the Player it returns me null?
    Can you help me?
    have you any ideas why I get null?
    WebCamLocator - is OK. If I can use it to record a video clip. But I can't take a single frame..
    Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, new Boolean(true) );
    Player WebCamPlayer = Manager.createRealizedPlayer(WebCamLocator);
    WebCamPlayer.start();
    FrameGrabbingControl fgc = (FrameGrabbingControl)WebCamPlayer.getControl("javax.media.control.GrabbingControl");
    Buffer buf = fgc.grabFrame();

  • Auto log in from applet to web app.

    I'm trying to allow a user to jump from an applet to a web app.
    The applet code I'm pretty sure is complete. It creates a URL and then calls container().getAppletContext().showDocument(new URL(path),name);
    This opens a browser and seems to be sending the correct URL.
    What I have done is send it to a URL like /appName/JumpFromApplet
    Then I have created a filter in the web app to catch anything of that format.
    The doFilter method is being executed and it the if statement is catching it appropriately.
    But when the browser opens up the url is just http://localhost:9080/ with a page cannot be found. I'm not sure what I'm doing wrong. Here is the appropriate code. Am I way off base?
    private static final String LOGGEDIN_URL = "login.do";
    //inside doFilter method
    Object o = httpRequest.getSession().getAttribute("LOGGEDIN");
    if(o == null && url != null
             && url.indexOf(JUMP) > 0) {
         config.getServletContext().getRequestDispatcher(LOGGEDIN_URL).forward(request, response);
    }else {
         chain.doFilter(request, response);
    }edit:
    This is basically the same code as in my LoginFilter, I just changed the URL and of course the if statement.
    Edited by: gmachamer on Jan 22, 2008 9:05 AM

    hmmm, strange. I added the code to the loginFilter as an else if.
    If I enter the url in the browser that the filter is suppose to be catching then it works just fine.
    If I jump from the applet it does not... but when stepping through the code in both instances it looks like everything is the same?
    the else if is what is executed.
    public void doFilter(ServletRequest request, ServletResponse response,
            FilterChain chain) throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest) request;
        Object o = httpRequest.getSession().getAttribute("LOGGEDIN");
        String url = httpRequest.getRequestURL().toString();
        if (o != null
                || (url != null && (url.indexOf(LOGIN_URL) > 0
                        || url.indexOf(LOGIN_FORM_URL) > 0
                        || url.indexOf(EXTERNAL_LOGIN_URL) > 0
                        || url.indexOf(EXTERNAL_LOGIN_FORM_URL) > 0
                        || url.indexOf("images") > 0 || url.indexOf(services) > 0))) {
            chain.doFilter(request, response);
            return;
        }else if(o == null && url != null
                  && url.indexOf(JUMP) > 0) {
              config.getServletContext().getRequestDispatcher("/" + JUMP_URL).forward(request, response);
            return;
        config.getServletContext().getRequestDispatcher("/" + LOGIN_FORM_URL)
                .forward(request, response);
    }Edited by: gmachamer on Jan 22, 2008 9:43 AM

  • Communication between applet and Web app (IE6 works IE7 doesn't)

    I'm not 100% sure this is the correct forum to post this in, but as the communication is initiated from the applet I'm posting it here.
    I have an applet that we are slowly breaking pieces out of into a web app.
    The details are as follows.
    The applet calls a servlet on the webserver with the following code.
    URL url = new URL("http://.................");
    ServletMessage message = new ServletMessage(url);
    InputStream returnStream = message.sendPostMessage(sending);The servlet takes the user credentials and other info that was sent and authenticates the user and stores the info that was passed into the session on the web server. Then based on the users permissions and where they want to go in the web app the servlets redirect method calls
    resp.getOutputStream().print("/AppName/appropriateServlet");This sends control back to the applet (including the url of the servlet that needs to be called) which then calls the appropriate servlet
    container.getAppletContext().showDocument(new URL("http://.............." + returnURL), "Title");Now the problem is that in the first and second servlet the request.getSession() returns two different sessions when running under IE7. IE6 returns reference to the same session.
    I don't know what has changed in IE7 but I was hoping somebody else has run into this, or can suggest a more appropriate forum to post this to?
    Thanks

    So the solution I came up with was when the applet jumps to the web app the first time instead of storing everything in session I store them in a map in the servletContext under their employee number.
    I then send control back to the applet with the url they should call. When the applet calls the web app for the second time it includes their employee number as parameter in the url.
    A Login filter then first checks to make sure it isn't on the first call, and checks to make sure they aren't in session... if so it pulls the map out of servletContext and transfers all the data back to the session and clears that user out of servletContext.
    So it stores the user in the servletContext during the transfer back and forth, then back in session like normal.
    I'm pretty sure it is going to work, but I can't test it because our mainframe test region is down which is what handles the authentication of the applet.

  • Embed java applet in web dynpro

    Hi experts,
    is it possible to embed a java applet into a web Dynpro application. Or have I to use a jsp / Servlet / AbstractPortalApplication / (JSP)Dynpage
    Regards
    Fllo

    Hi
    yes its possible...
    go thorugh these docs..:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/91b8c890-0201-0010-c787-be96f6fade89]
    [http://www.vogella.de/articles/SAPWebDynpro/article.html]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8382535d-0d01-0010-dbb5-d3d41dfefd10]
    hpe it hlps u..
    Regards,
    Khushboo

  • Distributing Applet in Web Server

    Hello,
    I am in the process of creating a new web server. Although, I have found an error that when you retrieve applets from my server they don't work, whereas they do normally if locally. The file is send exactly as it is through a binary transfer. I am wondering if Java has any sort of header information or something that must be attached to the transfer while being sent or if anyone has encountered this before.
    Thank you

    Well, as I said I am creating a web server. It works by when it recieves a request for a file, it opens the file in binary mode and transfers it as binary to the program that requested it (the web browser).
    I have created an applet that works fine when it is run locally on my desktop, but when I try to run it through my web server by setting the codebase equal to "http://localhost/" the applet will not run. It returns a NullPointerException and I am not sure why.
    Thank you for your help

  • Adding Applets to Web Applications

    Is it possible to add other components to the same Java Server Page where the Applet is?
    Thank You,
    Manuel Braz

    The problem with this is that I have not been able to get this to work when creating my own applets in JSC or NB5.5 (See my current post from today / yesterday). I am still hoping someone can help with a solution to the java class not found browser error.
    There is a FAQ about this problem and it suggests creating a servlet to steam the java applet to the jsp page based on a relative path (as the .class file is stored in the WEB-INF folder and inaccessable to the jsp page) but does not go so far as to give an example how to do this... does anyone know how to do this?. (Please don't feel I am hijacking this thread - I do believe it is relevant to the original post).

  • Need to have an applet in web browser-- HELP

    I have been trying to have the prefuse Graphview applet in a web browser...
    The following is my HTML file
    <html>
    <head>
    <title>Prefuse Demo</title>
    </head>
    <body>
    <applet code="GraphView.class"
    archive="demos.jar,prefuse.jar,prefuse.src.jar"
    width="400" height="400">
    </applet>
    </body>
    </html>
    I am getting the following error when running on the web browser
    java.lang.NoClassDefFoundError: GraphView (wrong name: demos/applets/GraphView)
    at java.lang.ClassLoader.defineClass1(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 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)
    I have been on this for 2 days.....really frustrated......
    1)All classfiles (GraphView.class) / jar files (got using the build.bat prefuse and build.bat demos) and
    the htmlfile (GraphView.html) is stored in C:\Documents and Settings\Rudolph\Desktop\prefuse-beta\demos\prefuse\demos\applets
    Can u shed more light on this problem.
    Thanks
    ---! Rudolph

    Try specifying the 'code' attribute for the applet tag in the following manner:
    <applet code="org/apache/maven/plugins/grafo/gui/applets/GraphViewApplet.class"
    archive="maven-grafo-plugin-1.0-SNAPSHOT.jar,prefuse-beta-20060220.jar"
    width="800" height="500">

  • CAN'T POST APPLET ON WEB PAGE (HELP!!)

    I've successfully made my first applet. Or should I say my .class file and i'm having some difficulties. I've posted my .class file on my web page and here's the source code:
    <html>
    <head>
    <title>
    none
    </title>
    </head>
    <body bgcolor="black">
    <applet class="attempt.class" width="600" Height="600"></applet>
    </body>
    </html>
    I'm using angelfire for posting my applet. The solution is prolbly right under my nose but I don't know where to start looking.
    any solutions are welcome
    thanks in advance George

    You need a much more complex applet tag if you build anything that uses Java2 classes. Those simple applet tags only work with the old 1.1 libraries.
    http://java.sun.com/products/plugin/1.3/docs/html_converter.html

  • Applets and Web Services

    May I connect to a web service using an applet?
    When I run my applet with appletviewer I have a answer from web service. But if I run my with applet in a browser I do not have any answer from web service.
    Any suggestion?
    Thanks

    Adrian
    Don't forget this:
    "Applets, like other Java programs, can use the API defined in the java.net package to communicate across the network. The only difference is that, for security reasons, the only host an applet can communicate with is the host it was delivered from."
    http://java.sun.com/docs/books/tutorial/applet/practical/server.html
    success
    -Jan

Maybe you are looking for