Tomcat can't detect the class file of the JApplet.

Hi,
I am relatively new in the applet field. I am trying to invoke an JApplet through JSP.
Problem is that i have to package the JApplet class files as it has to access other packages. also the JSP with the embedded JApplet exists in a different folder from the JApplet class files.
I am getting the class not found exception.
Context Path: http://localhost:8080/sncdatagate
folder structure as follows.
sncdatagate\jsp\myApplet.jsp
sncdatagate\WEB-INF\classes\datagate\ui\myApplet.class
package for myApplet.java : datagate.ui
The JSP code is as follows :-
<jsp:plugin
type="applet"
code="datagate.ui.myApplet"
codebase="/sncdatagate/"
width ="700"
height="400"
iepluginurl="http://java.sun.com/products/plugin/autodl/jinstall-1_3_1_01a-win.cab#version=1,3,1,1"
nspluginurl="http://java.sun.com/products/plugin/autodl/jinstall-1_3_1_01a-win.cab#version=1,3,1,1"
jreversion="1.3.1_01">
     <jsp:params>
                         <jsp:param name = "encodedString" value="<%=encodedString%>"/>
          </jsp:params>
</jsp:plugin>
The error on Java console is as follows:-
load: class datagate.ui.myApplet not found.
java.lang.ClassNotFoundException: java.io.FileNotFoundException: File not found: http://localhost:8080/sncdatagate/datagate/ui/myApplet.class
     at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
     at java.net.HttpURLConnection.getResponseCode(Unknown Source)
     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)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at sun.plugin.security.PluginClassLoader.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)
Kind help!
Would greatly appreciate any suggestions.
Thank You.
regards,
Priya

The WEB-INF\classes\ folder is meant for servlets and the files insides are accessed thru the "servlet/" folder. To run applets, place them outside of the web-inf folder together with your jsp files.
If your applet has a package, remember to create appropriate folders for it. Eg.
sncdatagate\jsp\myApplet.jsp
sncdatagate\datagate\ui\myApplet.class
<applet
code="datagate.ui.myApplet"
codebase="/sncdatagate/" ...

