Revision 345
Added by bojilova over 24 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
223 | 223 |
if (action.equals("Login") || action.equals("Login Client")) { |
224 | 224 |
handleLoginAction(out, params, request, response); |
225 | 225 |
// handle logout action |
226 |
} else if (action.equals("Logout")) { |
|
226 |
} else if (action.equals("Logout") || action.equals("Logout Client")) {
|
|
227 | 227 |
HttpSession sess = request.getSession(false); |
228 | 228 |
if (sess != null) { sess.invalidate(); } |
229 |
response.sendRedirect("/xmltodb/lib/login.html"); |
|
229 |
if (action.equals("Logout Client")) { |
|
230 |
out.println("<?xml version=\"1.0\"?>"); |
|
231 |
out.println("<success>"); |
|
232 |
out.println("User logout."); |
|
233 |
out.println("</success>"); |
|
234 |
return; |
|
235 |
} |
|
236 |
response.sendRedirect("/xmltodb/login.html"); |
|
230 | 237 |
// aware of session expiration on every request |
231 | 238 |
} else { |
232 | 239 |
HttpSession sess = request.getSession(true); |
233 | 240 |
if (sess.isNew()) { |
234 | 241 |
// session expired or has not been stored b/w user requests |
235 | 242 |
// redirect to default page for query only access |
236 |
response.sendRedirect("/xmltodb/lib/sexpire.html");
|
|
243 |
// response.sendRedirect("/xmltodb/sexpire.html");
|
|
237 | 244 |
} |
238 | 245 |
} |
239 | 246 |
// End of Jivka added |
... | ... | |
299 | 306 |
return; |
300 | 307 |
} else { |
301 | 308 |
response.sendRedirect( |
302 |
response.encodeRedirectUrl("/xmltodb/lib/index.html"));
|
|
309 |
response.encodeRedirectUrl("/xmltodb/index.html")); |
|
303 | 310 |
} |
304 | 311 |
} catch ( java.io.IOException ioe) { |
305 | 312 |
sess.disconnect(); |
... | ... | |
323 | 330 |
out.println("</success>"); |
324 | 331 |
} else { |
325 | 332 |
response.sendRedirect( |
326 |
response.encodeRedirectUrl("/xmltodb/lib/metacat.html"));
|
|
333 |
response.encodeRedirectUrl("/xmltodb/metacat.html")); |
|
327 | 334 |
} |
328 | 335 |
} catch ( java.io.IOException ioe) { |
329 | 336 |
sess.disconnect(); |
... | ... | |
870 | 877 |
|
871 | 878 |
/** |
872 | 879 |
* '$Log$ |
880 |
* 'Revision 1.64 2000/08/11 22:20:04 jones |
|
881 |
* 'Changed exception handling mechanisms for DBReader |
|
882 |
* ' |
|
873 | 883 |
* 'Revision 1.63 2000/08/11 18:25:26 berkley |
874 | 884 |
* 'broke up handleQueryAction into handleQuery, handleSQuery, runQuery and transformDocument |
875 | 885 |
* ' |
Also available in: Unified diff
clear lib dir from paths like xmltodb/lib/something.html