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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:01:29+00:00 2026-05-12T05:01:29+00:00

I’m trying to get a simple REST service to work with Spring 3.0 but

  • 0

I’m trying to get a simple REST service to work with Spring 3.0 but keep bumping into a blocking error:

No mapping found for HTTP request with URI [/travel/us/nyc/sfo/20091010/1122/true/] in DispatcherServlet with name ‘dispatcher’*

However, in the log file it also states:

org.springframework.web.servlet.mvc.annotation.Def aultAnnotationHandlerMapping – Mapped URL path [/travel/us/{from}/{to}/{date}/{time}/{departure}/] onto handler [experiment.SomeController@dd9f85]*

which I read as an indication that there is a mapping from the URI to the experiment.SomeController class as handler.

I must be overlooking a simple error in one of the config files, but after checking everything several times and doing quite a bit of Googling I have not found a solution yet. I already turned on logging for the Spring classes, but that also did not reveal the problem.

Below are the relevant config files and some code snippets, any help is appeciated. The webapp is deployed to Glassfish v2.1 and I’m using the M3 build of Spring 3.0.0 on JDK1.5 on OS X.

The goal is to have the getTripDetails() return an XML version of the tripdetails. Hence the use of the MarshallingView.

From web.xml:

<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

From dispatcher-servlet.xml:

<context:annotation-config />
<context:component-scan base-package="net.vermaas.reisadvies.server" />

<bean class="org.springframework.web.servlet.mvc.annotat ion.DefaultAnnotationHandlerMapping">
<property name="alwaysUseFullPath" value="true"/>
</bean>

<bean id="viewResolver" class="org.springframework.web.servlet.view.Conten tNegotiatingViewResolver">
<property name="mediaTypes">
<map>
<entry key="xml" value="application/xml"/>
</map>
</property>
<property name="viewResolvers">
<list>
<bean class="org.springframework.web.servlet.view.BeanNa meViewResolver"/>
<bean class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
</list>
</property>
</bean>

<bean id="marshaller" class="org.springframework.oxm.xstream.XStreamMars haller">
</bean>

<bean id="content" class="org.springframework.web.servlet.view.xml.Ma rshallingView">
<property name="contentType" value="application/xml" />
<property name="marshaller" ref="marshaller"/>
</bean>

The controller class:

@Controller
public class SomeController {

static Logger logger = Logger.getLogger(SomeController.class);

public SomeController() {
}

@RequestMapping(value="/travel/us/{from}/{to}/{date}/{time}/{departure}", method=RequestMethod.GET)

public ModelAndView getTripDetails(@PathVariable String from,
@PathVariable String to,
@PathVariable String date,
@PathVariable String time,
@PathVariable boolean departure, Model model) {

logger.debug("getTripDetails"); // not logged

// Do some stuff
TripDetails td = ...

ModelAndView mav = new ModelAndView();
mav.setViewName("content");
mav.addObject("tripDetails", td);

return mav;

}

}

Any thoughts on what’s wrong? Or a pointer to a working example of a REST service with Spring 3.0 that has XML as output?

Regards,
Gero

  • 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-12T05:01:29+00:00Added an answer on May 12, 2026 at 5:01 am

    I too ran into the same issue, and the way it works with Spring 3.0 is bu replaceing /* in the url-pattern to /

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Basically, what I'm trying to create is a page of div tags, each has
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.