Similar Messages

  • Tomcat can't locate my class files

    Tomcat can't locat my class file for my javabeans in a jsp page.
    (Tomcat 4.1.24/windows XP)
    I have created inside of webapps a directory thesis and also the WEB-INF\classes and WEB-INF\lib. I don't know what should I put in web.xml so it is basically almost empty.
    this is the error I get where Searcher is my javabean:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:89: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] Searcher seek = null;
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:91: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] seek = (Searcher) pageContext.getAttribute("seek", PageContext.PAGE_SCOPE);
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:94: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] seek = (Searcher) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Searcher");
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:111: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] out.print(JspRuntimeLibrary.toString((((Searcher)pageContext.findAttribute("seek")).getAnalyze())));
    [javac] ^
    [javac] 4 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

    did you create the Searcher class? if so stick it in a package and put it under your web-inf directory. then use an <%@ page import="" %> statement to import the code.
    if you didn't create the class is it in some jar library you downloaded? if so stick the jar file in your web-inf/lib folder.
    -S-

  • TOMCAT CAN�T FIND BEAN CLASSE

    Hello, i am from Argentina. i need URGENT help with tomcat, because i am developing my final thesis.
    I have all my sources in
    C:\jakarta-tomcat-5.0.16\webapps\tesis
    C:\jakarta-tomcat-5.0.16\webapps\tesis\ (archivos jsp)
    C:\jakarta-tomcat-5.0.16\webapps\tesis\lib
    C:\jakarta-tomcat-5.0.16\webapps\tesis\web-inf\classes\edu\tesis\beans
    C:\jakarta-tomcat-5.0.16\webapps\tesis\web-inf\classes\edu\tesis\queries
    C:\jakarta-tomcat-5.0.16\webapps\tesis\web-inf\classes\fede\servlets
    my problem is that when i execute the login.jsp through the browser in this way
    http://localhost:8080/tesis/login.jsp
    tomcat can�t find the edu.tesis.beans package
    In compiled jsp class i can see this
    package org.apache.jsp;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import edu.tesis.beans.*;
    so, the problem is that tomcat set package org.apache.jsp; to my jsp, so it can�t find edu.tesis.beans package.
    This is my context path that is in $CATALINA_HOME/conf/server.xml file
    <Context path="/tesis" docBase="C:\tomcat\webapps\tesis"
    debug="9"
    reloadable="true"
    crossContext="true"/>
    This is an extraction of my jsp file
    <html>
    <head>
    <%@page import="edu.tesis.beans.*"%>
    </head>
    <body>
    <jsp:useBean id="universidad" class="edu.tesis.beans.Universidad" scope="request" />
    <form action="servlets/fede.servlets.ServletMaxwell" method="post"><BR><BR><BR><BR>
    PLEASE, I NEED AN URGENT HELP!!!!
    THANKS,
    FEDERICO

    Tampoco te preocupes porque Tomcat cambie el paquete de las p�ginas jsp. Eso es un comportamiento normal. Adem�s nota que el paquete de tu tesis es importado en la clase generada a partir del jsp, o sea que deberia encontrarla si est� en el lugar correcto.
    Otra cosa que veo extra�a en tu estructura de directorios es que existe un directorio "lib" por fuera de WEB-INF. Si este contiene beans en forma de paquetes jar, deberia estar dentro de WEB-INF

  • How can I convert a class file to Exe file

    hai
    How can I convert a class file to Exe file

    Please search the forums before asking questions - this has been answered hundreds (really!) of times.

  • Tomcat Web-server uses old .class files

    Hi Friends,
    My Tomcat webserver uses old .class files. The problem persists even if I delete old class files. The new ones are formed but then if i again recompile, the new-old ones are used :)
    Am I doing something wrong????
    Please suggest!!

    I have experienced this problem before as well. Tomcat seems to cache compiled class files for better speed. To get Tomcat to reload class files that I've recently recompiled here is what I do:
    1. Go into the Tomcat server administration area (http://localhost/admin)
    2. Choose the context that is using the classes that you want to reload (from Service / Host)
    3. Make sure reloadable is set to true
    3. Click save, and then commit changes
    Hope this helps, but if there is a better way to get Tomcat to use the most recent class files I would love to hear it!

  • How can I detect the PC show down event?

    I want to save a file to a certain destination once the PC shut down event happened.
    And the save process must be proceeded prior to the PC shutdown.
    How can I detect the PC shut down event?

    Hi there
    Try the "Application Instance Close?" Event.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • I Tune can't detect the Phone

    Recently I have resored Every thing enternally in phone. After that the phone only got charging not starting only shows the apple logo...even  itune can't detect the phone...so what should i do?....howi recover it?

    Put the device in DFU mode (google it) and restore as new via iTunes.

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • WRT54GS Can not detect the router

    We lost the internet connection a few days ago for a couple of hours and since then had to reset the modem and when I try to set up the router with the Easy Link Advisor I get can not detect the router.  I am using the router to access the internet and it can't be detected???
    I have powered it off enough times and then some and need to get this running to use the laptops.
    I am running ver 7 firmware that it came with but I don't know what the exact version I am running or gor that matter where to find it.
    Thanks

    okay went through the firmware upgrade and installed it through 192.168.1.1 to admin tab and upgrade. it got to the reboot part and hung there for a bit, i hit continue or what ever it said and came back upwith a dns error and page unreachable. version installed is what i downloaded 7.50.5. i am still having the same problem, all the lights are lit that are suppossed to be lit, and i am on the internet and running through the router, and when i go into easylink advisor and start the setup process i have to go through the entire thing including selecting the router (which it should know what router it is) though removing the power cord and waiting and still told that it can not detect the router. i have no idea where to go from here. thanks!

  • I have a hp pavilion dv4-2160us and the dvd/cd reader is not working. it can't detect the disk too.

    I have a hp pavilion dv4-2160us and the dvd/cd reader is not working. it can't detect the disk too. i've done everything on the hp website to fix it (reinstall the driver, etc.), but nothing seems to help.  can anybody help me with my problem? thanks!

    When you say DVD drive is not working and cant detect disks, Is the Optical drive listed in Device manager and My computer? Is not reading any specific disks or all kinds of disks ?
    Also have you tried all possible troubleshooting steps found over here
    //Click on Kudos and Accept as Solution if my reply was helpful and answered your question//
    I am an HP employee!!

  • How can i detect the windows version

    Hi,
    How can I detect the windows version from Forms 6i?
    I was used get_application_property(operating_system); But it only return MSWINDOWS, MSWINDOWS32, WIN32COMMON.
    Any function or way can return the exact windows version(98/ME/NT/XP)?
    Regards, Wing

    You may use Win_Api_Environment API call to get windows version.
    I have sample code on my home PC if you need code send mail at [email protected]

  • How can I detect the lable of CD or hard drive?

    hi all
    How can I detect the lable of CD or hard drive?
    thanx ;)

    Hi,
    Not to my knowmledge... you must use JNI to access the OS methods for that.
    JRG

  • HELLO, I UNLOCKED MY 3GS PHONE THEN RESTORED  IT TO FACTORY DEFAULTS THROUGH ITUNES THEN COULD NOT REACTIVATE THE IPHONE, I TRIED SEVERAL TIMES USING WIFI AND ITUNES, IT CAN NOT DETECT THE SIM, SOMEONE PLEASE HELP ME WITH FOLLOW UP, THANKS

    HELLO, I UNLOCKED MY 3GS PHONE THEN RESTORED  IT TO FACTORY DEFAULTS THROUGH ITUNES THEN COULD NOT REACTIVATE THE IPHONE, I TRIED SEVERAL TIMES USING WIFI AND ITUNES, IT CAN NOT DETECT THE SIM, SOMEONE PLEASE HELP ME WITH FOLLOW UP, THANKS

    sir as ur reply i guess that my phone has locked again as i restored to factory defaults, now if i try with a att active sim then can i activate the iphone ? and i think  i need to unlock again if i want to use sim other then att right ? pls reply me in details asap

  • My macbook pro can't detect the NAS after the NAS reboot.

    After I reboot the QNAP NAS, my macbook pro can't detect the NAS. I can't find the NAS drives in Finder even I input the new IP address. I remember my macbook pro was able to detect the NAS automatically before. Please help.

    Jp150981 wrote:
    . is the disk dying? should i just change it?
    Yes.  If you have a non retina MBP, look at some options listed here:
    http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/
    Ciao.

  • How can I detect the vertices of a rectangle in my image ?

    I have applied a gradientMagnitude operator to my Image, and now I can see the shape of a rectangle with also other lines.
    How can I detect the vertices of the rectangle in my image?
    thank you

    Right mouse click the song and select "Get Info", go to option tab and check both Start Time and Stop Time.  Type in the Start and Stop time then click OK

