%@page import="com.forgon.disinfectsystem.common.CssdUtils"%> <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@page import="java.io.File" %> <%@page import="java.util.ArrayList" %> <%@page import="org.apache.commons.lang.StringUtils"%> <% ArrayList message = new ArrayList(); //用户名 String un = request.getParameter("un"); //密码 String up = request.getParameter("up"); if(StringUtils.isBlank(un)){ message.add("用户名不能为空"); }else if(StringUtils.isBlank(up)){ message.add("密码不能为空"); } pageContext.setAttribute("un", un); pageContext.setAttribute("up", up); pageContext.setAttribute("message", message); String companyName = CssdUtils.getSystemSetConfigByName("companyName"); String companyNameStr = ""; if(companyName == null || companyName.equals("forgon")){ companyNameStr = "©2016 广州孚峻信息技术有限公司 版权所有"; }else if(companyName.equals("dingxiang")){ companyNameStr = "©2016 广州丁香软件有限公司 版权所有"; } session.setAttribute("companyName", companyNameStr); String project = CssdUtils.getConfigProperty("project"); session.setAttribute("profile", project); String imgPath = "disinfectsystem/config/" + project + "/img/logo_" + project +".png"; //System.out.println(application.getRealPath("/") + imgPath); File file = new File(application.getRealPath("/") + imgPath); if(file.exists()){ request.setAttribute("logoPath",imgPath); }else{ if(companyName == null || companyName.equals("forgon")){ request.setAttribute("logoPath","themes/portalPage/img/logo_Forgon.png"); }else if(companyName.equals("dingxiang")){ request.setAttribute("logoPath","themes/portalPage/img/logo_dingxiangsoft.png"); } } %>