Results 1 to 2 of 2

Thread: mutiple dispatcher servlet mapping

  1. #1
    Join Date
    May 2011
    Posts
    3

    Default mutiple dispatcher servlet mapping

    I need to have multiple servlet mappings for separate servlet contexts. The spring doc says

    A web application can define any number of DispatcherServlets. Each servlet will operate in its own namespace, loading its own application context with mappings, handlers, etc. Only the root application context as loaded by ContextLoaderListener, if any, will be shared.


    Is it a best practice? would it load spring container multiple times? would it cause more memory?



    Thanks

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    No it won't... Each dispatcherservlet will loads its own configuration and reference the context loaded by the ContextLoaderListener as its parent. So it isn't going to reload anything... Unless you do something wrong in your configuration...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

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