Announcement Announcement Module
Collapse
No announcement yet.
Question about <mvc:default-servlet-handler/> Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about <mvc:default-servlet-handler/>

    Hi,

    I can't understand what's the purpose of the <mvc:default-servlet-handler/> tag. The reference documentation on this says:

    This tag allows for mapping the DispatcherServlet to "/" (thus overriding the mapping of the container's default Servlet), while still allowing static resource requests to be handled by the container's default Servlet [...]
    But I thought this could be achieved using the <mvc:resources/> tag. So what is <mvc:default-servlet-handler/> used for? Is there any special situation where it should be used?

    Thanks!

  • #2
    It maps the DispacherServlet to "/" (overrides container's default servlet) still it allows the static resources(like css,images,js) to be handle by container's default servlet

    Comment


    • #3
      Originally posted by rohan123 View Post
      It maps the DispacherServlet to "/" (overrides container's default servlet) still it allows the static resources(like css,images,js) to be handle by container's default servlet
      Hi rohan. That's what the documents say. But if my application is serving resources with <mvc:resources path="..."/>, what's the benefit in using default-servlet-handler?

      Comment


      • #4
        did you ever get an answer?

        xcarlos,

        did you ever get an answer? I am asking myself this question.

        Greg

        Comment

        Working...
        X