Commit d72f48cf by 罗绍泽

修改

parent f41d789a
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<proxool-config> <proxool-config>
<proxool> <proxool>
<alias>system</alias> <alias>system</alias>
<driver-url>jdbc:mysql://192.168.1.116:3306/jw_system</driver-url> <driver-url>jdbc:mysql://192.168.1.249:3306/jf_system</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class> <driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties> <driver-properties>
<property name="user" value="jw_system" /> <property name="user" value="jf_system" />
<property name="password" value="jw_system" /> <property name="password" value="jf_system" />
<property name="useUnicode" value="true" /> <property name="useUnicode" value="true" />
<property name="characterEncoding" value="utf8" /> <property name="characterEncoding" value="utf8" />
</driver-properties> </driver-properties>
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
</proxool> </proxool>
<proxool> <proxool>
<alias>quartz</alias> <alias>quartz</alias>
<driver-url>jdbc:mysql://192.168.1.116:3306/jw_quartz</driver-url> <driver-url>jdbc:mysql://192.168.1.249:3306/jf_quartz</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class> <driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties> <driver-properties>
<property name="user" value="jw_quartz" /> <property name="user" value="jf_quartz" />
<property name="password" value="jw_quartz" /> <property name="password" value="jf_quartz" />
<property name="useUnicode" value="true" /> <property name="useUnicode" value="true" />
<property name="characterEncoding" value="utf8" /> <property name="characterEncoding" value="utf8" />
</driver-properties> </driver-properties>
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
</proxool> </proxool>
<proxool> <proxool>
<alias>report</alias> <alias>report</alias>
<driver-url>jdbc:mysql://192.168.1.116:3306/jw_report</driver-url> <driver-url>jdbc:mysql://192.168.1.249:3306/jf_report</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class> <driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties> <driver-properties>
<property name="user" value="jw_report" /> <property name="user" value="jf_report" />
<property name="password" value="jw_report" /> <property name="password" value="jf_report" />
<property name="useUnicode" value="true" /> <property name="useUnicode" value="true" />
<property name="characterEncoding" value="utf8" /> <property name="characterEncoding" value="utf8" />
</driver-properties> </driver-properties>
...@@ -62,11 +62,11 @@ ...@@ -62,11 +62,11 @@
</proxool> </proxool>
<proxool> <proxool>
<alias>standard</alias> <alias>standard</alias>
<driver-url>jdbc:mysql://192.168.1.116:3306/jw_standard</driver-url> <driver-url>jdbc:mysql://192.168.1.249:3306/jf_standard</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class> <driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties> <driver-properties>
<property name="user" value="jw_standard" /> <property name="user" value="jf_standard" />
<property name="password" value="jw_standard" /> <property name="password" value="jf_standard" />
<property name="useUnicode" value="true" /> <property name="useUnicode" value="true" />
<property name="characterEncoding" value="utf8" /> <property name="characterEncoding" value="utf8" />
</driver-properties> </driver-properties>
...@@ -82,11 +82,11 @@ ...@@ -82,11 +82,11 @@
</proxool> </proxool>
<proxool> <proxool>
<alias>apps</alias> <alias>apps</alias>
<driver-url>jdbc:mysql://192.168.1.116:3306/jw_apps</driver-url> <driver-url>jdbc:mysql://192.168.1.249:3306/jf_apps</driver-url>
<driver-class>com.mysql.jdbc.Driver</driver-class> <driver-class>com.mysql.jdbc.Driver</driver-class>
<driver-properties> <driver-properties>
<property name="user" value="jw_apps" /> <property name="user" value="jf_apps" />
<property name="password" value="jw_apps" /> <property name="password" value="jf_apps" />
<property name="useUnicode" value="true" /> <property name="useUnicode" value="true" />
<property name="characterEncoding" value="utf8" /> <property name="characterEncoding" value="utf8" />
</driver-properties> </driver-properties>
......
...@@ -7,18 +7,6 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j ...@@ -7,18 +7,6 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<param-value>jfV4platform.root</param-value> <param-value>jfV4platform.root</param-value>
</context-param> </context-param>
<listener>
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>
<filter>
<filter-name>CAS Single Sign Out Filter</filter-name>
<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CAS Single Sign Out Filter</filter-name>
<url-pattern>/logoutcas.jsp</url-pattern>
</filter-mapping>
<context-param> <context-param>
<!-- log4j配置文件位置 --> <!-- log4j配置文件位置 -->
<param-name>log4jConfigLocation</param-name> <param-name>log4jConfigLocation</param-name>
...@@ -40,7 +28,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j ...@@ -40,7 +28,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<context-param> <context-param>
<param-name>proxoolConfigLocation</param-name> <param-name>proxoolConfigLocation</param-name>
<param-value>/WEB-INF/conf/gaowj/bl/proxool.xml</param-value> <param-value>WEB-INF/conf/gaowj/bl/proxool.xml</param-value>
</context-param> </context-param>
<listener> <listener>
...@@ -80,17 +68,17 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j ...@@ -80,17 +68,17 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param> <init-param>
<param-name>casServerLoginUrl</param-name> <param-name>casServerLoginUrl</param-name>
<param-value>http://192.168.1.116:8080/cas-test01/login</param-value><!-- cas 服务器登录 地址 http://IP:PORT/CasWebProName/login --> <param-value>http://cas.jfbrother.com:9003/cas-test01/login</param-value><!-- cas 服务器登录 地址 http://IP:PORT/CasWebProName/login -->
</init-param> </init-param>
<init-param> <init-param>
<!-- 这里的server是服务端的IP --> <!-- 这里的server是服务端的IP -->
<param-name>serverName</param-name> <param-name>serverName</param-name>
<param-value>http://192.168.1.116:8081</param-value><!-- 客户端服务器地址 http://IP:PORT --> <param-value>http://base.portal.jfbrother.com:9003</param-value><!-- 客户端服务器地址 http://IP:PORT -->
</init-param> </init-param>
</filter> </filter>
<filter-mapping> <filter-mapping>
<filter-name>CASFilter</filter-name> <filter-name>CASFilter</filter-name>
<url-pattern>/cas.jsp</url-pattern> <url-pattern>/jfcas</url-pattern>
<!-- <url-pattern>/*</url-pattern> --> <!-- <url-pattern>/*</url-pattern> -->
</filter-mapping> </filter-mapping>
...@@ -100,16 +88,16 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j ...@@ -100,16 +88,16 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class> <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param> <init-param>
<param-name>casServerUrlPrefix</param-name> <param-name>casServerUrlPrefix</param-name>
<param-value>http://192.168.1.116:8080/cas-test01</param-value><!-- cas 服务器地址 http://IP:PORT/CasWebProName --> <param-value>http://cas.jfbrother.com:9003/cas-test01</param-value><!-- cas 服务器地址 http://IP:PORT/CasWebProName -->
</init-param> </init-param>
<init-param> <init-param>
<param-name>serverName</param-name> <param-name>serverName</param-name>
<param-value>http://192.168.1.116:8081</param-value><!-- 客户端服务器地址 http://IP:PORT --> <param-value>http://base.protal.jfbrother.com:9003</param-value><!-- 客户端服务器地址 http://IP:PORT -->
</init-param> </init-param>
</filter> </filter>
<filter-mapping> <filter-mapping>
<filter-name>CAS Validation Filter</filter-name> <filter-name>CAS Validation Filter</filter-name>
<url-pattern>/cas.jsp</url-pattern> <url-pattern>/jfcas</url-pattern>
</filter-mapping> </filter-mapping>
<!-- 该过滤器负责实现HttpServletRequest请求的包裹, <!-- 该过滤器负责实现HttpServletRequest请求的包裹,
...@@ -123,6 +111,20 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j ...@@ -123,6 +111,20 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<url-pattern>/*</url-pattern> <url-pattern>/*</url-pattern>
</filter-mapping> </filter-mapping>
<!-- 单点注销监听器 -->
<listener>
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>
<!-- 单点注销过滤器 -->
<filter>
<filter-name>caslogoutFilter</filter-name>
<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>caslogoutFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter> <filter>
<filter-name>struts2</filter-name> <filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
......
<%@ page contentType="text/html; charset=UTF-8" %> <script type="text/javascript">
<%@ page import="org.jasig.cas.client.authentication.AttributePrincipal" %> var WebContextPath = '<%=request.getContextPath() %>';
<%@ page import="org.jasig.cas.client.util.AssertionHolder"%> window.location = WebContextPath + "/jfcas";
<%@ page import="com.gaowj.business.comp.BusinessManager" %> </script>
<%@ page import="com.gaowj.business.SystemOpeBusiness" %> \ No newline at end of file
<%@ page import="com.gaowj.business.util.Java_tool" %>
<%@ page import="java.util.*" %>
<%@ page import="java.util.Map" %>
<%
//解决在IE的frame/iframe环境下,跨域单点登录后,无法重定向的问题
response.setHeader("P3P","CP=CAO PSA OUR");
%>
<%
AttributePrincipal principal = (AttributePrincipal)request.getUserPrincipal();
Map<String, Object> attributes = principal.getAttributes();
String userID = attributes.get("userid").toString();
String userName = attributes.get("USER_NAME").toString();
System.out.println("-----1"+userID);
System.out.println("-----2"+userName);
System.out.println("-----3"+attributes.get("UNIT_ID"));
if(userID!=null){
String username = userID;
Java_tool jt = new Java_tool();
SystemOpeBusiness systemOpeBusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
Map query = new HashMap();
query.put("EMID", username);
Map<String,Object> userInfoI = systemOpeBusiness.listLoginUserInfo(query).get(0);
Map<String,Object> sessionUser = new HashMap<String,Object>();
String u_all_m = systemOpeBusiness.getUserAllModule(userInfoI.get("CODE").toString());
sessionUser.put("CODE",userInfoI.get("CODE"));
sessionUser.put("EMID",userInfoI.get("EMID"));
sessionUser.put("EMSEX",userInfoI.get("EMSEX"));
sessionUser.put("EMDEPARTNAME",userInfoI.get("EMDEPARTNAME"));
sessionUser.put("EMDEPART",userInfoI.get("EMDEPART"));
sessionUser.put("EMNAME",userInfoI.get("EMNAME"));
sessionUser.put("BEFORETIME",userInfoI.get("BEFORETIME"));
sessionUser.put("SESSIONID", request.getSession().getId());
sessionUser.put("CURRENTTIME", jt.now_datetime());
sessionUser.put("LOGINIP", request.getRemoteAddr());
sessionUser.put("SERVERIP", request.getLocalAddr());
sessionUser.put("QUANXIAN",u_all_m);
request.getSession().setAttribute("userInfo", sessionUser);
//增加登陆日志
Map<String,Object> log = new HashMap<String,Object>();
log.put("CODE", sessionUser.get("CODE"));log.put("EMNAME", sessionUser.get("EMNAME"));log.put("EMIP", sessionUser.get("LOGINIP"));
log.put("OPENAME", "登陆");log.put("OPETIME", jt.String3date((String)sessionUser.get("CURRENTTIME")));log.put("TYPE", userInfoI.get("TYPE"));
log.put("OPETYPE", "B/S登陆");
systemOpeBusiness.insert_log(log);
}
String strRedirecturl = request.getParameter("redirectUrl");
if(strRedirecturl != null && strRedirecturl.length() > 0) {
response.sendRedirect(strRedirecturl);
}else{
response.sendRedirect("index.jsp");
}
response.getWriter().println("123");
%>
\ No newline at end of file
WebContent/images/main/nbjwtop.jpg

12 KB | W: | H:

WebContent/images/main/nbjwtop.jpg

31.2 KB | W: | H:

WebContent/images/main/nbjwtop.jpg
WebContent/images/main/nbjwtop.jpg
WebContent/images/main/nbjwtop.jpg
WebContent/images/main/nbjwtop.jpg
  • 2-up
  • Swipe
  • Onion skin
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.gaowj.business.util.XmlManager"%>
<%
System.out.println("logout ...........");
session.invalidate();
%>
<html>
<head>
<title>系统正在退出登录,请稍候...</title>
</head>
<body onload="window.top.location = 'http://192.168.0.245:8180/cas-test01/logout?service=http://192.168.0.245:8080/jwmagicIdentity/cas.jsp'">
<!-- <iframe src="http://localhost:8180/cas-test01/logout" style="display: none"></iframe> -->
<iframe src="<%=XmlManager.getItemValue("casFilterConfig","loginServer")%>/logout" style="display: none"></iframe>
<iframe src="<%=XmlManager.getItemValue("casFilterConfig","validateServer")%>/logout" style="display: none"></iframe>
<iframe src="<%=XmlManager.getItemValue("casFilterConfig","loginServer")%>/clearCookies.jsp" style="display: none"></iframe>
<div align="center">
系统正在退出登录,请稍候...
</div>
</body>
</html>
\ No newline at end of file
...@@ -158,10 +158,4 @@ ...@@ -158,10 +158,4 @@
memoryStoreEvictionPolicy="LRU" memoryStoreEvictionPolicy="LRU"
/> />
<cache name="ehcache11"
maxElementsInMemory="10000"
eternal="true"
overflowToDisk="true"
/>
</ehcache> </ehcache>
...@@ -8,7 +8,8 @@ loginuser_depart=A ...@@ -8,7 +8,8 @@ loginuser_depart=A
#人员和单位未选择要推送应用时是否全推1=全推0=不推 #人员和单位未选择要推送应用时是否全推1=全推0=不推
pushdata_default=0 pushdata_default=0
#上传文件保存路径 #上传文件保存路径
uploadPath=c\:\\tmp\\ uploadPath=/jfbrother
#uploadPath=E:\\jfbrother\
#上传文件大小限制 #上传文件大小限制
uploadMaxSize=10485760 uploadMaxSize=10485760
...@@ -36,7 +37,7 @@ admin=cn=manager,dc=sky,dc=org ...@@ -36,7 +37,7 @@ admin=cn=manager,dc=sky,dc=org
password=secret password=secret
#--------ldap与oracle同步操作开关值 1为同步操作,0位不同步操作 #--------ldap与oracle同步操作开关值 1为同步操作,0位不同步操作
flag=1 flag=0
#--------更新编辑操作时,是否推送,0为不推送,1为推送 #--------更新编辑操作时,是否推送,0为不推送,1为推送
pushflag=0 pushflag=0
#--------新增个人编辑组 #--------新增个人编辑组
......
...@@ -271,4 +271,10 @@ ...@@ -271,4 +271,10 @@
</result> </result>
</action> </action>
</package> </package>
<package name="caslogin" extends="struts-default,json-default">
<action name="jfcas" class="com.gaowj.system.login.CasAction">
</action>
</package>
</struts> </struts>
\ No newline at end of file
package com.jw.app.apps.action; package com.jw.app.apps.action;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -13,6 +14,7 @@ import com.gaowj.business.action.BasicAction; ...@@ -13,6 +14,7 @@ import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager; import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Encipher; import com.gaowj.business.util.Encipher;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.RequestUtils; import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.AppsBusiness; import com.jw.app.business.AppsBusiness;
import com.gaowj.business.SystemOpeBusiness; import com.gaowj.business.SystemOpeBusiness;
...@@ -444,7 +446,8 @@ public class actAction extends BasicAction{ ...@@ -444,7 +446,8 @@ public class actAction extends BasicAction{
} }
public String uploadApp() throws BusinessException{ public String uploadApp() throws BusinessException{
String upPath = request.getSession().getServletContext().getRealPath("/uploadFile/apps/apps"); String upPath = PropUtil.getValue("uploadPath", "quartz_service","")+File.separator+"apps";
//String upPath = request.getSession().getServletContext().getRealPath("/uploadFile/apps/apps");
super.setUserUploadFilePath(upPath); super.setUserUploadFilePath(upPath);
return super.upload(); return super.upload();
} }
......
<%@ page contentType="text/html; charset=UTF-8" %> package com.gaowj.system.login;
<%@ page import="com.gaowj.tp.sso.client.filter.CASFilterRequestW" %>
<%@ page import="com.gaowj.business.comp.BusinessManager" %> import java.io.IOException;
<%@ page import="com.gaowj.business.SystemOpeBusiness" %> import java.util.HashMap;
<%@ page import="com.gaowj.business.util.Java_tool" %> import java.util.Map;
<%@ page import="java.util.*" %>
<% import org.jasig.cas.client.authentication.AttributePrincipal;
//解决在IE的frame/iframe环境下,跨域单点登录后,无法重定向的问题
response.setHeader("P3P","CP=CAO PSA OUR"); import com.gaowj.business.SystemOpeBusiness;
%> import com.gaowj.business.action.BasicAction;
<% import com.gaowj.business.comp.BusinessManager;
CASFilterRequestW reqWrapper=new CASFilterRequestW(request); import com.gaowj.business.exception.BusinessException;
String userID = reqWrapper.getRemoteUser(); import com.gaowj.business.util.Java_tool;
String userFlag = reqWrapper.getUserFlag();
System.out.println("print userFlag"); public class CasAction extends BasicAction {
System.out.println("userFlag:"+userFlag);
if(userID!=null){ /**
*
*/
private static final long serialVersionUID = 4192673206777760091L;
public String execute() throws BusinessException {
response.setHeader("P3P","CP=CAO PSA OUR");
AttributePrincipal principal = (AttributePrincipal)request.getUserPrincipal();
Map<String, Object> attributes = principal.getAttributes();
String userID = attributes.get("userid").toString();
String userName = attributes.get("USER_NAME").toString();
System.out.println("-----1"+userID);
System.out.println("-----2"+userName);
System.out.println("-----3"+attributes.get("UNIT_ID"));
if(userID!=null){
String username = userID; String username = userID;
Java_tool jt = new Java_tool(); Java_tool jt = new Java_tool();
SystemOpeBusiness systemOpeBusiness = BusinessManager.getBusiness(SystemOpeBusiness.class); SystemOpeBusiness systemOpeBusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
Map query = new HashMap(); Map<String,Object> query = new HashMap<String,Object>();
query.put("EMID", username); query.put("EMID", username);
Map<String,Object> userInfoI = systemOpeBusiness.listLoginUserInfo(query).get(0); Map<String,Object> userInfoI = systemOpeBusiness.listLoginUserInfo(query).get(0);
Map<String,Object> sessionUser = new HashMap<String,Object>(); Map<String,Object> sessionUser = new HashMap<String,Object>();
String u_all_m = systemOpeBusiness.getUserAllModule((String)userInfoI.get("CODE")); String u_all_m = systemOpeBusiness.getUserAllModule(userInfoI.get("CODE").toString());
sessionUser.put("CODE",userInfoI.get("CODE")); sessionUser.put("CODE",userInfoI.get("CODE"));
sessionUser.put("EMID",userInfoI.get("EMID")); sessionUser.put("EMID",userInfoI.get("EMID"));
sessionUser.put("EMSEX",userInfoI.get("EMSEX")); sessionUser.put("EMSEX",userInfoI.get("EMSEX"));
...@@ -44,12 +59,21 @@ if(userID!=null){ ...@@ -44,12 +59,21 @@ if(userID!=null){
log.put("OPENAME", "登陆");log.put("OPETIME", jt.String3date((String)sessionUser.get("CURRENTTIME")));log.put("TYPE", userInfoI.get("TYPE")); log.put("OPENAME", "登陆");log.put("OPETIME", jt.String3date((String)sessionUser.get("CURRENTTIME")));log.put("TYPE", userInfoI.get("TYPE"));
log.put("OPETYPE", "B/S登陆"); log.put("OPETYPE", "B/S登陆");
systemOpeBusiness.insert_log(log); systemOpeBusiness.insert_log(log);
} }
String strRedirecturl = request.getParameter("redirectUrl"); String strRedirecturl = request.getParameter("redirectUrl");
String toUrl = "";
if(strRedirecturl != null && strRedirecturl.length() > 0) { if(strRedirecturl != null && strRedirecturl.length() > 0) {
response.sendRedirect(strRedirecturl); toUrl = strRedirecturl;
}else{ }else{
response.sendRedirect("index.jsp"); toUrl = "index.jsp";
}
try {
response.sendRedirect(toUrl);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} }
response.getWriter().println("123"); return null;
%> }
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment