struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolás Pace" <nicop...@gmail.com>
Subject Problem with json and encoding
Date Fri, 21 Sep 2007 18:00:01 GMT
Hi!
I'm using json-taglib [0] to populate lists of users (user: username,
id, name, surname, description) to an s:autocompleter tag.
I put the code in [1] of json.
I put the snipplet of jsp in [2].
the system i'm developing is for spanish speakers, so some times they
use non ascii characters in those fields.
Those characters (for instance, 'ñ', 'é', ...) are rendered as (
"&#xF1;" and "&#xE9;" respectively)
I have added the next line, but it dosn't seem to do anything.
<%@ page language="java" contentType="application/json; charset=UTF-8"
pageEncoding="UTF-8"%>
I hope you can help me!!
Thanks in advance

Nicolas Pace

[0] http://json-taglib.sourceforge.net/
[1]
<%@ taglib prefix="json" uri="http://www.atg.com/taglibs/json" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<json:array>
<s:iterator value="lista" id="bean">
<json:array>
<json:property><s:property value="%{#bean.nombre}"/></json:property>
<json:property><s:property value="%{#bean.id}"></s:property></json:property>
</json:array>
</s:iterator>
</json:array>

[2]
<s:autocompleter name="revista.publicacion.nombre"
id="publicacion.nombre"  keyName="revista.publicacion.id"
href="publicacion!listar.action" />

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message