There is a project deployed in Tomcat.
The web-app of course in is webapps of tomcat and the structure is as follows:
tomcat-home
|--webapps
|
-MyProject
|
-WEB-INF
-startingPoint.js
-client
-other dirs etc
Now startingPoint.js is a javascript file that essentially loads an applet in the browser and is similar to this:
document.write('<OBJECT ');
document.write(' codebase = "jre.exe" WIDTH = "100%" HEIGHT = "100%" MAYSCRIPT > ');
document.write(' <PARAM NAME = CODE VALUE = "com/AnApplet.class" > ');
document.write(' <PARAM NAME = CODEBASE VALUE = "/MyProject/client/classes" >');
document.write(' <PARAM NAME = ARCHIVE VALUE = "/MyProject/client/lib/Appletclient.jar"> ');
document.write(' <PARAM NAME = "type" VALUE = "application/x-java-applet;version=1.6"> ');
document.write(' <PARAM NAME = "MAYSCRIPT" VALUE="true"> ');
etc.
If I write in the IE url bar the url:
http://ip:port/MyProject (tomcat is running of course) the applet is loaded in my browser but I can not understand how.
I mean from web.xml I can not see something that would serve the javascript file.
If a js file is in the roor directory of my project, does it get automatically served?
I feel I am missing something here.
Could someone please advice, what is it here I should be looking for?
Thanks
Either this
.jsis included in yourwelcome-pagespecified inweb.xmlor inindexpage ,That page will get loaded and with that if js is included it will load.