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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:50:48+00:00 2026-06-10T16:50:48+00:00

So here is my html code: <!doctype html> <html lang=fr> … <form action=servlet method=post>

  • 0

So here is my html code:

<!doctype html>
<html lang="fr">
  ...
  <form action="servlet" method="post">
    <textarea name="content" rows="30" cols="80" spellcheck="false"></textarea>
    <input type="submit" value="SEND" />
  </form>
  ...
</html>

And then the servlet part

String content = request.getParameter("content");
System.out.println(content);

And the problem is that if I type “é” in my textarea, the result is printed as “?”. I may be an encoding problem but I can’t make it work. I tried to change the character encoding to UTF-8 in my jsp page and then add the following line to my servlet

request.setCharacterEncoding("UTF-8");

But it doesn’t change anything. What should I do ? Again, I am a beginner in JSP/Java EE.

  • 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-10T16:50:49+00:00Added an answer on June 10, 2026 at 4:50 pm

    Ok I finally got it working. I tried everything but still got ? instead of é and I suppose it may be my server fault as I don’t use Tomcat or whatever but an embedded Jetty, which configuration is not that clear.

    So I use JavaScript to send my string properly encoded:

    send( encodeURIComponent(txtarea.value) );
    

    And on the server side I decode it with this little function:

    java.net.URLDecoder.decode(request.getParameter("content"), "utf-8");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html code <!DOCTYPE html> <html lang=en> <head> <meta name=viewport content=width=device-width;
Here is my code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml>
Here's a contrived example of my code: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
First off here is the code! <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
Here's my full, latest code that doesn't work. Here's the main window HTML <!DOCTYPE
I'm seeing my Friend's code here... <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN> <HTML>
I want to do like this : http://ajaxload.info/ here is my code: <!DOCTYPE html>
Here is my html code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> <html
I'm trying to 'hightlight' a specific div. Here is my html code <!DOCTYPE html>
i just want to ask about my html code here, i have a bit

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.