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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:09:37+00:00 2026-05-17T23:09:37+00:00

It is an application that has been built using seam 2.2 and it is

  • 0

It is an application that has been built using seam 2.2 and it is running perfectly under Jboss 4.1.2. Because of support from my ISP I will have to upgrade JBoss to version 5.1 . I did try to run same app under JBoss 5 and everything looked fine but one single thing failed.

It is a piece of code that generates some JSon to feed a Chart built using Open Flash Chart libraries. I also use JOFC libraries to generate the JSon for these charts. Well the approach we have used basically has a seam factory which prints a JSon and than we do reference this factory in a blank .xhtml page from where the chart loads the required JSon to render properly. Follow some snippets:

The xhtml page where the seam factory gets called:

<f:view xmlns="http://www.w3.org/1999/xhtml"
   xmlns:f="http://java.sun.com/jsf/core"
   contentType="text/json; charset=UTF-8">

   #{jsonGraficoPesoUsuario}

</f:view> 

The factory method which generates the JSon string:

@Factory("jsonGraficoPesoUsuario")
 public String graficoPesoUsuario()
 {
...

   String jsonString = chart.toString();
   log.info("JSonString ==>> " + jsonString);
//   try {
//    jsonString = URLEncoder.encode(jsonString, "UTF-8");
//   } catch (UnsupportedEncodingException e) {
//    log.error("Erro ao tentar fazer o encode da string json ==>> " + e.getMessage());
//    e.printStackTrace();
//   }
   return jsonString;

Well the code shows also that we have tryied encoding the json string before sending but again no success. In the line where it is printed json to log.info the json string is perfectly preserved, but using JBoss5 what happens is that the ” (double quote) chars are replaced by html escape characters.

The follow json string is expected to properly feed the chart and this behaves correctly under jboss4:

{"y_axis":{"min":100,"colour":"#96A9C5","grid-colour":"#DDDEE1","max":112},"title":{"text"
:"Gráfico de evolução de Peso"},"bg_colour":"#FFFFFF","is_decimal_separator_comma":1,"elements":[{"text":"Peso","values":[100.5,101.5,102.5,
102,103,107,109,110.5,108],"font-size":10,"type":"line","tip":"Linha do Peso"}],"num_decimals":2,"is_fixed_num_decimals_forced":1,"x_axis":{
"colour":"#96A9C5","grid-colour":"#DDDEE1","labels":{"rotate":"-24","labels":["01/05/10","15/05/10","25/05/10","01/06/10","09/06/10","25/06/
10","05/07/10","10/07/10","20/07/10"]}},"is_thousand_separator_disabled":0} 

But than using JBoss5 the follow string is printed, notice the html encode replacement for double quotes:

{&quot;y_axis&quot;:{&quot;min&quot;:100,&quot;colour&quot;:&quot;#96A9C5&quot;,&quot;grid-colour&quot;:&quot;#DDDEE1&quot;,&quot;max&quot;:112},&quot;title&quot;:{&quot;text&quot;:&quot;Gr&aacute;fico de evolu&ccedil;&atilde;o de Peso&quot;},&quot;bg_colour&quot;:&quot;#FFFFFF&quot;,&quot;is_decimal_separator_comma&quot;:1,&quot;elements&quot;:[{&quot;text&quot;:&quot;Peso&quot;,&quot;values&quot;:[100.5,101.5,102.5,102,103,107,109,110.5,108],&quot;font-size&quot;:10,&quot;type&quot;:&quot;line&quot;,&quot;tip&quot;:&quot;Linha do Peso&quot;}],&quot;num_decimals&quot;:2,&quot;is_fixed_num_decimals_forced&quot;:1,&quot;x_axis&quot;:{&quot;colour&quot;:&quot;#96A9C5&quot;,&quot;grid-colour&quot;:&quot;#DDDEE1&quot;,&quot;labels&quot;:{&quot;rotate&quot;:&quot;-24&quot;,&quot;labels&quot;:[&quot;01/05/10&quot;,&quot;15/05/10&quot;,&quot;25/05/10&quot;,&quot;01/06/10&quot;,&quot;09/06/10&quot;,&quot;25/06/10&quot;,&quot;05/07/10&quot;,&quot;10/07/10&quot;,&quot;20/07/10&quot;]}},&quot;is_thousand_separator_disabled&quot;:0}

I have already checked O.S locale and also did a configuration on jboss http channel to encode the body in server.xml:

<!-- A HTTP/1.1 Connector on port 8080 -->
      <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" 
               connectionTimeout="20000" redirectPort="8443" useBodyEncodingForURI="true"/>

It didn’t work. We use UTF-8 for all resources and pages in our app.

Any clues?

Tx in advance.
[]s

  • 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-17T23:09:38+00:00Added an answer on May 17, 2026 at 11:09 pm

    I took a look at jsf documentation to review it and found f:verbatim tag. It fixed the issue. Now my .xhtml page where the json string is printed is like:

    <f:view xmlns="http://www.w3.org/1999/xhtml"
       xmlns:f="http://java.sun.com/jsf/core"
       contentType="text/json" >
    
      <f:verbatim> 
       #{jsonGraficoPesoUsuario}
       </f:verbatim>
    </f:view>
    

    Now the result json string is not changed and the graphic renders properly.

    []s

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

Sidebar

Related Questions

I have a c# .NET 2.0 application that has been running on W2K/IIS5 quite
I've got a fairly large MFC application that has just been migrated from VS6.0
An application that has been working well for months has stopped picking up the
Background: We have an application that has been in the works for over a
Ok, I'm developing an application that has been in pretty much continous development over
We have an application that has to be flexible in how it displays it's
I have this web application that has grown to an unmanageable mess. I want
I have an application that has created a number of custom event log sources
I have an application that has Powershell 1 embedded into it, but we need
I work on an application that has a both a GUI (graphical) and API

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.