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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:45:55+00:00 2026-05-26T19:45:55+00:00

I have a scenario where I’m making a simple get request through a link

  • 0

I have a scenario where I’m making a simple get request through a link and my @RequestMapping configuration is not behaving as I’d expect.

Within an anchor tag I reference a url with the following pattern ‘/action-plan/export/pdf?token=xxx&taskId=1111&taskId=2222…’

Within my controller class I have this mapping at the class level:

@RequestMapping("/action-plan/export")

And this mapping at the method level

@RequestMapping(value="/pdf", method=RequestMethod.GET)
public String exportToPdf(@RequestParam("taskId") String[] taskIds,
            @RequestParam("token") String[] encryptedEmplId, ModelMap model)

But every time I try this I get a 404 page not found error and the following Spring exception:

org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException: No matching handler method found for servlet request: path ‘/pdf’, method ‘GET’, parameters map[‘taskId’ -> array[‘1962326’, ‘1962264’, ‘1962317’, ‘1962328’, ‘1962324’, ‘1962427’, ‘1962325’, ‘1962323’, ‘1963147’, ‘1962327’, ‘1962318’, ‘1962329’, ‘1962330’], ‘token’ -> array[‘xxxx’]]

I’ve noticed that when I remove the “/pdf?” portion of the link and remove ‘value=”/pdf”‘ from the method @RequestMapping it works fine. For the life of me I don’t understand why adding /pdf to the url and RequestMapping is not working.

  • 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-26T19:45:56+00:00Added an answer on May 26, 2026 at 7:45 pm

    I think danny.lesnik’s answer was pretty close but I’m writing my own answer so I can be more verbose.

    I was working on a different project and figured out why the above doesn’t work. In reference to my original question here is the relevant web.xml servlet mapping:

    <servlet-mapping>
        <servlet-name>spring-dispatcherServlet</servlet-name>
        <url-pattern>/action-plan/export/*</url-pattern>
    </servlet-mapping>
    

    I noticed that whatever portion of the path I included in the of web.xml was not being included in the evaluation of RequestMapping values. I would have thought this bean configuration would have prevented that scenario (note the “alwaysUseFullPath” property):

    <bean id="annotationHandlerMapping" class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
            <property name="order" value="2"/>
            <property name="alwaysUseFullPath" value="true"/>
    </bean>
    

    Maybe someone can shed some light on this detail for me.

    In any case, thanks danny.lesnik

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

Sidebar

Related Questions

I have a scenario where I use Httpclient to get the HTML repsonse of
I have a scenario where I want a web page to contain a <link>
I have a scenario where I get a data table with 65 columns and
I have a scenario that does not seem to be covered in any of
I have this scenario wherein I get a linear equation in the Prolog query
I have scenario, I have two update panels on the page (both have update
I have a path defined: when /the admin home\s?page/ /admin/ I have scenario that
I have a scenario where I have to check whether user has already opened
I have a scenario. (Windows Forms, C#, .NET) There is a main form which
I have a scenario where I need to upload a file from one web

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.