-
+
<%=appName%>
-
-
-
-
-
-
-
-
-
-
+
+
-
diff --git a/APDPlat_Web/src/main/webapp/login_no_merge.jsp b/APDPlat_Web/src/main/webapp/login_no_merge.jsp
new file mode 100644
index 00000000..cd50b475
--- /dev/null
+++ b/APDPlat_Web/src/main/webapp/login_no_merge.jsp
@@ -0,0 +1,182 @@
+<%--
+ APDPlat - Application Product Development Platform
+ Copyright (c) 2013, 杨尚川, yang-shangchuan@qq.com
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.apdplat.module.security.service.OnlineUserService"%>
+<%@page import="org.apdplat.module.security.service.SpringSecurityService"%>
+<%@page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter"%>
+<%@page import="org.apdplat.module.security.service.UserDetailsServiceImpl"%>
+<%@page import="org.apdplat.module.system.service.PropertyHolder"%>
+<%@page import="java.util.Collection"%>
+<%@page import="org.apdplat.platform.util.FileUtils"%>
+
+<%
+response.addHeader("login","true");
+//供记录用户登录日志使用
+String userAgent=request.getHeader("User-Agent");
+request.getSession().setAttribute("userAgent", userAgent);
+if(!SpringSecurityService.isSecurity()){
+ //如果没有启用安全机制则直接进入主界面
+ response.sendRedirect("platform/index.jsp");
+ return;
+}
+String name=OnlineUserService.getUsername(request.getSession(true).getId());
+if(!"匿名用户".equals(name)){
+ //用户已经等登录直接进入主界面
+ response.sendRedirect("platform/index.jsp");
+ return;
+}
+
+String message="";
+String state=request.getParameter("state");
+if(state!=null){
+ response.addHeader("state",state);
+}
+if("checkCodeError".equals(state)){
+ response.addHeader("checkCodeError","true");
+ message="验证码错误";
+ response.getWriter().write(message);
+ response.getWriter().flush();
+ response.getWriter().close();
+ return;
+}
+
+Object obj=session.getAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY);
+
+String lastUsername="";
+if(obj!=null){
+ lastUsername=obj.toString();
+ if(request.getParameter("login_error")!=null){
+ String tip=UserDetailsServiceImpl.getMessage(lastUsername);
+ if(tip!=null){
+ message=tip;
+ response.addHeader("login_error","true");
+ response.getWriter().write(message);
+ response.getWriter().flush();
+ response.getWriter().close();
+ return;
+ }
+ }
+ }
+String contextPath=org.apdplat.module.system.service.SystemListener.getContextPath();
+String appName=PropertyHolder.getProperty("app.name");
+String requestCode="";
+if(FileUtils.existsFile("/WEB-INF/licence")){
+ Collection reqs = FileUtils.getTextFileContent("/WEB-INF/licence");
+ if(reqs!=null && reqs.size()==1){
+ requestCode=reqs.iterator().next().toString();
+ }
+}
+String shortcut=PropertyHolder.getProperty("module.short.name");
+%>
+
+
+
+ <%=appName%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+