医院系统医院系统医院系统


医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统医院系统
资源截图
代码片段和文件信息
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.mymetadata

     文件       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.settingsorg.eclipse.core.resources.prefs

     文件        137  2009-03-15 21:46  医院系统hospital.settingsorg.eclipse.ltk.core.refactoring.prefs

     文件        162  2009-03-15 21:47  医院系统hospital.settingsorg.eclipse.jdt.ui.prefs

     文件       1271  2009-03-15 21:47  医院系统hospital.settingsorg.eclipse.wst.validation.prefs

     文件        120  2009-03-15 21:47  医院系统hospital.settingscom.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  医院系统hospitalWebRootlogin.htm

     文件       1089  2009-03-15 21:52  医院系统hospitalWebRootmain.htm

     文件        810  2009-03-15 21:52  医院系统hospitalWebRoot op.htm

     文件       3581  2009-03-15 21:52  医院系统hospitalWebRootuserRegister.html

     文件        550  2009-03-15 22:06  医院系统hospitalWebRootindex.htm

     文件       5872  2009-03-15 22:11  医院系统hospitalWebRootLEFT.htm

     文件       2381  2009-03-15 21:56  医院系统hospitalWebRootdoctormedicalHistoryA.html

     文件       3880  2009-03-15 21:56  医院系统hospitalWebRootdoctormedicalHistoryE.html

     文件        785  2009-03-15 21:56  医院系统hospitalWebRootdoctormedicalHistorymess.html

     文件       2406  2009-03-15 22:00  医院系统hospitalWebRootdoctormedicalHistoryU.html

     文件        877  2009-03-15 21:56  医院系统hospitalWebRootdoctorpatientmess.html

     文件       4046  2009-03-15 22:00  医院系统hospitalWebRootdoctorpatientmessE.html

     文件       1965  2009-03-15 21:56  医院系统hospitalWebRootdoctorsittime.html

     文件       1527  2009-03-15 21:56  医院系统hospitalWebRootdoctoruploadFile.html

     文件       1831  2009-03-15 22:01  医院系统hospitalWebRootdoctorworklogA.html

     文件       2218  2009-03-15 22:01  医院系统hospitalWebRootdoctorworklogE.html

............此处省略198个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)