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 682941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:39:09+00:00 2026-05-14T01:39:09+00:00

I am having a trouble mapping a specific URL request to one of the

  • 0

I am having a trouble mapping a specific URL request to one of the controllers in my project.

the URL is : http://HOSTNAME/api/v1/profiles.json
the war which is deployed is: api.war

the error I get is the following:

[PageNotFound] No mapping found for
HTTP request with URI
[/api/v1/profiles.json] in
DispatcherServlet with name ‘action’

The configuration I have is the following: web.xml :

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/applicationContext.xml,/WEB-INF/applicationContext-security.xml</param-value>
 </context-param>

 <!-- Cache Control filter -->
 <filter>
  <filter-name>cacheControlFilter</filter-name>
  <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
 </filter>

 <!-- Cache Control filter mapping -->
 <filter-mapping>
  <filter-name>cacheControlFilter</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>

 <!-- Spring security filter -->
 <filter>
  <filter-name>springSecurityFilterChain</filter-name>
  <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
 </filter>

 <!-- Spring security filter mapping -->
 <filter-mapping>
  <filter-name>springSecurityFilterChain</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>

 <!-- Spring listener -->
 <listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 </listener>

 <!-- Spring Controller -->
 <servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>

 <servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>/v1/*</url-pattern>
 </servlet-mapping> 

The action-servlet.xml:

<mvc:annotation-driven/>    

<bean id="contentNegotiatingViewResolver"
  class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
  <property name="favorPathExtension" value="true" />
  <property name="favorParameter" value="true" />
  <!--
   default media format parameter name is 'format'
  -->
  <property name="ignoreAcceptHeader" value="false" />
  <property name="order" value="1" />
  <property name="mediaTypes">
      <map>
        <entry key="html" value="text/html"/> 
        <entry key="json" value="application/json" />
        <entry key="xml"  value="application/xml" /> 
      </map>
  </property>  
  <property name="viewResolvers">
      <list>        
        <bean  class="org.springframework.web.servlet.view.InternalResourceViewResolver">
          <property name="prefix" value="/WEB-INF/jsp/"/>
          <property name="suffix" value=".jsp"/>
          <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
        </bean>
      </list>
  </property>  
  <property name="defaultViews">
      <list>              
        <bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" />
        <bean class="org.springframework.web.servlet.view.xml.MarshallingView">
          <constructor-arg>
            <bean class="org.springframework.oxm.xstream.XStreamMarshaller" />
          </constructor-arg>
        </bean>        
      </list>
  </property>
 </bean>

the application context security:

<sec:http auto-config='true'  >
  <sec:intercept-url pattern="/login.*"      filters="none"/> 
  <sec:intercept-url pattern="/oauth/**"       access="ROLE_USER" />
  <sec:intercept-url pattern="/v1/**"       access="ROLE_USER" />
  <sec:intercept-url pattern="/request_token_authorized.jsp"  access="ROLE_USER" />
  <sec:intercept-url pattern="/**"        access="ROLE_USER"/>
  <sec:form-login authentication-failure-url ="/login.html"
      default-target-url   ="/login.html" 
      login-page     ="/login.html"
      login-processing-url  ="/login.html" />

  <sec:logout logout-success-url="/index.html" logout-url="/logout.html" />
 </sec:http>

the controller:

@Controller
public class ProfilesController {

 @RequestMapping(value = {"/v1/profiles"}, method = {RequestMethod.GET,RequestMethod.POST})
 public void getProfilesList(@ModelAttribute("response") Response response) {
  ....
 }

}

the request never reaches this controller.

Any ideas?

  • 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-14T01:39:09+00:00Added an answer on May 14, 2026 at 1:39 am

    Annotations don’t do anything until they are processed. You will need

    <context:component-scan base-package="path.to.controllers"/>
    

    as a child of your root “beans” tag in order to get Spring to scan for controllers. Spring will scan for controllers in the base-package and it’s descendants.

    This tags requires

    xmlns:context="http://www.springframework.org/schema/context"
    

    and

    xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"
    

    in your root “beans” tag.

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

Sidebar

Related Questions

I am having trouble mapping a JSON response to objects using RestKit and Objective-C.
I'm having trouble mapping a JSON Post to a particular Java Object to save
I'm using Hibernate's JPA impl to model some tables. I'm having trouble mapping a
I am having trouble with inheritance mapping in Linq to Sql. I am using
I am having trouble deleting orphan nodes using JPA with the following mapping @OneToMany
Having trouble linking the Stomp.framework into an iPhone SDK application. http://code.google.com/p/stompframework/ I follow the
I am having a trouble mapping an embedded attribute of a class. I have
I've been having trouble mapping data to a combobox in vaadin. My intention was
I'm having trouble with the implementation of SqlDependency in my project. I'm using SqlDependency
I'm having some trouble mapping a byte array to a MySQL database in Hibernate

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.