Package org.xadoop.servlet.pages

Examples of org.xadoop.servlet.pages.ErrorPage


    actionMap.put(LogoutAction.ACTIONNAME, new LogoutAction());
    actionMap.put(XQueryMRAction.ACTIONNAME, new XQueryMRAction());
    context.setAttribute(XadoopConstants.CTX_ACTIONMAP, actionMap);

    // page map
    AbstractPage errorPage = new ErrorPage("");
    AbstractPage homePage = new HomePage();
    AbstractPage loginPage = new LoginPage();
    AbstractPage xquerymroriginalPage = new XQueryMROriginalPage();
    AbstractPage xquerymrsaxonPage = new XQueryMRSaxonPage();
    AbstractPage xquerymrzorbaPage = new XQueryMRZorbaPage();
View Full Code Here


    }

    // find page to render
    AbstractPage page = null;
    if (msg != null) {
      page = new ErrorPage(msg);
    } else {
      if (isLoggedIn) {

        // logged in users may see all pages
        ServletContext ctx = req.getSession().getServletContext();
        HashMap<String, AbstractPage> pageMap = getPageMap(ctx);
        String pageStr = req.getParameter(AbstractPage.P_PAGE);
        page = pageMap.get(pageStr);
        if (page == null) {
          String pagenameDefault = AbstractPage.extractPagename(HomePage.class);
          page = pageMap.get(pagenameDefault);
        }
      } else {

        // not logged in users may see only the login page
        page = new LoginPage();
      }
    }

    // get html
    StringBuffer html = null;
    try {
      html = page.getHtml(req);
    } catch (Exception e) {
      html = new ErrorPage(e.getMessage()).getHtml(req);
    }

    // produce output
    double calcTime = (System.nanoTime() - begin) / 1E6;
    ServletResponseTools.streamStringBuffer(html, "text/html", "utf-8", calcTime, req, resp);
View Full Code Here

TOP

Related Classes of org.xadoop.servlet.pages.ErrorPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.