In my application web spring mvc. Problem, I use 2 view(.jsp and jspx). But in servlet-context.xml, i just config for 1 view(.jsp).
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
What is the way resolve use 2 view in an Application spring MVC? Thanks.
You add order property in bean tag
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
<property name="order" value="1"/>
</beans:bean>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.