Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3361234
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:07:41+00:00 2026-05-18T03:07:41+00:00

In Spring MVC 3 on Tomcat 6, I can’t seem to get RequestMappings of

  • 0

In Spring MVC 3 on Tomcat 6, I can’t seem to get RequestMappings of the form /x/y/z to work. /x/y seems to work fine and that’s what all the example in docs show.

For example, why does this work

@RequestMapping(value="/browse/{categoryName}"); 

but this is doesn’t work:

@RequestMapping(value="/browse/category/{categoryName}");

Browsing to http://localhost:8080/myapp/browse/category/books generates a HTTP 404 from Tomcat. The method looks like this:

@Controller
public class BrowseController {
    @RequestMapping(value = "/browse/category/{categoryName}", method = RequestMethod.GET)
    public String showCategory(@PathVariable("categoryName") String categoryName, Model model) {
        model.addAttribute("categoryName", categoryName);
        return "Browse";
    }
}

I see this message in the Tomcat output window in Netbeans 6.9:

Nov 14, 2010 2:02:03 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/myapp/browse/category/model] in DispatcherServlet with name 'dispatcher'

EDIT: added more tracing info from the log. Please disregard the timestamps since this questions was edited over two days.

Upon deploying the app:

Nov 15, 2010 9:33:28 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Nov 15 21:33:28 EST 2010]; parent: Root WebApplicationContext
Nov 15, 2010 9:33:28 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
Nov 15, 2010 9:33:29 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@143c423: defining beans [browseController,homeController,showController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping#0,viewResolver]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1ea763a
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/browse] onto handler 'browseController'
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/browse/*] onto handler 'browseController'
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/home] onto handler 'homeController'
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/home/*] onto handler 'homeController'
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/show] onto handler 'showController'
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/show/*] onto handler 'showController'
Nov 15, 2010 9:33:29 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'dispatcher': initialization completed in 501 ms

When I made the call to http://localhost:8080/myapp/browse/category/model,

Nov 15, 2010 9:34:28 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/myapp/browse/category/model] in DispatcherServlet with name 'dispatcher'

And here’s my web.xml dispatcher config:

<servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

So is there any reason why I URI pattern works but the other doesn’t?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:07:41+00:00Added an answer on May 18, 2026 at 3:07 am

    Problem fixed on another thread:
    spring-mvc: how to map URI templates in the form of "a/b/{c}"?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Tomcat 6.2 and Spring MVC 2.5. I've noticed that, whilst a user
Hello I'm building a Spring MVC web application that runs on Tomcat 6.0.20 and
I'm following this example to get Spring up & running: http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html What they do
I'm using Spring MVC 3.0 and Tomcat. I have a bean that has a
I have a tomcat - spring mvc - jsp application. I have discovered that
I'm working on a Spring MVC project, and I have unit tests for all
Using IDEA and tomcat I setup a simple spring mvc app (thanks to you
In a java web application (servlets/spring mvc), using tomcat, is it possible to run
I'm using tomcat 6, spring mvc 3.0.0 and spring security 3.0.0, and since the
I have a small Spring MVC webapp (which embeds ActiveMQ) that is designed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.