src/common/web/Servlet.java
(完整代码) 1KB/**
* @公司 力龙
* @作者 陈友华
* @日期 2008-6-21
*
*/
package common.web;
import java.io.File;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionServlet;
public class Servlet extends ActionServlet {
private static final long serialVersionUID = 1L;
private String code;
public void init() throws ServletException {
super.init();
this.code = this.getInitParameter("code");
if (this.getInitParameter("useHibernateFilter").trim()
.endsWith("false"))
this.initSpring();
}
protected void process(HttpServletRequest arg0, HttpServletResponse arg1)
throws IOException, ServletException {
arg0.setCharacterEncoding(this.code);
super.process(arg0, arg1);
}
private void initSpring() {
String path[] = this.getInitParameter("spring-bean").split(",");
String webRoot = this.getServletConfig().getServletContext()
.getRealPath("");
for (int i = 0; i < path.length; i++) {
path[i] = webRoot + File.separator + path[i];
}
// BeanFactory.init(path);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。