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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:25:25+00:00 2026-05-26T23:25:25+00:00

For the return URL, it seem you have to define the whole URL like

  • 0

For the return URL, it seem you have to define the whole URL like so:

String returnURL = "http://localhost:8080/appName/shopping/confirmorder";

Now, I have a problem with the request mapping:

    @RequestMapping(value = "/shopping/confirmorder?token={token}&PayerID={payerID}", method = RequestMethod.GET)
public String doGet(@PathVariable("token") String token, @PathVariable("payerID") String payerID,
        HttpServletRequest request) {

    // do stuff
}

The controller is never called for some reason?

The final returnURL returned from Paypal is like this:

http://localhost:8080/appName/shopping/confirmorder?token=EC-4...G&PayerID=A...W

Note the Ids have been edited.

  • 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-26T23:25:26+00:00Added an answer on May 26, 2026 at 11:25 pm

    If you have two path variables named token and payerID, then the method signature should be

    public void doGet(@PathVariable("token") String token, 
                      @PathVariable("payerID") String token, 
                      HttpServletRequest request, 
                      HttpServletResponse response)
    

    How did you expect Spring to put those two strings inside a single option parameter of type int?

    See http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping-uri-templates

    Moreover, PathVariable is used to bind portions of the request path to method arguments. In your case, you have request parameters. You should thus use @RequestParam:

    @RequestMapping(value = "/shopping/confirmorder", method = RequestMethod.GET)
    public void doGet(@RequestParam("token") String token, 
                      @RequestParam("PayerID") String token, 
                      HttpServletRequest request, 
                      HttpServletResponse response)
    

    See http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-ann-requestparam

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

Sidebar

Related Questions

I have a url that looks like this: http://localhost/store/mens/category/t-shirts/item/a-t-shirt I have a class called
I have service url : please check it , It's return json string. I
I have url like: http://www.matweb.com/search/DataSheet.aspx?MatGUID=849e2916ab1541be9ff6a17b78f95c82 I want to download source code from that page
In ASP.NET MVC (default routing),I'd like to use a URL like this to return
I have this url which is JSON webservice http://ws.geonames.org/weatherJSON?north=90&south=-9.9&east=-22.4&west=55.2 I need to write a
i have done up a method to return a string values of a textfile
I have a URL encoded resource such as: http://myurl/users/Joe%20Bloggs/index.xml This is for a RESTful
i have a definition like : define('LIBRARIES_URI', get_template_directory_uri() . '/libraries/'); Now, i have an
I know I can use window.location.pathname to return a url, but how do I
Instead of automatically following JavaScript redirects, can I force HtmlUnit to return the URL

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.