Results 1 to 4 of 4

Thread: Path settings for a web program.

  1. #1
    Join Date
    Apr 2011
    Posts
    12

    Default 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. #2
    Join Date
    Apr 2006
    Posts
    166

    Default

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

  3. #3
    Join Date
    Jan 2010
    Location
    chennai
    Posts
    16

    Default 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"/>

  4. #4
    Join Date
    Dec 2008
    Location
    India
    Posts
    295

    Default

    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
    Enjoy
    Rohan Chauhan
    ------------------------------------------------------------------------------
    SpringSource Certified Spring 3.0 Professional


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
  •