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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:51:29+00:00 2026-06-14T13:51:29+00:00

I am using JSF 2.0 and I have text field as <h:form> <h:inputText value=#{myBean.myValue}

  • 0

I am using JSF 2.0 and I have text field as

<h:form>
    <h:inputText value="#{myBean.myValue}" />
    <h:commandButton value="Submit" action="#{myBean.printMe()}" />
</h:form>

public void printMe() {
    System.out.println("first line==" + myValue + "==");
    System.out.println("second line==يشسيبشسيبشسيبشيس==");
}

When I run this project and enter يشسيبشسيبشسيبشيس in textbox, in IDE console I see as below.

INFO: first line==????????????????==
INFO: second line==????????????????==

Any idea why this is happening?

  • 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-14T13:51:30+00:00Added an answer on June 14, 2026 at 1:51 pm

    This is caused by using the wrong console encoding.

    The line

    System.out.println("My Data is " + fullName);
    

    prints to the standard output (stdout). You need to configure it to use UTF-8 as well. Assuming that you’re using Eclipse, then you need to change the stdout encoding to UTF-8 by Window > Preferences > General > Workspace > Text File Encoding.

    enter image description here

    If you’re using Netbeans, which I can’t answer from top of head, head to this answer: hebrew appears as question marks in netbeans which contains a link to this Netbeans Wiki which mentions the following:

    To change the language encoding for a project:

    1. Right-click a project node in the Projects windows and choose Properties.
    2. Under Sources, select an encoding value from the Encoding drop-down field.

    See also:

    • Unicode – How to get the characters right?

    Unrelated to the concrete problem, those lines in the filter are unnecessary

        res.setCharacterEncoding("UTF-8");
        res.setContentType("text/html;charset=utf-8");
    

    They defaults in case of JSF2/Facelets to proper values already. Remove those lines.

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

Sidebar

Related Questions

I have a problem with using jQuery Dialog and Ajax submit in JSF. I
I have an <h:inputText> field in my JSF page and I registered an entity
I am using JSF and have made a custom servlet for loading images dynamically.
i have created a demo application Using JSF & EJB 3.0 (Stateless session bean
I have a application that runs very well on JBoss using JSF 2. I
I'm using JSF 2.0. I have a managed bean which I can access through
I am using JSF and spring . I have a spring managed bean in
I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
I creating a web application using JSF,Hibernate,Spring. I have added a filter for checking
So I have imported a project to netbeans. I am using jsf and xhtml

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.