You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Vernon Wu <ve...@gatewaytech.com> on 2003/03/17 22:26:54 UTC

A url tag problem on Chinese characters: a bug or not

Here is the code in one of my JSP file:

  	<c:url value="search-by-id-action.do" var="viewItemURL">
		<c:param name="id" value="${item.personId}"/>
 	</c:url>
 	<a href='<c:out value="${viewItemURL}"/>'>
 		<c:out value="${item.personId}" />
	</a>    

When the person ID is Chinese characters, the ID displayed right, but not on the query string. I guess that the url 
parameter string is not encoded in utf-8 to take Chinese characters. I don't know whether it is a bug or not. How I go 
around this problem?

BTW, I have a case of using custom tags for the same purpose. It works find: Chinese characters are correct on the 
both displaying and url.  The code is shown below.

	<td ><fmt:message key="userid.title"/> 
		<a href="<%=request.getContextPath()%>/search-by-id-action.do?id=<mm:mAttribute 
attribute='id'/>">
			<mm:mAttribute attribute='id'/>
		</a> 
	</td>
 



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