/ Published in: Java
To tell Spring to resolve a request URL to a JSP page, add a "view resolver" in the context configuration for the DispatchServlet.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/jsp/"/> <property name="suffix" value=".jsp"/> </bean>