OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / WebContent / vs_add_executive.jsp
1 <%@ page
2         import="org.ultramonkey.l7.model.*,org.ultramonkey.l7.controller.*,org.ultramonkey.l7.view.*"
3         language="java" contentType="text/html; charset=UTF-8"
4         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(41439,
14                 LogCategorySet.GUI_USER_AUTHENTICATION,
15                 Message.INVALID_SESSSION);
16                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
17                 response.sendRedirect(RedirectPages.LOGIN);
18                 return;
19         }
20
21         /*
22          * get thread status
23          */
24         String threadStatus = (String) session
25                         .getAttribute(SessionKeys.THREAD_STATUS);
26         if (threadStatus == null) {
27                 MessageView error = new MessageView(41440,
28                 LogCategorySet.GUI_VIRTUALSERVICE,
29                 Message.UNEXPECTED_ERROR);
30                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
31                 response.sendRedirect(RedirectPages.LOGIN);
32                 return;
33         } else if (threadStatus.equals(SessionKeys.THREAD_RUNNING)) {
34                 // nothing to do
35         } else if (threadStatus.equals(SessionKeys.THREAD_SUCCESS)) {
36                 response.sendRedirect(RedirectPages.STATE_INFO);
37                 return;
38         } else if (threadStatus.equals(SessionKeys.THREAD_FAIL)) {
39                 response.sendRedirect(RedirectPages.VS_ADD_NG);
40                 return;
41         } else {
42                 MessageView error = new MessageView(41441,
43                 LogCategorySet.GUI_VIRTUALSERVICE,
44                 Message.UNEXPECTED_ERROR);
45                 session.setAttribute(SessionKeys.RESULT_MESSAGE, error);
46                 response.sendRedirect(RedirectPages.LOGIN);
47                 return;
48         }
49 %>
50
51
52 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
53 <html>
54 <head>
55         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
56         <meta http-equiv="Pragma" content="no-cache">
57         <meta http-equiv="Cache-Control" content="no-cache">
58         <meta http-equiv="Expires" content="0"> 
59         <meta http-equiv="Content-Script-Type" content="text/javascript" />
60         <meta http-equiv="Content-Style-Type" content="text/css" />
61         <noscript>
62         <meta http-equiv="refresh"
63                 content="<%= RedirectPages.NOSCRIPT_TIME %>; url=<%= RedirectPages.LOGIN %>" />
64         </noscript>
65         <meta http-equiv="refresh" content="<%= RedirectPages.REFRESH_TIME %>" />
66         
67         <link rel="stylesheet" type="text/css" href="l7gui_basic_style.css" />
68         <link rel="shortcut icon" href="images/favicon.ico" />
69         <title>Running : Add VirtualService</title>
70 </head>
71
72 <body>
73
74 <h1 class="title">Running : Add VirtualService</h1>
75 <h2>Please wait.</h2>
76
77 </body>
78 </html>
79