Panchotiya Vipul
Panchotiya Vipul

Reputation: 1296

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.

Upvotes: 0

Views: 1600

Answers (2)

Andrew Thompson
Andrew Thompson

Reputation: 168845

..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. (I.E. not the client JRE).

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

Upvotes: 1

Vijay
Vijay

Reputation: 8461

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

Upvotes: 0

Related Questions