Answer the question
In order to leave comments, you need to log in
Why doesn't it return jsp page?
It enters the control, but does not return the page, what should I do?
Controller:
Answer the question
In order to leave comments, you need to log in
If you need mapping to the root of the application, then /* replace with /:
<servlet-mapping>
<servlet-name>HelloWeb</servlet-name>
<url-pattern>/<url-pattern>
</servlet-mapping>
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<resources mapping="/images/**" location="/resources/images/" />
<resources mapping="/css/**" location="/resources/css/" />
<resources mapping="/js/**" location="/resources/js/" />
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question