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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:35:59+00:00 2026-06-17T15:35:59+00:00

Lately I have been working on creating a few HTTP services using a Tomcat

  • 0

Lately I have been working on creating a few HTTP services using a Tomcat 7.0 server. The code below is a html file that I used to test my service.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>              
                <form id="fm" method="post" action="http://localhost:8080
/DataService/ProductData?category=Ser + bø&location=Herlev##Vejle">
                    <input type="submit" value="Submit">
                </form>
</body>
</html>

My problem is regarding the category parameter “Ser + bø”. On the server side it is read as
“Ser bø” with a three spaces instead of a space,”+”,space. As far as I know the problem has likely to do something with encoding. I am using UTF-8 for the request. I have also change the configuration for the Tomcat server so that it uses UTF-8. Any ideas as to what I am doing wrong?

  • 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-17T15:36:00+00:00Added an answer on June 17, 2026 at 3:36 pm

    Modifying your form action URL to pass parameters to back-end is not the right way of dealing with forms. The best way to avoid all of that is just to use a separate form parameters instead:

    <form id="fm" method="post" action="http://localhost:8080
    /DataService/ProductData?category=Ser %2B bø&location=Herlev##Vejle">
       <input type="hidden" name="category" value="Ser %2B bø">
       <input type="hidden" name="location" value="Herlev##Vejle">
       ...
    </form>
    

    That’s because
    URL has it’s own encoding rules, based on RFC 3986. Plus stands for space there. So you should encode your URL prior to passing it to the server, either using JSP or JavaScript. Encoded + is %2B:

    <form id="fm" method="post" action="http://localhost:8080
    /DataService/ProductData?category=Ser %2B bø&location=Herlev##Vejle">
    

    In case that it is a user input you will have to use JavaScript to encode it, as described here.

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

Sidebar

Related Questions

I am currently working on a website and lately have been using GD with
I have been working with reporting services in visual studio 2008 lately and I
I have been working on creating a live wallpaper lately by placing a bitmap
So I have been writing a lot of image processing code lately using only
Lately I have been working on trying facial recognition with the Kinect, using the
I am working in C++ and have been using pointers a lot lately. I
I have been working lately on a number of iterative algorithms in MATLAB, and
I have been working with Exceptions lately. I think it makes sense to log
Situation I have been working on a project lately where the UI development seems
I am a photographer and I have been working on redesigning my website lately.

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.