FileDocCategorySizeDatePackage
LoginAction.javaAPI DocExample1267Thu Jun 28 16:14:16 BST 2001com.ora.jsp.servlets

LoginAction

public class LoginAction extends Object implements Action
This class handles forward to the login page in the Project Billboard application.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
private ActionUtils
utils
Constructors Summary
Methods Summary
public voidperform(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);