Spring 3 MVC - Resolver view for JSP pages without controller

I have just started developing spring 3 and have previously used spring 2.5. I am stuck with View Resolver. I had the following configuration

<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/jsp/"/>
    <property name="suffix" value=".jsp"/>
</bean> 

      

And yes it works if the jsp pages are in the / WEB-INF / jsp path. The problem I'm running into is that if I had a jsp inside (like / WEB-INF / jsp / prod / Monitor / success.jsp) I can't get it to resolve the page if I type http : //localhost/Project/prod/Monitor/success.html in the browser.

I am missing something here. Just for more information, the jsp will show up if the jsp had a controller, but I need it to resolve the jsp pages without linking to it.

+3


source to share


2 answers


Add this to context:



<mvc:view-controller path="/prod/Monitor/success.html" view-name="/prod/Monitor/success" />

      

+4


source


You can think of these pages as static resources. see this one for details.



0


source







All Articles