1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.ui.server.start;
17
18 import java.io.IOException;
19 import java.io.PrintWriter;
20
21 import javax.servlet.ServletException;
22 import javax.servlet.http.HttpServlet;
23 import javax.servlet.http.HttpServletRequest;
24 import javax.servlet.http.HttpServletResponse;
25
26 import org.kuali.rice.core.api.config.property.ConfigContext;
27 import org.kuali.student.common.util.security.SecurityUtils;
28
29 @Deprecated
30 public class IndexPageServlet extends HttpServlet {
31
32 private static final long serialVersionUID = 1L;
33
34 @Override
35 protected void doPost(HttpServletRequest req, HttpServletResponse resp)
36 throws ServletException, IOException {
37 processRequest(req, resp);
38 }
39
40 @Override
41 protected void doGet(HttpServletRequest request,
42 HttpServletResponse response) throws ServletException, IOException {
43 processRequest(request, response);
44 }
45
46 private void processRequest(HttpServletRequest request,
47 HttpServletResponse response) throws IOException {
48 response.setContentType("text/html");
49 PrintWriter out = response.getWriter();
50
51
52 String username = SecurityUtils.getCurrentPrincipalName();
53
54
55 String riceUrl = ConfigContext.getCurrentContextConfig().getProperty("ks.rice.url");
56 if(null==riceUrl||riceUrl.isEmpty()){
57 riceUrl = ConfigContext.getCurrentContextConfig().getProperty("application.url");
58 }
59
60 out.println(" <html>\n"
61 + " <head>\n"
62 + " <style type=\"text/css\">\n"
63 + " .KS-Header-Logo-Spacer {\n"
64 + " width: 100%;\n"
65 + " height:30px;\n"
66 + " background-color: #dddddd;\n"
67 + " color: #777777;\n"
68 + " font: 30px helvetica, sans-serif;\n"
69 + " padding-top: 8px;\n"
70 + " padding-bottom: 8px;\n"
71 + " padding-left: 10px;\n"
72 + " }\n"
73 + " .KS-Header-Link {\n"
74 + " color: #ffffff;\n"
75 + " text-decoration: none;\n"
76 + " font: 10px helvetica, sans-serif;\n"
77 + " text-align: right;\n"
78 + " padding-right: 0px;\n"
79 + " }\n"
80 + "\n"
81 + " .KS-Header-Link-Focus {\n"
82 + " cursor: pointer;\n"
83 + " text-decoration: underline;\n"
84 + " }\n"
85 + " .page-title {\n"
86 + " font: bold 18px helvetica, sans-serif;\n"
87 + " border: solid thin #aaaaaa;\n"
88 + " padding-top: 5px;\n"
89 + " padding-bottom: 5px;\n"
90 + " padding-left: 1em;\n"
91 + " z-index: 99999999;\n"
92 + " background-color: #eeeeee;\n"
93 + " }\n"
94 + " \n"
95 + " .user-name {\n"
96 + " width: 100%;\n"
97 + " height:2em;\n"
98 + " background-color: #a70b3b;\n"
99 + " margin-bottom: .5em;\n"
100 + " text-align: right;\n"
101 + " }\n"
102 + " .user-Link {\n"
103 + " position: relative;\n"
104 + " top: 3px;\n"
105 + " right: 60px;\n"
106 + " color: #ffffff;\n"
107 + " text-decoration: none;\n"
108 + " font: 12px helvetica, sans-serif;\n"
109 + " padding-right: 5px;\n"
110 + " } \n"
111 + " \n"
112 + " .user-button {\n"
113 + " position: relative;\n"
114 + " top: -16px;\n"
115 + " right: 10px;\n"
116 + " } \n"
117 + "\n"
118 + " .mock-header {\n"
119 + " font: 12px helvetica, sans-serif;\n"
120 + " background-color: #ffffff;\n"
121 + "\n"
122 + " }\n"
123 + " \n"
124 + " .menu-panel{\n"
125 + " display:inline;\n"
126 + " }\n"
127 + " \n"
128 + " .mock-Kew {\n"
129 + " display:inline;\n"
130 + " }\n"
131 + " .mock-row {\n"
132 + " height: 250px;\n"
133 + " }\n"
134 + " .mock-actionlist {\n"
135 + " border-collapse: collapse;\n"
136 + " border: 1px solid #000;\n"
137 + " text-align: center;\n"
138 + " padding: 50px;\n"
139 + " font: 36px helvetica, san-serif;\n"
140 + " color: #aaaaaa;\n"
141 + " }\n"
142 + " \n"
143 + " .bottom-layout{\n"
144 + " width: 100%;\n"
145 + " }\n"
146 + " \n"
147 + " \n"
148 + ".ExampleStyledList ul {\n"
149 + "padding: 0;\n"
150 + "padding-top: 0px;\n"
151 + "margin: 0px;\n"
152 + " list-style-type: none;\n"
153 + " padding-bottom: 1em;\n"
154 + " border-style: solid;\n"
155 + " border-width: 1px;\n"
156 + " background-color: white;\n"
157 + " -moz-border-radius: 1em; \n"
158 + " -webkit-border-radius: 1em;\n"
159 + " width: 12em;\n"
160 + "}\n"
161 + ".ExampleStyledList {\n"
162 + "\n"
163 + " margin-top: 1em;\n"
164 + " margin-bottom: 0.1em;\n"
165 + " width: 8em;\n"
166 + " font-weight: bold;\n"
167 + "}\n"
168 + ".ExampleStyledList a {\n"
169 + " margin-bottom: 3px;\n"
170 + " border: 1px solid white;\n"
171 + " border-left: 3px solid white;\n"
172 + " color: black;\n"
173 + " display: block;\n"
174 + " width: 9.5em;\n"
175 + " margin: 0.5em;\n"
176 + " padding: 0.5em;\n"
177 + "\n"
178 + " -moz-border-radius: 0.5em; \n"
179 + " -webkit-border-radius: 0.5em;\n"
180 + " border-radius: 0.5em;\n"
181 + " text-decoration: none;\n"
182 + "}\n"
183 + ".ExampleStyledList a:hover {\n"
184 + " background-color: #f4f4f4;\n"
185 + " border: 1px solid black;\n"
186 + " border-left: 3px solid #990000;\n"
187 + " cursor: pointer;\n"
188 + " color: #ab0000;\n"
189 + "\n"
190 + "}\n"
191 + "\n"
192 + ".task-table{\n"
193 + "margin-left: 4em;\n"
194 + "\n"
195 + "}\n"
196 + " </style> \n"
197 + " </head>\n"
198 + " <body>\n"
199 + " <img src=\"kru_banner2.jpg\">\n"
200 + " <div class=\"user-name\"><a href=\".\" class=\"user-link\">"
201 + username
202 + "</a>\n"
203 + "<a href=\"./j_spring_security_logout\" class=\"user-link\">Logout</a></div>\n"
204 + "<table style=\"vertical-align: top; height: 500px\">\n"
205 + "<tr >\n"
206 + "<td style=\"vertical-align: top;\">\n"
207 + "\n"
208 + " <span class=\"ExampleStyledList\">\n"
209 + " <ul> \n"
210 + " <li><a href=\"org.kuali.student.core.organization.ui.OrgEntry/OrgEntry.jsp\">Organizations</a> </li> \n"
211 + " <li><a href=\"org.kuali.student.lum.lu.ui.main.LUMMain/LUMMain.jsp\">Curriculum Management</a> </li> \n"
212 + " <li><a href=\""
213 + riceUrl
214 + "/portal.do?selectedTab=main\">Rice</a></li>\n"
215 + " </ul>\n"
216 + " </span>\n"
217 + " </td>\n"
218 + " <td style=\"vertical-align: top;\">\n"
219 + " <table class=\"task-table\"><tr class=\"mock-row\"><td class=\"mock-actionList\">KEW action list</td></tr></table> \n"
220 + " </td>\n"
221 + "</tr>\n"
222 + "</table>\n"
223 + " \n"
224 + "</body></html>");
225 }
226 }