Results 1 to 3 of 3

Thread: where did petclinic-servlet.xml load in petclinic example?

  1. #1
    Join Date
    Jan 2006
    Posts
    4

    Default 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. #2
    Join Date
    Jul 2005
    Posts
    246

    Default

    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

  3. #3
    Join Date
    Jan 2006
    Posts
    4

    Default

    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •