过滤器链实现中文转码和文字屏蔽功能(2)
<input type="submit" name="submit" value="提交">
</td>
</tr>
</table>
</form>
</body>
</html>
[html]
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<html>
<head>
</head>
<body>
用户名 :<%=request.getAttribute("title")%><br/>
留言信息:<%=request.getAttribute("content")%>
</body>
</html>
[html]
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>CharacterFilter</filter-name>
<filter-class>com.mars.filter.CharacterFilter</filter-class>
</filter>
<filter>
<filter-name>WordFilter</filter-name>
<filter-class>com.mars.filter.WordFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterFilter</filter-name>
<url-pattern>/MessageServlet</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>WordFilter</filter-name>
<url-pattern>/MessageServlet</url-pattern>
相关新闻>>
- 发表评论
-
- 最新评论 更多>>