I have a question on redirect page one folder into another folder of jsp pages. I defined viewResolver
:
<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>/jsp/</value></property>
<property name="suffix"><value>.jsp</value></property>
</bean>
But My folder struture is
WEB-ROOT
|__JSP
|__user
|_userdashboardpage.jsp
|__loginpage.jsp
|__web.xml
Iam trying to validate the user details e.g. username, password when the logged the user page using validator interface. But if any error occurs while entered the blank details then occured errors and redirect the same page i.e, loginpage
using getFormView
method with prefix
property in viewResolver
bean.
But errors is not displaying in the same page. The container looking /jsp/loginpage
. But my page having outside jsp
folder. If iam removing the prefix then it shows errors.
So how to redirect the page one folder jsp into another folder jsp or web-root into jsp>user>userdashboard.jsp
. How to dispay the error in this scenario. Can i go to chain view resolvers?