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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:16:22+00:00 2026-05-25T20:16:22+00:00

I have a problem sending special characters like cyrillic or umlauts from a jsp

  • 0

I have a problem sending special characters like cyrillic or umlauts from a jsp to a servlet.
I would greatly appreciate your help here.

Here is what I have done:

  1. Defined the utf-8 charset in the jsp:

    <%@ page language="java" contentType="text/html; charset=utf-8" 
        pageEncoding="utf-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
     <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     ...
    
    <div class="authentication">
      <form name="registerForm" action="register" method="get" accept-charset="UTF-8">
        <input type="input" name="newUser" size="17"/>
        <input type="submit" value="senden" />
      </form>
    </div>
     ...
    
  2. Set Tomcat URIEncoding for Connector, in the server.xml

    <Connector URIEncoding="UTF-8" ...
    
  3. Inside the servlet – set the CharacterEncoding to UTF and read request

    public void doGet (HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
    
    request.setCharacterEncoding("UTF-8");
    String username = request.getParameter("newUser");
    System.out.println("encoding: "+request.getCharacterEncoding());
    
    System.out.println("received: "+username);
    
  4. Here is what gets displayed when using for example: Однако

    encoding: UTF-8
    received: ??????
    

Am I missing something ? I suppose the servlet can not decode the String properly, but I have no idea why is this happening. I’ve followed all the advises on this topic but had no luck.

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-05-25T20:16:22+00:00Added an answer on May 25, 2026 at 8:16 pm

    Everything looks fine. Only the System.out.println() console also needs to be configured to interpret the byte stream as UTF-8.

    If you’re sitting in an IDE like Eclipse, then you can do that by setting Window > Preferences > General > Workspace > Text File Encoding to UTF-8. For other environments, you should be more specific about that so that we can tell how to configure it.

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

Sidebar

Related Questions

I have problem while sending messages from android to PC. Messages are send when
greetings all i have a problem that when sending an email from the server
I have a problem sending email from a linux machine. The application sends several
I have a pretty peculiar problem with sending a SMS from the iPhone programmatically,
I have problem with sending a object from my webservice. I have created a
I have problem with sending message more 70 characters. On emulator sent is ok,
I have no problem sending emails from within my app. Right now it requires:
I have a little problem with sending an extra from one activity to another.
Hi I have a problem in sending data from php to pdf. I think
I have problem with ActionLink. I'd like to pass to my ActionLink parameter for

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.