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

  • Home
  • SEARCH
  • 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 8220009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:22:22+00:00 2026-06-07T13:22:22+00:00

I am having a problem here. When I use ajax to pass a parameter

  • 0

I am having a problem here. When I use ajax to pass a parameter containing “+” to my controller it is being replaced by a space.

Example, I will pass value = Tom+Jerry+Garfield using ajax. When I use System.out.println() in my controller it displays Tom Jerry Garfield. I tried using other special characters I don’t seem to have a problem.

Please help. Thanks in advance.

  • 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-06-07T13:22:23+00:00Added an answer on June 7, 2026 at 1:22 pm

    In some GET and POST requests (most likely in the URL, or via a form), spaces are encoded as “+” (plus) symbols before they are passed to the server. You can see this behaviour if you do a normal GET request – you will see something like google.com?q=test+example If you want to pass a plus symbol via an ajax GET/POST request, you need to “urlencode” it. The URL encoded value for + is %2B.

    Also note:

    The javascript encodeURIComponent() function can be used, as answered in:

    AJAX POST and Plus Sign ( + ) — How to Encode?

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

Sidebar

Related Questions

Im having a problem here. i downloaded jake wharton. He gave an example of
Having a very basic problem here building/running a Java skeleton to make use of
I'm having a little problem here, I'm new to Actionscript 3, and what I'm
Super weird problem here. I'm having trouble getting jQuery to bind any selectors except
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
HI Guys, Here I am having problem that How can I post an image
I'm having a hard time trying to create a XmlRepository. The problem here I
I am having a problem with a combo box here. What I did is
I'm having a problem installing SAM 1.1.0 on fedora 16 same as here https://bugs.php.net/bug.php?id=59632&thanks=6
I' having a problem allocating a structure in a function. Here is the code(I'm

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.