在SpringMVC中,怎么看出.do请求在哪里?
比如:web.xml中:
……
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
……
在mvc-config.xml中:
<bean id="viewResolver" class="……">
<property name="prefix">
<value>"/WEB-INF/jsp"</value>
</property>
<property name="suffix">
<value>".jsp"</value>
</property>
</bean>
<bean name="/hello.do"
class="onlyfun.caterpillar.HelloController">
<property name="viewPage">
<value>"hello"</value>
</property>
</bean>
请问,hello.do的请求的具体内容在哪里?是在JSP中?还是在哪里呢?谢谢!
[解决办法]
<bean id="autoBuilderHanderMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
pages/xtgl/autoBuilder/autoBuilder.do=autoBuilderControl
</value>
</property>
</bean>
<bean id="autoBuilderControl"
class="com.qs.autoBuilder.AutoBuilderControlForSpring">
</bean>
pages/xtgl/autoBuilder/autoBuilder.do
相当于
jsp所在的文件夹
pages--
xtgl--
autoBuilder--xxx.jsp里的autoBuilder.do