Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling jar in an applet

 
Balagopal Kannampallil
Ranch Hand
Posts: 136
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to call two or more jars to execute an applet and run it in Tomcat.Please help me with the html code tom call these jars onto this applet.Also tell me in whih directory of Tomact we must place these jars.
 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
to call an applet from an html, you should have in the html an applet tag (duuuh)
inside the applet tag, you should place the following:
<applet
archive = "viewer.jar,dcm4che.jar"
code = "dicomviewer.Viewer.class"
name = "Viewer"
width = "600"
height = "500"
hspace = "0"
vspace = "0"
align = "middle"
><param name="debugLevel" value="30">
<param name="displayControls" value="true">
<param name="displayAnnotations" value="true">
</applet>
archive attribute: containing the names of jar files used by your applet
code: the main class of your applet (including the package name)
name: a name for you applet
width, height, hspace, vspace, and align : additional formatting attributes
as for the param elements (such as <param name="debugLevel" value="30"> these are optional parameters in case you need to pass some particular parameter to your applet
As for the location of your jar files, they have to be placed inside the webapps particular folder of your application in the same directory of the calling html file(<TomCat>\webapps\<applicationName> , you can even place them inside a new folder within the <TomCat>\webapps\<applicationName>\newFolder folder, then you would need to add an attribute to the applet tag containing the name of your folder (JAVA_CODEBASE = "newFolder ")
Best,
Mohammad
 
Balagopal Kannampallil
Ranch Hand
Posts: 136
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mohammad
Thank you for that piece of informaton
lemme try it out....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic