是这样的,我把jsp的文件都放在web-inf下面去了,这样客户端的确是无法通过网址去访问页面。而且,springMVC的的配置文件的路径也改了:
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
那么,如果首页index.jsp要是也放在web-inf下面呢,客户端也没办法访问到首页,就不用登陆操作啦!!这里有办法让可以端访问首页吗?
在web.xml
里配置一个欢迎页:
``<welcome-file-list>
<welcome-file>xxx.do</welcome-file>
</welcome-file-list> ``
然后配置xxx.do跳转到你的首页就好了
controller层是可以返回页面的
首页也用mvc转发一下嘛