I have 2 jsp pages (a.jsp, b.jsp) both of them are showing the UTF-8 Strings correctly (i mean the arabic characters) also i can insert and retrieve to/from database without any issue.As i am using a character encoding filter for all request calls.
The problem is when i am adding a hyperlink with a Arabic query string parameter like this
a.jsp :
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<a href='/LoadProductByTypeId?abc=عربي'>link</a>
</body>
</html>
b.jsp :
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<c:out value="${param.abc}" />
</body>
</html>
in b.jsp the result comes as :
عربÙ
when i tried to print out the value of the parameter in the encoding filter it came as the same 'distorted' value.
Any help , really appreciated.