Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 and UTF-8

 
antonio alcantara
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone

I have the next code in a jsp using Struts 2

<a href="<s:url action="management"><s:param name="action">showAuthor</s:param><s:param name="showingAuthor"><s:property value="autor"/></s:param></s:url>" class="autorlistado"><s:property value="autor"/></a>

Let's say for example that the property autor is "José". It is shown alright in the browser, but when I click it and get the showingAuthor in the action file, I get something like "Josquoete". It seems that the param name is not getting the UTF-8 encoding and I'm not able to fix it.

I have this in the Jsp: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %>

And in the struts.xml:

- ?xml version="1.0" encoding="ISO-8859-1" ?>
- constant name="struts.i18n.encoding" value="UTF-8"/>

Does anybody knows how to get the correct UTF-8 string in the action file???

Thanks very much in advance for your time and attention
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic