[英]how can i protect my index.html website by js so i can only open it on my pc?
[英]How to open my resource in that localhost:8080/test/index.html?
Tomcat是从eclipse启动的,我也可以在浏览器中打开以下URL:
http://localhost:8080/test/index.html
但是,我无法在该页面中打开资源。
我得到的错误是:
HTTP Status 404 - /
type Status report
message http:/test/index.html
description The requested resource (/test/index) is not available.
Apache Tomcat/6.0.29
请在eclipse中尝试以下步骤,以将项目部署为WAR文件而不是EAR文件 :
Project Explorer
右键单击test
(如果我正确的话,这是项目的名称) Export->WAR file
Browse...
按钮以选择部署的目标文件夹。 这应该是Tomcat
安装的Web应用程序文件夹: <TOMCAT_INSTALLATION>/webapps
,其中<TOMCAT_INSTALLATION>
是您在其中安装Tomcat的文件夹。 Finish
现在启动您的Tomcat服务器。 假设您在Eclipse中的test
项目的WebContent
文件夹中有index.html
文件,那么打开URL时,您应该在浏览器中看到index.html
的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.