首先,tomcat部署等都一切正常,项目都可以正常访问
经过一天测试未果,特来求助
我想要直接输入www.我的域名.com.cn直接访问我的项目下/main/caladia.jsp文件,
而不是输入www.我的域名.com.cn/项目名/main/caladia.jsp来访问
于是我在服务器上的tomcat下conf/server.xml与conf/web.xml做了以下更改
server.xml中增加了以下代码:
Host name="www.我的域名.com.cn" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
Context docBase="我的项目名/main" debug="0" path="" reloadable="true" ></Context
</Host
web.xml中最下方的代码修改:
welcome-file-list>
welcome-file>caladia.jsp welcome-file>index.html welcome-file>index.htm welcome-file>index.jsp</welcome-file
</welcome-file-list
重启后,输入www.我的域名.com.cn后可以访问,但是图片、js、等等都加载不进来,报not found,但是连接可以点,于是我又做了如下改动
server.xml将项目名后的/main去掉了:
Host name="www.我的域名.com.cn" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
Context docBase="我的项目名" debug="0" path="" reloadable="true" ></Context
</Host
web.xml在caladia.jsp前加了/main:
welcome-file-list>
welcome-file>/main/caladia.jsp welcome-file>index.html welcome-file>index.htm welcome-file>index.jsp</welcome-file
</welcome-file-list
结果图片、js、等等都出来了,可是点连接都没有用了,报404了
求大神!!!,有没有别的办法,或者看看我的代码有没有可以改的地方
同求!!!!!!!!!!!!!
还是配置问题。。。。。。。