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.

Similar Messages

  • Help regarding applet for querying client's MAC?

    Please help with an applet and java code that uses Runtime.getRuntime().exec("ipconfig -all") and gets the client's machine MAC address?
    If any one already worked with applets for querying client mahchine MAC , please give me a solution.

    remus.dragos wrote:
    vasu.mtech wrote:
    I am giving an explanation where I want this:
    We have an application, where user will be given a specific machine(with one MAC) and have to login from there only. If he tries to login from different machine with same user id, we should throw an error message. That's concept. We know that this reduces/kills operatability of the user from different machines.
    But we shouldn't allow the user operating from diffrent machines.What happens if the admins NIC burns? And he gets a news one? He can't log in until you manually change his
    MAC in the database ???Database? That's not secure!
    It has to be hardcoded into the exe (guess what the kid's next question will be?).

  • A function can not be used in Applet.what's wrong?

    Here is a function.
    private String LoadFile() {
    String input;
    String output="sssssdsdsddf";
    try{
    FileReader f=new FileReader("shu.txt");
    BufferedReader in = new BufferedReader(f);
    while ((input = in.readLine())!= null){output=output+input;}
    in.close();
    }catch(IOException e) {
    System.err.println("Exception caught: " + e.getMessage());
    return output;
    It can be used in Java Application,and work well.but can not be used in Applet,it does not work.what's wrong?

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1215-security.html#sidebar1

  • A function can not be used in Applet.what' wrong?

    Here is a function.
              private String LoadFile() {
    String input;
              String output="sssssdsdsddf";
              try{
              FileReader f=new FileReader("shu.txt");
    BufferedReader in = new BufferedReader(f);
    while ((input = in.readLine())!= null){output=output+input;}
              in.close();
              }catch(IOException e) {   
                   System.err.println("Exception caught: " + e.getMessage());
    return output;
    It can be used in Java Application,and work well.but can not be used in Applet,it does not work.what's wrong?

    Don't you think it would be a bit of a security risk if any applet you downloaded from the web (unknowingly) could read/write to your file system....
    Applets have strict security applied to them, and file i/o is one of the restrictions. There are ways around it, but for the moment I'd suggest you build a bridge and get over it.
    Cheers,
    Radish21

  • Using JarSettings to generate EJB client jar, but supported classes missed

    Appreciated for any comments in advance.
    I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
    Please advise how I can add the implementation of this interface to client jar?
    Best Regards,
    James

    Hi James,
    I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
    I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
    - Matt

  • How can I display some OrdImages using a Applet in html or Jsp?

    hi
    I want to use a applet to display some images retrieved from intermedia OrdImage Object.
    Now ,I know that a applet can display some image objects or some images with their own filepaths. But we can get ordimag objects from Oracle database.And we can image data or image properties by ordimage java mathod. It is in html/Jsp environment. So how can I transform from ordimage to applet?? I appreciate someone who can help me!
    Bill

    Do you mean applet or Servlet?
    An Applet is java code that is downloaded over the web and runs in a web browser environment. Is this what you are doing?
    I suspect you are really talking about servlet/JSP environments, and the ability to include images from the database in a web page.
    In either case (applet or servlet), you want to be able to access images via a URL. For a Servlet/JSP/web page, this URL will be specified in a HTML <IMG> tag with a key as a parameter to the image you wish to view. Images are not in-line downloaded in a web page. They are access after the HTML is loaded, and are accessed with URLs, sometimes relative URLs rather than fully specified URLs.
    To deliver images to the web from the database using the PL/SQL gateway and iAS, where the procedures are generated by a wizard, see:
    http://otn.oracle.com/software/products/intermedia/htdocs/descriptions/imedia_code_wizard.html
    You can create a simple servlet (JSPs can not deliver binary data) that delivers database images using java classes. See:
    http://otn.oracle.com/software/products/intermedia/htdocs/descriptions/servlets_jsp.html
    http://otn.oracle.com/sample_code/products/intermedia/htdocs/intermedia_servlet_jsp_samples/imedia_servlet_jsp_readme.htm
    for a sample.

  • Can't sign in using any 3rd party email client with my iCloud account on any Mac. Tried every settings, My iCloud only works with Mail.app

    Can't sign in using any 3rd party email client with my iCloud account on any Mac or any other Mac. My iCloud will only work with Mail.app. All the clients I tried work perfectly well as long as I sign in with somebody else's iCloud account. But mine won't work no matter the client (Postbox, Unibox, Airmail...) and no matter the computer.
    I can access my account on iCloud.com, but I can't use email clients without getting error messages prompting me to check my password or login.
    I was able to use those clients in the past but a couple of months ago I got logged out of Airmail and the issue started just like that!
    I tried every possible mail server settings including the following:
    IMAP information for the incoming mail server
    Server name: imap.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 993
    Username: The name part of your iCloud email address (for example, emilyparker, not [email protected])
    Password: Your iCloud password
    SMTP information for the outgoing mail server
    Server name: smtp.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 587
    SMTP Authentication Required: Yes
    Username: Your full iCloud email address (for example, [email protected], not emilyparker)
    Password: Your iCloud password

    Those are the correct settings, and they work with any email client that supports Imap.
    Try again.

  • Loading a text file in a gzip or zip archive using an applet to a String

    How do I load a text file in a gzip or zip archive using an applet to a String, not a byte array? Give me both gzip and zip examples.

    This doesn't work:
              try
                   java.net.URL url = new java.net.URL(getCodeBase() + filename);
                   inputStream = new java.io.BufferedInputStream(url.openStream());
                   if (filename.toLowerCase().endsWith(".txt.gz"))
                        inputStream = (java.io.InputStream)(new java.util.zip.GZIPInputStream(inputStream));
                   else if (filename.toLowerCase().endsWith(".zip"))
                        java.util.zip.ZipInputStream zipInputStream = new java.util.zip.ZipInputStream(inputStream);
                        java.util.zip.ZipEntry zipEntry = zipInputStream.getNextEntry();
                        while (zipEntry != null && (zipEntry.isDirectory() || !zipEntry.getName().toLowerCase().endsWith(".txt")))
                             zipEntry = zipInputStream.getNextEntry();
                        if (zipEntry == null)
                             zipInputStream.close();
                             inputStream.close();
                             return "";
                        inputStream = zipInputStream;
                   else
                   byte bytes[] = new byte[10000000];
                   byte s;
                   int i = 0;
                   while (((s = inputStream.read())) != null)
                        bytes[i++] = s;
                   inputStream.close();
            catch (Exception e)
              }

  • Computerised call from PC to a mobile using java applets

    i want to know whether it is possible to make a call from PC to mobile using java applets. Please give me a correct reply with proof.

    The situation is like this.
    We are transfering the JAR file from the PC to the Mobile using Bluetooth.
    Our J2ME project is already install on Nokia's 6600 and given to the salesman's on the field. Now i have updated my software and i want to upgrade the same on their mobiles. For this i can't call all the 2000 salesman's who are all over the country (India) to my place to get the latest software installed and configure.
    If i have a GPRS like solution for transfering my file from my PC to the remote mobile. I would be better. If you know any this related to this kindly reply me.

  • How to use mousedown applet function in swing?

    hai,
    i need to use the applet mousedown function in swing..
    is there any way to use it or any other alternative is available for this?
    if can provide me a sample code.

    >
    i need to use the applet mousedown function in swing..>There is no such class as 'applet' in the JRE, Swing has an upper case 1st letter, functions in Java are generally referred to as methods, and there is no 'mousedown' method in the JRE.
    OTOH a Swing JApplet inherits the mouseDown method from Component, and it was deprecated in Java 1.1. The documentation (JavaDocs) provides instructions on what to use instead.
    >
    is there any way to use it or any other alternative is available for this?
    if can provide me a sample code.>If can provide me cash. Short of that, you might actually need to do some research/coding of your own.
    As an aside. What does any of this have to do with Java 2D?

  • How to attach files using an applet

    hi,
    i want to know how can i use an applet to upload or attach files in my application
    help me

    Hallo there,
    I am intrested on the same topic but I am not so good to modify the sound sdk demo. Is there anyone willing to share some code?
    Thanks
    Matteo

  • Using swing applet in IE

    Dear,
    Is there any way to use swing applet in IE.
    Thanks,

    If you are trying to make your code workable with Microsoft's VM, then I'd say you are looking for trouble. That VM's version is 1.1.4, if I'm not mistaken.
    Better stick to the JRE 1.4 with the plugin.

  • GDI object leak using an applet with Java Plugin 1.4.2_02

    We have an application where we use an applet to draw some graphs. The applet has an interface to update the graphical data using Javascripts. Now duing every graphical update of the graph there a leak of the GDI objects. Over time the display on the machine gets frozen due to lack of resources.
    This problem is happening with IE 6.0 using Sun Java Plug-in 1.4.2_02.
    Has anybody else seen this problem. Is there any work aorund for this issue.

    The code is not leaking. This has been verified.
    The problem has been fixed in 1.5.0 (5.0) Beta 2 version but I don't know then final release of this is going to be. Also using a beta version now is not an option.
    The 1.4.2_04 did not fix the GDI leak that I am seeing, I was hoping it would.

  • SDK 1.4.2: does the required JRE/Plugin undermine the use of applets?

    I have overcome the problems of running applets under SDK 1.4.2 by installing the required plugin. Now everything runs fine again, but I am left with one crucial question. For me it's no problem to download those 30+Mb, but how can I expect people visiting my webpages to do the same? it's more likely that this barrier will stop people visiting the page.
    I think the problem is limited tot those having Microsoft OS's, but that's quite a lot of them out there!
    I am thinking of uninstalling and downgrading to an older SDK version, but that seems a short-term solution, or is not?
    Is there a good alternative? The one Microsoft recommends (tranferring to C#,J#) clearly is not because then the situation is reversed: only Window's users can visit the page.
    I read a lot of questions in the forums regarding the plugin, but not regarding the use of applets. Do I miss a crucial reason why applets are not less attractive under SDK1.4.2 than before?
    I would be happy if you would share your ideas. Thamks, Marc

    well, what you can do is limit yourself to 1.1. The reason you would do this is because pretty much any VM can run it (including Microsoft's). The problem is there's alot of useful features missing. For example if you were working with pixels on an image, you have to use the slow PixelGrabber instead of the quick BufferedImage. A bigger kick than that is that there isn't any swing.
    and by the way, if you choose to limit yourself to 1.1, dont forget to compile with:
    javac -target 1.1 yourFile.java
    ...or it wont work.

  • How can I use a applet in a JSP file?

    hi
    I failed to use applet in a jsp file.My workspace is a BC4J type. I put the applet's source file in business component project.the jsp is in JSP project.
    The jsp file calls applet by <jsp:plugin></jsp:plugin> style.
    The error is can't find the applet class.
    why? Thank someone for give me help.

    Actually using jsp applet tags does not mean that it is taking care of that the classes are available. It simply renders the Applet tag tothe JSP page. If e.g. teh codebase is specified as /java/, then there should be a mapping to the Java class location with thename of /java/. If codebase is not provided, then the Java class must be in the classpath of the JSp servlet.
    Frank

Maybe you are looking for