Maybe you are looking for

  • ERROR WHILE FORWARDING VOICE MESSAGE FROM NOTES VIEWMAIL TO ANOTHER VOICEMAIL USER IN UNITY CONNECTION

    Hello All, I am facing problem while replying/forwarding or sending a NEW Voice Message from ViewMail integrated with  IBM LOTUS  Notes 8.5 to the other Voice Mail User Configured in Cisco Unity Connection.The ViewMail Version is 8.0.2 for IBM LOTUS

  • Using Audio-line out in MacPro

    Hi, I have recently switched to Mac from Windows. I have a good Altec Lansing speakers which I would like to continue using for sometime. Normally the speakers contains black and green connectors and you connect the green to the audio out. But connec

  • Extract data from AMPLA to SAP BW

    Hi All, My requirement is to extract data from a Non SAP system called AMPLA (SQL Server 2012) to SAP BI system (7.0). I need to consider possible ways for SAP BI to extract data from Non SAP Systems like DB Connect, UD Connect, Web services etc. Doe

  • Internal card reader isn't working

    Hi I have a pavilion (p6300uk) desktop with an internal card reader. The card slot recognises the card but the driver wont read it? Ive gone into the properties for each driver, but they all say the driver is working properly. I have also searched fo

  • UTF ERROR ["../../../src/solaris/npt/utf_md.c":49]

    With java 1.6 on Solaris 10 x86, we are getting this error when using using the flag "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787": UTF ERROR ["../../../src/solaris/npt/utf_md.c":49]: Failed to complete iconv_open() setup Abort (cor