LoginActionpublic class LoginAction extends Object implements ActionThis class handles forward to the login page in the Project Billboard
application. |
Fields Summary |
---|
private ActionUtils | utils |
Methods Summary |
---|
public void | perform(javax.servlet.http.HttpServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Get the originally requested URL, with a possible query string,
and passes it on as a parameter when forwarding to the login
page, along with a message about why the requested page is
not displayed.
String origURL = HttpUtils.getRequestURL(request).toString();
String queryString = request.getQueryString();
if (queryString != null) {
origURL += "?" + queryString;
}
String loginURL = "login.jsp" + "?origURL=" +
URLEncoder.encode(origURL) +
"&errorMsg=" + URLEncoder.encode("Please log in first");
utils.forward(loginURL, request, response);
|
|