Announcement Announcement Module
Collapse
No announcement yet.
where did petclinic-servlet.xml load in petclinic example? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • where did petclinic-servlet.xml load in petclinic example?


    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?

  • #2
    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:-

    Code:
    <servlet>
        <servlet-name>myWebApp</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>
    It would look for myWebApp-servlet.xml

    Bob

    Comment


    • #3
      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!

      Comment

      Working...
      X