![]()
the petclinic example,there have application-hibernate.xml,web.xml,jdbc.property.(I configured it running with mysql.)
then,where did petclinic-servlet.xml load into the application?
![]()
the petclinic example,there have application-hibernate.xml,web.xml,jdbc.property.(I configured it running with mysql.)
then,where did petclinic-servlet.xml load into the application?
The despatcher servlet that is declared in the web.xml file will look for the file based on it's own name (it's the main Spring config file for a web app).
So if I had my despatcher servlet declared like this:-
It would look for myWebApp-servlet.xmlCode:<servlet> <servlet-name>myWebApp</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet>
Bob
The org.springframework.web.servlet.DispatcherServlet will default look for mywebApp-servlet.xml!
then,This resembles the struts ActionServlet.
When we configured the ActionServlet,it would look for struts-config.xml!
all right?
Thank you for your response!