|
How to configure Definitions used by Particular Dispatcher Servlet of Spring |
|
|
Make a file named springexp-servlet.xml in WEB-INF directory. It is named based on the servlet-name from web.xml with '-servlet' appended to it. Put following line of code there. This file describes that dispacther servlet will use springexpController as one of its controller. A URL mapping also has added so the DispatcherServlet can know which controller should be invoked for different URL's.
<beans>
<bean id="springexpController" class="SpringexpController"/>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ">
<property name="mappings">
<props>
<prop key="/hello.htm">springexpController</prop>
</props>
</property>
</bean>
</beans>
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.