OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / WebContent / savesync_executive.jsp
1 <%@ page import="org.ultramonkey.l7.model.*,
2                  org.ultramonkey.l7.controller.*,
3                  org.ultramonkey.l7.view.*" 
4     language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
5
6
7 <%
8     /*
9      * check session
10      */
11     L7guiServletBase base = new L7guiServletBase();
12     if (session.isNew() || base.checkSession(session) == false) {
13         MessageView error = new MessageView(41366, LogCategorySet.GUI_USER_AUTHENTICATION, Message.INVALID_SESSSION); 
14         session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
15         response.sendRedirect(RedirectPages.LOGIN);
16         return;
17     }
18
19     /*
20      * get sessionTrans
21      */
22     SessionTransData sessionTrans = (SessionTransData) session.getAttribute(SessionKeys.PAGE_TRANSDATA);
23     if (sessionTrans == null){
24       MessageView error = new MessageView(41367, LogCategorySet.GUI_SAVE_SYNC, Message.UNEXPECTED_ERROR);
25       session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
26       response.sendRedirect(RedirectPages.LOGIN);
27       return;
28     }
29         
30     String successpage = sessionTrans.destURI;
31         String failpage = sessionTrans.errorURI;
32
33         /*
34          * get thread status
35          */
36         String threadStatus = (String) session.getAttribute(SessionKeys.THREAD_STATUS);
37         if (threadStatus == null) {
38                 MessageView error = new MessageView(41368, LogCategorySet.GUI_SAVE_SYNC, Message.UNEXPECTED_ERROR);
39                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
40                 response.sendRedirect(RedirectPages.LOGIN);
41                 return;
42         }
43     
44     if((successpage == null) || (failpage == null)){
45         MessageView error = new MessageView(41369, LogCategorySet.GUI_SAVE_SYNC, Message.UNEXPECTED_ERROR);
46         session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
47         response.sendRedirect(RedirectPages.LOGIN);
48         return;
49     }
50         else {
51             if (threadStatus.equals(SessionKeys.THREAD_SUCCESS)){
52                 response.sendRedirect(successpage);
53             return;
54         }
55         else if (threadStatus.equals(SessionKeys.THREAD_RUNNING)){
56                 // nothing to do
57         }
58         else if (threadStatus.equals(SessionKeys.THREAD_FAIL)){
59             response.sendRedirect(failpage);
60             return;
61         }
62         else {
63             MessageView error = new MessageView(41370, LogCategorySet.GUI_SAVE_SYNC, Message.UNEXPECTED_ERROR);
64             session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
65             response.sendRedirect(RedirectPages.LOGIN);
66             return;
67         }
68     } 
69 %>
70
71
72 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
73 <html>
74 <head>
75         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
76         <meta http-equiv="Pragma" content="no-cache">
77         <meta http-equiv="Cache-Control" content="no-cache">
78         <meta http-equiv="Expires" content="0"> 
79         <meta http-equiv="Content-Script-Type" content="text/javascript" />
80         <meta http-equiv="Content-Style-Type" content="text/css" />
81           <noscript> 
82             <meta http-equiv="refresh" content="<%= RedirectPages.NOSCRIPT_TIME %>; url=<%= RedirectPages.LOGIN %>"/>
83           </noscript> 
84           <meta http-equiv="refresh" content="<%= RedirectPages.REFRESH_TIME %>"/>  
85           
86           <link rel="stylesheet" type="text/css" href="l7gui_basic_style.css" />
87           <link rel="shortcut icon" href="images/favicon.ico" />
88           <title>Running : Save and Sync</title>
89 </head>
90
91 <body>
92
93 <h1 class="title">Running : Save and Sync</h1>
94 <h2>Please wait.</h2>
95
96 </body>
97 </html>
98