LOADPROTABLE.jsp 2.88 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="javax.servlet.http.HttpServletRequest,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.security.*,com.csc.library.cscexport.*,java.util.*,com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*,org.apache.log4j.xml.DOMConfigurator,javax.servlet.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="THEME/MASTER.css" rel="stylesheet" type="text/css">
<TITLE>TESTEXPORT.jsp</TITLE>
</HEAD>
<BODY>

<%

			UProfile up = new UProfile();
			up.setDbName("MYHRDBS");
			up.setUserName("M01");
			up.set("companyid","10");
			up.set("lang","tha");

			String lflag = request.getParameter("loadprocessdata");
			if (lflag == null || lflag.equals(""))
				lflag = "false";
				System.out.println("::::: Start load protable  waiting......");
				ServletContext context = pageContext.getServletContext();
				String nodeName=System.getProperty("webapp.name");
				StaticProperties.invBase._configFile=context.getInitParameter("xmlconfig");
			    if(nodeName!=null && nodeName.trim().length()>0){
				    	StaticProperties.invBase._configFile=nodeName+"-"+context.getInitParameter("xmlconfig");
			    }
			    StaticProperties.invBase._configPath=context.getRealPath("/WEB-INF/classes").replace("\\.\\", "\\")+"//";
			    StaticProperties.invBase._configPath=context.getRealPath("/WEB-INF/classes").replace("\\.\\", "\\")+"//";
			    StaticProperties.invBase.isconfigDoc=true;

			LoadStaticProperties l = new LoadStaticProperties();
			l.setIsSetConnection(false);
			if (lflag.equalsIgnoreCase("false"))
				l.process();
			else
				l.setProcessData();

				if (!StaticConfig.isload) {
							StaticConfig.isload = true;
							StaticConfigable st;
							try {
								st = (StaticConfigable) Class.forName("com.csc.library.databean.Loadconfig").newInstance();
								st.setStatic();
								
								StaticProperties.serverManager.initialService();
								StaticProperties.serverManager.findJobToDo();
								System.out.println("START SERVER COMPLETED !!!!!!");
							} catch (InstantiationException e) {
								MyLog.error(this, e);
							} catch (IllegalAccessException e) {
								MyLog.error(this, e);
							} catch (ClassNotFoundException e) {
								MyLog.error(this, e);
							}
						}
			System.out.println("::::: Load protable  commited......");
			String resource = new InitialEnvironment("GLOBAL").getValue("config-dir");
			new SystemCode().initValue(resource + "SYSTEMCODE.xml");
			//DOMConfigurator.configure(resource + "LOGCFG.xml");
			if(session.getAttribute("screenhash")!=null){
    			session.setAttribute("screenhash", new HashMap());    		
    		}

%> 
Load PROTABLE COMPLETE
</BODY>
</HTML>