Announcement Announcement Module
Collapse
No announcement yet.
Path settings for a web program. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Path settings for a web program.

    I am learning spring mvc and finding this problem very much annoying. The problem is with the path setting for the DispatcherServlet. Server cannot find the resource is coming. Basically the mapping with the controller and the path is not set properly.

    Please help me to understand, what needs to be remembered when writing a spring mvc controller with @Controller annotation and @RequestMapping.

  • #2
    Hi
    You may need to show us some config code so we may know something wrong with it

    Comment


    • #3
      annotation bassed configuration

      @Controller and @Requstmapping are under annotation bassed, spring 2.5 also support annotations, following url helps you to configure
      http://static.springsource.org/sprin...ann-controller

      You must have these tag in application Config:

      <context:annotation-config/>
      <context:component-scan base-package="your.package.name"/>

      Comment


      • #4
        you may mapped your Dispacher-Servlet with "/" so all your resource(css/js etc) request going towards Dispacher servlet, if that is the case then you can use < mvc:resources>,

        Can you post ur web.xml mapping which helps us to understand ur prob if i addressed the wrong

        Comment

        Working...
        X