Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- Singltone1 setId = Singltone1.getInstance();
- Cookie[] cookies = request.getCookies();
- if (cookies == null) {
- response.sendRedirect("http://localhost:8080/lab2_war_exploded/");
- }
- else {
- boolean enableToAccess = false;
- for (Cookie cookie : cookies) {
- if (cookie.getName().equals("sessionId")) {
- if (setId.containsSessionId(cookie.getValue())) {
- enableToAccess = true;
- }
- }
- }
- if (!enableToAccess)
- response.sendRedirect("http://localhost:8080/lab2_war_exploded/");
- }
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement