Package net.sf.regain.util.sharedtag

Examples of net.sf.regain.util.sharedtag.PageResponse


    // If an exception should be thrown the user gets a clear error message
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    PrintStream printStream = new PrintStream(stream, false, SIMPLE_TAG_ENCODING);

    PageRequest request = new SimplePageRequest(req);
    PageResponse response = new SimplePageResponse(this, req, resp, printStream, SIMPLE_TAG_ENCODING);

    // Add the error to the page attributes
    if (error != null) {
      request.setContextAttribute("page.exception", error);
    }
View Full Code Here


   * @return {@link #EVAL_PAGE}
   * @throws JspException If the tag could not be executed
   */
  public int doAfterBody() throws JspException {
    PageRequest request = getPageRequest();
    PageResponse response = new JspPageResponse(pageContext);
    try {
      int result = mNestedTag.printAfterBody(request, response);
      switch (result) {
        case SharedTag.EVAL_TAG_BODY: return EVAL_BODY_TAG;
        case SharedTag.SKIP_TAG_BODY: return SKIP_BODY;
View Full Code Here

      throw new ExtendedJspException("Writing end tag failed", exc);
    }

    // Print the end tag
    PageRequest request = getPageRequest();
    PageResponse response = new JspPageResponse(pageContext);
    try {
      // Print the end tag
      mNestedTag.printEndTag(request, response);
     
      // Unset the context
View Full Code Here

   */
  private void processFile(Request req, Response resp, File file)
    throws Exception
  {
    PageRequest request = new SimplePageRequest(req);
    PageResponse response = new SimplePageResponse(this, req, resp, null, null);
   
    SearchToolkit.sendFile(request, response, file);
  }
View Full Code Here

      pageContext = factory.getPageContext(this, req, resp,
        errorPageURL, needsSession, bufferSize, autoFlush);
   
      // Create a shared wrapper
      PageRequest request = new JspPageRequest(pageContext);
      PageResponse response = new JspPageResponse(pageContext);

      // Extract the file name
      String encoding = "utf-8"; // We use utf-8 in our JSPs
      String fileUrl = SearchToolkit.extractFileUrl(req.getRequestURI(), encoding);
View Full Code Here

      handle(req, resp, 403);
    }

    // Create a shared wrapper
    PageRequest request = new SimplePageRequest(req);
    PageResponse response = new SimplePageResponse(this, req, resp, null, null);

    // Get the request path (Without GET-Parameters)
    // NOTE: We don't use context.getRequestPath for this, because it decodes
    //       the URL, but we want to decode it ourselves using our encoding
    String requestPath = req.getURI();
View Full Code Here

TOP

Related Classes of net.sf.regain.util.sharedtag.PageResponse

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.