1:java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/fmt/LocalizationContext
下载jstl.jar
2:java.lang.ClassNotFoundException: org.apache.taglibs.standard.tlv.JstlCoreTLV
原因jstl还需要standard.jar包,加上就好啦
3:The requested resource (/WEB-INF/view/loginfail.jsp) is not available. 目录多出了一个view,java文件访 问jsp一定也要在web-inf目录吗?等解决
原因在此,定义了prefix
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass">
<value>org.springframework.web.servlet.view.JstlView</value>
</property>
<property name="prefix">
<value>/WEB-INF/view/</value> 改成<value>/</value>即可,其实是多出两个目录
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
下载jstl.jar
2:java.lang.ClassNotFoundException: org.apache.taglibs.standard.tlv.JstlCoreTLV
原因jstl还需要standard.jar包,加上就好啦
3:The requested resource (/WEB-INF/view/loginfail.jsp) is not available. 目录多出了一个view,java文件访 问jsp一定也要在web-inf目录吗?等解决
原因在此,定义了prefix
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass">
<value>org.springframework.web.servlet.view.JstlView</value>
</property>
<property name="prefix">
<value>/WEB-INF/view/</value> 改成<value>/</value>即可,其实是多出两个目录
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>