| Author |
special characters in JSTL
|
Haiko van der Schaaf
Greenhorn
Joined: Jan 19, 2005
Posts: 8
|
|
Hoi, I got a problem with displaying the character �. The code of the jsp is: <c ut value="${someproperty}" escapeXml="false"/> The static content in the JSP displays the � correctly, but in the out-tag the character is misformed. I have set the page encoding and contentType of the page in utf-8 and the string someproperty correctly shows an � with debugging, but somewhere in the translation from the controller to the view the character is misformed. Has anyone an idea what happens ?? Thanks Haiko
|
 |
Haiko van der Schaaf
Greenhorn
Joined: Jan 19, 2005
Posts: 8
|
|
problem was in the <c:import> tag. When I add the attribute charEncoding with the value utf-8 the problem was solved. I did a recursive import in this jsp file(mijnxtranet/notifylevel.jsp). The complete code is: What a bit strange is that the directive is overruled by the import attribute. <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> <%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el"%> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el"%> <%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic-el"%> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%> <%@ taglib uri="/WEB-INF/c.tld" prefix="c"%> <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> <html-el:xhtml /> <c:set var="my_node" value="${requestScope.recurse_node}" /> <c:set var="ulclass" value="open" /> <c:if test="${!my_node.uitgeklapt}"> <c:set var="ulclass" value="closed" /> </c:if> <ul id="<c ut value='ul_${my_node.klapTagValue}' />" class="<c ut value='${ulclass}' />"> <c:forEach var="curcat" items="${my_node.children}"> <li id="<c ut value='${curcat.klapTagValue}' />"> <%-- klapbaar: <c ut value="${curcat.klapbaar}" /> uitgeklapt: <c ut value="${curcat.uitgeklapt}" /> --%> <c:choose> <c:when test="${curcat.klapbaar}"> <c:choose> <c:when test="${curcat.uitgeklapt}"> <html-el:img src="/images/global/min.gif" styleId="img_${curcat.klapTagValue}" border="0" alt="" /> </c:when> <c therwise> <html-el:img src="/images/global/plus.gif" styleId="img_${curcat.klapTagValue}" border="0" alt="" /> </c therwise> </c:choose> </c:when> <c therwise> <html-el:img src="/images/global/minplusspacer.gif" border="0" alt="" /> </c therwise> </c:choose> <c:set var="checked" value="" /> <c:if test="${curcat.checked == true}"> <c:set var="checked" value="checked" /> </c:if> <input type="checkbox" name="cat_<c ut value="${curcat.id}"/>" value="<c ut value="${curcat.id}"/>" <c ut value="${checked}"/> <c:if test="${!curcat.allChildrenChecked}"> style="background-color: #ddd"</c:if> /> <c ut value="${curcat.naam}" /> <c:if test="${not empty curcat.children}"> <c:set var="recurse_node" value="${curcat}" scope="request" /> <c:import url="../mijnxtranet/notifylevel.jsp" charEncoding="UTF-8"/> </c:if> </li> </c:forEach> </ul> <c:set var="recurse_node" value="${my_node}" scope="request" /> [ August 07, 2006: Message edited by: Haiko van der Schaaf ]
|
 |
 |
|
|
subject: special characters in JSTL
|
|
|