FileDocCategorySizeDatePackage
ShowPageAction.javaAPI DocExample1559Thu Jun 28 16:14:16 BST 2001com.ora.jsp.servlets

ShowPageAction

public class ShowPageAction extends Object implements Action
This class displays a JSP 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)
Forwards to the specified JSP page. The reason for using this action instead of requesting a JSP page directly is to let the PBDispatcher handle authentication and access control even for JSP pages. Note that nothing prevents a user from requesting a JSP page directly, so this is not a secure way to perform access control. What it does give is automatic redirection to the login page for users that are not properly logged in.

In this application, as in most applications with a servlet as a controller, accessing a JSP page directly doesn't reveal any restricted information however; the JSP page only displays information available in beans, created by the controller.

    
                                                                                                                                
         
             
        String url = request.getParameter("page");
        if (url == null) {
            throw new ServletException("Missing page info");
        }
        utils.forward(url, request, response);