public final class ExternalContextUtils extends Object
Modifier and Type | Method and Description |
---|---|
static javax.servlet.http.HttpServletResponse |
getHttpServletResponse(ExternalContext ec)
Returns an HttpServletResponse if one exists on the externalContext or null
if it does not.
|
static javax.servlet.http.HttpServletResponse |
getHttpServletResponse(Object response)
Trys to obtain a HttpServletResponse from the Response.
|
static boolean |
isHttpServletRequest(ExternalContext ec)
Returns wherther of not this external context represents a true HttpServletRequest or
not.
|
static boolean |
isPortlet(ExternalContext ec)
This is a convenience function designed to perform a quick check of the current
ExternalContext . |
public static boolean isPortlet(ExternalContext ec)
ExternalContext
.ec
- the current external contexttrue
if the current ExternalContext
is a Porlet.public static boolean isHttpServletRequest(ExternalContext ec)
ec
- the current external contexttrue
if the current request is an
HttpServletRequestpublic static javax.servlet.http.HttpServletResponse getHttpServletResponse(ExternalContext ec)
ec
- public static javax.servlet.http.HttpServletResponse getHttpServletResponse(Object response)
response
- Copyright © 2021 The Apache Software Foundation. All rights reserved.