资源简介
医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统

代码片段和文件信息
package com.inspur.hospital.utils.SetCharacterEncoding;
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 SetCharacterEncodingFilter implements Filter {
// ----------------------------------------------------- Instance Variables
/**
* The default character encoding to set for requests that pass through
* this filter.
*/
private String encoding = null;
/**
* The filter configuration object we are associated with. If this value
* is null this filter instance is not currently configured.
*/
private FilterConfig filterConfig = null;
/**
* Should a character encoding specified by the client be ignored?
*/
private boolean ignore = true;
/**
* Take this filter out of service.
*/
public void destroy() {
this.encoding = null;
this.filterConfig = null;
}
/**
* Select and set (if specified) the character encoding to be used to
* interpret request parameters for this request.
*
* @param request The servlet request we are processing
* @param response The servlet response we are creating
* @param chain The filter chain we are processing
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
public void doFilter(ServletRequest request ServletResponse response FilterChain chain)
throws IOException ServletException {
// Conditionally select and set the character encoding to be used
if (ignore || (request.getCharacterEncoding() == null)) {
String encoding = selectEncoding(request);
if (encoding != null) {
request.setCharacterEncoding(encoding);
}
}
// Pass control on to the next filter
chain.doFilter(request response);
}
/**
* Place this filter into service.
*
* @param filterConfig The filter configuration object
* @throws ServletException ServletException
*/
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
this.encoding = filterConfig.getInitParameter(“encoding“);
String value = filterConfig.getInitParameter(“ignore“);
if (value == null) {
this.ignore = true;
} else if (value.equalsIgnoreCase(“true“)) {
this.ignore = true;
} else if (value.equalsIgnoreCase(“yes“)) {
this.ignore = true;
} else {
this.ignore = false;
}
}
// ------------------------------------------------------ Protected Methods
/**
* Select an appropriate character encoding to be used based on the
* characteristics of the current request and/or filter initialization
* parameters. If no character encoding should be set return
* null
.
*
* The default implementation unconditionally returns the value configure
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 118465 2009-03-15 17:45 医院系统\4-UI.rar
文件 37969 2009-03-15 17:53 医院系统\设计文档.rar
文件 1309 2009-03-15 21:28 医院系统\hospital\.project
文件 297 2009-03-15 21:15 医院系统\hospital\.myme
文件 1114 2009-03-15 21:15 医院系统\hospital\.classpath
文件 259 2009-03-15 21:47 医院系统\hospital\.mystrutsdata
文件 66 2009-03-15 21:47 医院系统\hospital\.myumldata
文件 89 2009-03-15 21:42 医院系统\hospital\.settings\org.eclipse.core.resources.prefs
文件 137 2009-03-15 21:46 医院系统\hospital\.settings\org.eclipse.ltk.core.refactoring.prefs
文件 162 2009-03-15 21:47 医院系统\hospital\.settings\org.eclipse.jdt.ui.prefs
文件 1271 2009-03-15 21:47 医院系统\hospital\.settings\org.eclipse.wst.validation.prefs
文件 120 2009-03-15 21:47 医院系统\hospital\.settings\com.genuitec.jboss.ide.eclipse.xdoclet.run.prefs
目录 0 2009-03-16 08:42 医院系统\hospital\.settings
目录 0 2009-03-16 08:42 医院系统\hospital\.myeclipse
文件 1498 2009-03-15 21:55 医院系统\hospital\WebRoot\login.htm
文件 1089 2009-03-15 21:52 医院系统\hospital\WebRoot\main.htm
文件 810 2009-03-15 21:52 医院系统\hospital\WebRoot\top.htm
文件 3581 2009-03-15 21:52 医院系统\hospital\WebRoot\userRegister.html
文件 550 2009-03-15 22:06 医院系统\hospital\WebRoot\index.htm
文件 5872 2009-03-15 22:11 医院系统\hospital\WebRoot\LEFT.htm
文件 2381 2009-03-15 21:56 医院系统\hospital\WebRoot\doctor\medicalHistoryA.html
文件 3880 2009-03-15 21:56 医院系统\hospital\WebRoot\doctor\medicalHistoryE.html
文件 785 2009-03-15 21:56 医院系统\hospital\WebRoot\doctor\medicalHistorymess.html
文件 2406 2009-03-15 22:00 医院系统\hospital\WebRoot\doctor\medicalHistoryU.html
文件 877 2009-03-15 21:56 医院系统\hospital\WebRoot\doctor\patientmess.html
文件 4046 2009-03-15 22:00 医院系统\hospital\WebRoot\doctor\patientmessE.html
文件 1965 2009-03-15 21:56 医院系统\hospital\WebRoot\doctor\sittime.html
文件 1527 2009-03-15 21:56 医院系统\hospital\WebRoot\doctor\uploadFile.html
文件 1831 2009-03-15 22:01 医院系统\hospital\WebRoot\doctor\worklogA.html
文件 2218 2009-03-15 22:01 医院系统\hospital\WebRoot\doctor\worklogE.html
............此处省略198个文件信息
- 上一篇:基于stm32的环境检测系统
- 下一篇:北航-《高等计算机网络》课件
相关资源
- AutoCAD系统变量一览表.doc
- 公司年会抽奖系统
- 希捷硬盘套件助系统构建商把握Vist
- GBT 20438.5-2017(IEC 61508-5-2010) 电气 电
- windows XP 系统关闭445端口方法
- 双通道数据采集系统加界面美化.vi(
- linux系统下的内存测试工具
- GNU/Linux系统开发者需要从桌面突破
- STC15F
- 2019年软考高级下半年信息系统项目管
- 用户系统操作手册
- HumanDet(公交车系统模式识别)
- 51智能排课系统大课表版v5.1.3中文免费
- 系统鲁棒控制理论简介.ppt
- 数据库系统基础教程答案第三版机械
- 酒店管理系统基于Qt Creator5)
- 软考数据库系统工程师复习资料(完
- 设备管理系统源码
- 价值2k的H漫画小说系统
- DV泵加罗茨泵独立控制系统PID.smart
- 基于ACCESS的生产管理信息系统.mdb
- 电力系统潮流计算程序集合
- 升腾Win终端系统升级方法新版.doc
- 批处理获取系统版本及位数
- Uninstall_Cortana_WINCLIENT.CN.rar
-
大数据。基于Hba
se的网站日志分析系 - Python全栈学习笔记面向对象大作业:
- 一个超简单的企业管理系统(带ACCE
- PowerBuilder*图书馆管理系统*需求分析
- B/S 网上订餐系统
评论
共有 条评论