package demo;

import javax.servlet.http.HttpServletRequest;

public class LoginStuff {

	public static final String LOGIN_FLAG = "LOGIN_FLAG";
	public static final String LOGIN_PAGE = "login.jsp";
	public static final String FAVICON = "favicon.ico";
	public static final String LOGIN_SERVLET = "loginServlet";
	public static final String TARGET_URI_KEY = "AFTER_LOGIN_GO_HERE";

	/**
	 * Extract the user name from the session
	 * @param request
	 * @return the user name, or null if the user is not logged in.
	 */
	public static String getUserName(HttpServletRequest request) {
		return (String) request.getSession().getAttribute(LoginStuff.LOGIN_FLAG);
	}
}

@@ -12,55 +12,8 @@
 o;%0A%0A
-import javax.servlet.http.HttpServletRequest;%0A%0A
 publ
@@ -128,24 +128,25 @@
 GIN_PAGE = %22
+/
 login.jsp%22;%0A
@@ -258,16 +258,16 @@
 rvlet%22;%0A
+
 %09public 
@@ -329,288 +329,7 @@
 RE%22;
-%0A%0A%09/**%0A%09 * Extract the user name from the session%0A%09 * @param request%0A%09 * @return the user name, or null if the user is not logged in.%0A%09 */%0A%09public static String getUserName(HttpServletRequest request) %7B%0A%09%09return (String) request.getSession().getAttribute(LoginStuff.LOGIN_FLAG);%0A%09%7D
 %0A%7D%0A

Make path absolute