<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="fck"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<c:out value="${param.content}"/>
<form action="<c:url value='/test.jsp'/>" method="post">
<fck:editor id="content" basePath="/arden/javascripts/fckeditor-2.6/" width="100%" height="400">test</fck:editor>
</form>
</body>
</html>
Mon, 04/21/2008 - 18:47
#1

Re: UTF-8 problem in jsp
package arden.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class EncodingFilter implements Filter { private String encoding; public void destroy() { } public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { request.setCharacterEncoding(encoding); filterChain.doFilter(request, response); } public void init(FilterConfig filterConfig) throws ServletException { this.encoding = filterConfig.getInitParameter("encoding"); } }In web.xml file:
Re: UTF-8 problem in jsp
Re: UTF-8 problem in jsp
Re: UTF-8 problem in jsp
I did a quick test and if you set the encoding the way it should be done, all works fine.
check my attached files to see my test.
Attachments:
Re: UTF-8 problem in jsp
http://forum.java.sun.com/thread.jspa?m ... D=10229520
Re: UTF-8 problem in jsp
http://confluence.atlassian.com/display ... I+encoding
http://wiki.apache.org/tomcat/FAQ/Connectors#Q8
Re: UTF-8 problem in jsp
http://forum.java.sun.com/thread.jspa?m ... D=10229520
Re: UTF-8 problem in jsp
Re: UTF-8 problem in jsp
Thanks.