org.apache.cocoon.servlet
Class RequestUtil

java.lang.Object
  extended byorg.apache.cocoon.servlet.RequestUtil

public class RequestUtil
extends Object

Some utility methods for request handling etc.

Since:
2.2
Version:
$Id: RequestUtil.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
RequestUtil()
           
 
Method Summary
static HttpServletRequest createRequestByRemovingPrefixFromUri(HttpServletRequest request, String prefix)
           
static HttpServletRequest createRequestForUri(HttpServletRequest request, String servletPath, String pathInfo)
           
static String getCompleteBlockUri(HttpServletRequest request, HttpServletResponse response)
          Same as getCompleteUri(HttpServletRequest, HttpServletResponse) but disregards HttpServletRequest.getServletPath().
static String getCompleteUri(HttpServletRequest request, HttpServletResponse response)
           
static void manageException(HttpServletRequest req, HttpServletResponse res, org.apache.cocoon.environment.Environment env, String uri, int errorStatus, String title, String message, String description, Exception e, ServletSettings settings, Log logger, Object sender)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestUtil

public RequestUtil()
Method Detail

getCompleteUri

public static String getCompleteUri(HttpServletRequest request,
                                    HttpServletResponse response)
                             throws IOException
Throws:
IOException

getCompleteBlockUri

public static String getCompleteBlockUri(HttpServletRequest request,
                                         HttpServletResponse response)
                                  throws IOException
Same as getCompleteUri(HttpServletRequest, HttpServletResponse) but disregards HttpServletRequest.getServletPath().
Used by SitemapServlet.

Throws:
IOException

createRequestForUri

public static HttpServletRequest createRequestForUri(HttpServletRequest request,
                                                     String servletPath,
                                                     String pathInfo)

createRequestByRemovingPrefixFromUri

public static HttpServletRequest createRequestByRemovingPrefixFromUri(HttpServletRequest request,
                                                                      String prefix)

manageException

public static void manageException(HttpServletRequest req,
                                   HttpServletResponse res,
                                   org.apache.cocoon.environment.Environment env,
                                   String uri,
                                   int errorStatus,
                                   String title,
                                   String message,
                                   String description,
                                   Exception e,
                                   ServletSettings settings,
                                   Log logger,
                                   Object sender)
                            throws IOException
Throws:
IOException


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.