Posted By

tedg on 12/18/13


Versions (?)

How TO Resolve a Request URL to a JSP in Spring

 / 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.

  1. <bean id="viewResolver"
  2. class="org.springframework.web.servlet.view.UrlBasedViewResolver">
  3. <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
  4. <property name="prefix" value="/WEB-INF/jsp/"/>
  5. <property name="suffix" value=".jsp"/>
  6. </bean>

Report this snippet  

You need to login to post a comment.