之前都是用weblogic
现在学习tomcat
启动myEclipse
新建一个web project
名字就叫做ceshi
在WebRoot下面新建一张页面login.jsp
在web.xml里面的设置
<welcome-file-list>
<welcome-file>/login.jsp</welcome-file>
</welcome-file-list>
发布,IDE中启动tomcat
IE中输入http://127.0.0.1:8080
一只猫出来了
IE中输入http://127.0.0.1:8080/ceshi
却不出来,
错误:“type Status reportmessage /ceshi/description The requested resource (/ceshi/) is not available.
”这到底是什么原因啊??
现在学习tomcat
启动myEclipse
新建一个web project
名字就叫做ceshi
在WebRoot下面新建一张页面login.jsp
在web.xml里面的设置
<welcome-file-list>
<welcome-file>/login.jsp</welcome-file>
</welcome-file-list>
发布,IDE中启动tomcat
IE中输入http://127.0.0.1:8080
一只猫出来了
IE中输入http://127.0.0.1:8080/ceshi
却不出来,
错误:“type Status reportmessage /ceshi/description The requested resource (/ceshi/) is not available.
”这到底是什么原因啊??
这个页面。
或者你直接把地址换成:http://127.0.0.1:8080/ceshi/login.jsp应该就可以啦
就是运行服务器左边那个按钮
部署到TOMCAT里面去
http://127.0.0.1:8080/ceshi/login.jsp看看能不能出来
如果不行很有可能是没部署好
如果去掉
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
就可以了,但是我这个用的是spring,不能去掉啊
怎么办??
原来是这样的:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>我改成:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>就行了
<welcome-file>/login.jsp </welcome-file>
</welcome-file-list> 改为<welcome-file-list>
<welcome-file>login.jsp </welcome-file>
</welcome-file-list>