简体   繁体   中英

class not found exception on applet

I am trying to load applet on browser using html <APPLET> tag under index.jsp page in eclipse.

<APPLET archive="VitalTrackApplet_MOD.jar" code ="vitaltrackapplet_mod/VitalTrackApplet_MOD.class"
                    width="100%" height="650">

    <PARAM name="opdid" value="1234" />
    <PARAM name="patientid" value="12" />
    <PARAM name="replay" value="false" />
    <PARAM name="hostpname" value="lifecare" />
    <PARAM name="pname" value="anil" />
    <PARAM name="createdate" value="12/17/2012" />
    <PARAM name="filename" value="example" />

</APPLET>

I have put VitalTrackApplet_MOD.jar under WebContent/WEB-INF/lib folder. but when I run this index.jsp every time it show class not found excepion .

..put VitalTrackApplet_MOD.jar under WebContent/WEB-INF/lib folder.

http://localhost:8080/WEB-INF/lib/VitalTrackApplet_MOD.jar

If you change localhost:8080 & try that URL in the browser address bar you might note the server refuses to supply the Jar that is in a directory explicitly intended for the server side of a web-app. (IE not the client JRE).

The fix is to move the Jar (and codebase) to a place where any client can access it.

when you run your index.jsp it find VitalTrackApplet_MOD.jar under same folder. Please put your VitalTrackApplet_MOD.jar under WebContent folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM