【发布时间】:2011-01-22 08:36:09
【问题描述】:
Tomcat中部署了一个项目。
web-app当然是tomcat的webapps,结构如下:
tomcat-home
|--webapps
|
-MyProject
|
-WEB-INF
-startingPoint.js
-client
-other dirs etc
现在startingPoint.js是一个javascript文件,本质上是在浏览器中加载一个小程序,类似于:
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.
如果我在 IE url 栏中写 url:
http://ip:port/MyProject(tomcat 正在运行)小程序已加载到我的浏览器中,但我不明白如何。
我的意思是从 web.xml 我看不到可以为 javascript 文件提供服务的内容。
如果 js 文件在我的项目的 roor 目录中,它会自动提供吗?
我觉得我在这里遗漏了一些东西。
有人可以请教,我应该在这里寻找什么?
谢谢
【问题讨论】:
-
WEB-INF/web.xml中有欢迎文件吗? -
welcomefile里有提到index.html和index.htm,是的
-
MyProject的根目录下是否有index.htm或index.html?
标签: java javascript web-applications tomcat