blob: 50a21f03416047140296a244faed58da14903a72 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_21) on Thu May 30 15:02:20 PDT 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>WebUtils (Apache Shiro 1.2.2 API)</title>
<meta name="date" content="2013-05-30">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="WebUtils (Apache Shiro 1.2.2 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WebUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/shiro/web/util/WebUtils.html" target="_top">Frames</a></li>
<li><a href="WebUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.shiro.web.util</div>
<h2 title="Class WebUtils" class="title">Class WebUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.shiro.web.util.WebUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.50">WebUtils</a>
extends <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Simple utility class for operations used across multiple class hierarchies in the web framework code.
<p/>
Some methods in this class were copied from the Spring Framework so we didn't have to re-invent the wheel,
and in these cases, we have retained all license, copyright and author information.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>0.9</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#DEFAULT_CHARACTER_ENCODING">DEFAULT_CHARACTER_ENCODING</a></strong></code>
<div class="block">Default character encoding to use when <code>request.getCharacterEncoding</code>
returns <code>null</code>, according to the Servlet spec.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_CONTEXT_PATH_ATTRIBUTE">FORWARD_CONTEXT_PATH_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_PATH_INFO_ATTRIBUTE">FORWARD_PATH_INFO_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_QUERY_STRING_ATTRIBUTE">FORWARD_QUERY_STRING_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_REQUEST_URI_ATTRIBUTE">FORWARD_REQUEST_URI_ATTRIBUTE</a></strong></code>
<div class="block">Standard Servlet 2.4+ spec request attributes for forward URI and paths.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_SERVLET_PATH_ATTRIBUTE">FORWARD_SERVLET_PATH_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_CONTEXT_PATH_ATTRIBUTE">INCLUDE_CONTEXT_PATH_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_PATH_INFO_ATTRIBUTE">INCLUDE_PATH_INFO_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_QUERY_STRING_ATTRIBUTE">INCLUDE_QUERY_STRING_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_REQUEST_URI_ATTRIBUTE">INCLUDE_REQUEST_URI_ATTRIBUTE</a></strong></code>
<div class="block">Standard Servlet 2.3+ spec request attributes for include URI and paths.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_SERVLET_PATH_ATTRIBUTE">INCLUDE_SERVLET_PATH_ATTRIBUTE</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#SAVED_REQUEST_KEY">SAVED_REQUEST_KEY</a></strong></code>
<div class="block"><a href="../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session"><code>Session</code></a> key used to save a request and later restore it, for example when redirecting to a
requested page after login, equal to <code>shiroSavedRequest</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#SERVLET_REQUEST_KEY">SERVLET_REQUEST_KEY</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#SERVLET_RESPONSE_KEY">SERVLET_RESPONSE_KEY</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#WebUtils()">WebUtils</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#_isSessionCreationEnabled(java.lang.Object)">_isSessionCreationEnabled</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>
<div class="block">Returns <code>true</code> if a session is allowed to be created for a subject-associated request, <code>false</code>
otherwise.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#_isSessionCreationEnabled(javax.servlet.ServletRequest)">_isSessionCreationEnabled</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>
<div class="block">Returns <code>true</code> if a session is allowed to be created for a subject-associated request, <code>false</code>
otherwise.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#decodeRequestString(javax.servlet.http.HttpServletRequest, java.lang.String)">decodeRequestString</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;source)</code>
<div class="block">Decode the given source string with a URLDecoder.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#determineEncoding(javax.servlet.http.HttpServletRequest)">determineEncoding</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</code>
<div class="block">Determine the encoding for the given request.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getAndClearSavedRequest(javax.servlet.ServletRequest)">getAndClearSavedRequest</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getCleanParam(javax.servlet.ServletRequest, java.lang.String)">getCleanParam</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;paramName)</code>
<div class="block">Convenience method that returns a request parameter value, first running it through
<a href="../../../../../org/apache/shiro/util/StringUtils.html#clean(java.lang.String)"><code>StringUtils.clean(String)</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getContextPath(javax.servlet.http.HttpServletRequest)">getContextPath</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</code>
<div class="block">Return the context path for the given request, detecting an include request
URL if called within a RequestDispatcher include.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getHttpRequest(java.lang.Object)">getHttpRequest</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getHttpResponse(java.lang.Object)">getHttpResponse</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getPathWithinApplication(javax.servlet.http.HttpServletRequest)">getPathWithinApplication</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</code>
<div class="block">Return the path within the web application for the given request.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getRequest(java.lang.Object)">getRequest</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getRequestUri(javax.servlet.http.HttpServletRequest)">getRequestUri</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</code>
<div class="block">Return the request URI for the given request, detecting an include request
URL if called within a RequestDispatcher include.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getRequiredWebEnvironment(javax.servlet.ServletContext)">getRequiredWebEnvironment</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</a>&nbsp;sc)</code>
<div class="block">Find the Shiro <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application, which is typically loaded via the
<a href="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><code>EnvironmentLoaderListener</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getResponse(java.lang.Object)">getResponse</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getSavedRequest(javax.servlet.ServletRequest)">getSavedRequest</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getWebEnvironment(javax.servlet.ServletContext)">getWebEnvironment</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</a>&nbsp;sc)</code>
<div class="block">Find the Shiro <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application, which is typically loaded via
<a href="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><code>EnvironmentLoaderListener</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getWebEnvironment(javax.servlet.ServletContext, java.lang.String)">getWebEnvironment</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</a>&nbsp;sc,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;attrName)</code>
<div class="block">Find the Shiro <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#isHttp(java.lang.Object)">isHttp</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String)">issueRedirect</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url)</code>
<div class="block">Redirects the current request to a new URL based on the given parameters and default values
for unspecified parameters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.util.Map)">issueRedirect</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;queryParams)</code>
<div class="block">Redirects the current request to a new URL based on the given parameters and default values
for unspecified parameters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.util.Map, boolean)">issueRedirect</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;queryParams,
boolean&nbsp;contextRelative)</code>
<div class="block">Redirects the current request to a new URL based on the given parameters and default values
for unspecified parameters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.util.Map, boolean, boolean)">issueRedirect</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;queryParams,
boolean&nbsp;contextRelative,
boolean&nbsp;http10Compatible)</code>
<div class="block">Redirects the current request to a new URL based on the given parameters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#isTrue(javax.servlet.ServletRequest, java.lang.String)">isTrue</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;paramName)</code>
<div class="block">Checks to see if a request param is considered true using a loose matching strategy for
general values that indicate that something is true or enabled, etc.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#isWeb(java.lang.Object)">isWeb</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#normalize(java.lang.String)">normalize</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</code>
<div class="block">Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#redirectToSavedRequest(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String)">redirectToSavedRequest</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fallbackUrl)</code>
<div class="block">Redirects the to the request url from a previously
<a href="../../../../../org/apache/shiro/web/util/WebUtils.html#saveRequest(javax.servlet.ServletRequest)"><code>saved</code></a> request, or if there is no saved request, redirects the
end user to the specified <code>fallbackUrl</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#saveRequest(javax.servlet.ServletRequest)">saveRequest</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#toHttp(javax.servlet.ServletRequest)">toHttp</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>
<div class="block">A convenience method that merely casts the incoming <code>ServletRequest</code> to an
<code>HttpServletRequest</code>:
<p/>
<code>return (HttpServletRequest)request;</code>
<p/>
Logic could be changed in the future for logging or throwing an meaningful exception in
non HTTP request environments (e.g.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#toHttp(javax.servlet.ServletResponse)">toHttp</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response)</code>
<div class="block">A convenience method that merely casts the incoming <code>ServletResponse</code> to an
<code>HttpServletResponse</code>:
<p/>
<code>return (HttpServletResponse)response;</code>
<p/>
Logic could be changed in the future for logging or throwing an meaningful exception in
non HTTP request environments (e.g.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="SERVLET_REQUEST_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SERVLET_REQUEST_KEY</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.56">SERVLET_REQUEST_KEY</a></pre>
</li>
</ul>
<a name="SERVLET_RESPONSE_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SERVLET_RESPONSE_KEY</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.57">SERVLET_RESPONSE_KEY</a></pre>
</li>
</ul>
<a name="SAVED_REQUEST_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SAVED_REQUEST_KEY</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.63">SAVED_REQUEST_KEY</a></pre>
<div class="block"><a href="../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session"><code>Session</code></a> key used to save a request and later restore it, for example when redirecting to a
requested page after login, equal to <code>shiroSavedRequest</code>.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.SAVED_REQUEST_KEY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INCLUDE_REQUEST_URI_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INCLUDE_REQUEST_URI_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.70">INCLUDE_REQUEST_URI_ATTRIBUTE</a></pre>
<div class="block">Standard Servlet 2.3+ spec request attributes for include URI and paths.
<p>If included via a RequestDispatcher, the current resource will see the
originating request. Its own URI and paths are exposed as request attributes.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INCLUDE_CONTEXT_PATH_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INCLUDE_CONTEXT_PATH_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.71">INCLUDE_CONTEXT_PATH_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INCLUDE_SERVLET_PATH_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INCLUDE_SERVLET_PATH_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.72">INCLUDE_SERVLET_PATH_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INCLUDE_PATH_INFO_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INCLUDE_PATH_INFO_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.73">INCLUDE_PATH_INFO_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.INCLUDE_PATH_INFO_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="INCLUDE_QUERY_STRING_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INCLUDE_QUERY_STRING_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.74">INCLUDE_QUERY_STRING_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.INCLUDE_QUERY_STRING_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FORWARD_REQUEST_URI_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORWARD_REQUEST_URI_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.81">FORWARD_REQUEST_URI_ATTRIBUTE</a></pre>
<div class="block">Standard Servlet 2.4+ spec request attributes for forward URI and paths.
<p>If forwarded to via a RequestDispatcher, the current resource will see its
own URI and paths. The originating URI and paths are exposed as request attributes.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.FORWARD_REQUEST_URI_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FORWARD_CONTEXT_PATH_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORWARD_CONTEXT_PATH_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.82">FORWARD_CONTEXT_PATH_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.FORWARD_CONTEXT_PATH_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FORWARD_SERVLET_PATH_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORWARD_SERVLET_PATH_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.83">FORWARD_SERVLET_PATH_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.FORWARD_SERVLET_PATH_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FORWARD_PATH_INFO_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORWARD_PATH_INFO_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.84">FORWARD_PATH_INFO_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.FORWARD_PATH_INFO_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FORWARD_QUERY_STRING_ATTRIBUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORWARD_QUERY_STRING_ATTRIBUTE</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.85">FORWARD_QUERY_STRING_ATTRIBUTE</a></pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.FORWARD_QUERY_STRING_ATTRIBUTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_CHARACTER_ENCODING">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_CHARACTER_ENCODING</h4>
<pre>public static final&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.93">DEFAULT_CHARACTER_ENCODING</a></pre>
<div class="block">Default character encoding to use when <code>request.getCharacterEncoding</code>
returns <code>null</code>, according to the Servlet spec.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet"><code>ServletRequest.getCharacterEncoding()</code></a>,
<a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.DEFAULT_CHARACTER_ENCODING">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="WebUtils()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>WebUtils</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.50">WebUtils</a>()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getPathWithinApplication(javax.servlet.http.HttpServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathWithinApplication</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.110">getPathWithinApplication</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</pre>
<div class="block">Return the path within the web application for the given request.
Detects include request URL if called within a RequestDispatcher include.
<p/>
For example, for a request to URL
<p/>
<code>http://www.somehost.com/myapp/my/url.jsp</code>,
<p/>
for an application deployed to <code>/mayapp</code> (the application's context path), this method would return
<p/>
<code>/my/url.jsp</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - current HTTP request</dd>
<dt><span class="strong">Returns:</span></dt><dd>the path within the web application</dd></dl>
</li>
</ul>
<a name="getRequestUri(javax.servlet.http.HttpServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequestUri</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.135">getRequestUri</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</pre>
<div class="block">Return the request URI for the given request, detecting an include request
URL if called within a RequestDispatcher include.
<p>As the value returned by <code>request.getRequestURI()</code> is <i>not</i>
decoded by the servlet container, this method will decode it.
<p>The URI that the web container resolves <i>should</i> be correct, but some
containers like JBoss/Jetty incorrectly include ";" strings like ";jsessionid"
in the URI. This method cuts off such incorrect appendices.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - current HTTP request</dd>
<dt><span class="strong">Returns:</span></dt><dd>the request URI</dd></dl>
</li>
</ul>
<a name="normalize(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalize</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.154">normalize</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</pre>
<div class="block">Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it. <strong>WARNING</strong> - This method is
useful only for normalizing application-generated paths. It does not
try to perform security checks for malicious input.
Normalize operations were was happily taken from org.apache.catalina.util.RequestUtil in
Tomcat trunk, r939305</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - Relative path to be normalized</dd>
<dt><span class="strong">Returns:</span></dt><dd>normalized path</dd></dl>
</li>
</ul>
<a name="getContextPath(javax.servlet.http.HttpServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContextPath</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.246">getContextPath</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</pre>
<div class="block">Return the context path for the given request, detecting an include request
URL if called within a RequestDispatcher include.
<p>As the value returned by <code>request.getContextPath()</code> is <i>not</i>
decoded by the servlet container, this method will decode it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - current HTTP request</dd>
<dt><span class="strong">Returns:</span></dt><dd>the context path</dd></dl>
</li>
</ul>
<a name="getRequiredWebEnvironment(javax.servlet.ServletContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequiredWebEnvironment</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.271">getRequiredWebEnvironment</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</a>&nbsp;sc)
throws <a href="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Find the Shiro <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application, which is typically loaded via the
<a href="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><code>EnvironmentLoaderListener</code></a>.
<p/>
This implementation rethrows an exception that happened on environment startup to differentiate between a failed
environment startup and no environment at all.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sc</code> - ServletContext to find the web application context for</dd>
<dt><span class="strong">Returns:</span></dt><dd>the root WebApplicationContext for this web app</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the root WebApplicationContext could not be found</dd><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#ENVIRONMENT_ATTRIBUTE_KEY"><code>EnvironmentLoader.ENVIRONMENT_ATTRIBUTE_KEY</code></a></dd></dl>
</li>
</ul>
<a name="getWebEnvironment(javax.servlet.ServletContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWebEnvironment</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.293">getWebEnvironment</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</a>&nbsp;sc)</pre>
<div class="block">Find the Shiro <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application, which is typically loaded via
<a href="../../../../../org/apache/shiro/web/env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><code>EnvironmentLoaderListener</code></a>.
<p/>
This implementation rethrows an exception that happened on environment startup to differentiate between a failed
environment startup and no environment at all.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sc</code> - ServletContext to find the web application context for</dd>
<dt><span class="strong">Returns:</span></dt><dd>the root WebApplicationContext for this web app, or <code>null</code> if none</dd><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/env/EnvironmentLoader.html#ENVIRONMENT_ATTRIBUTE_KEY"><code>EnvironmentLoader.ENVIRONMENT_ATTRIBUTE_KEY</code></a></dd></dl>
</li>
</ul>
<a name="getWebEnvironment(javax.servlet.ServletContext, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWebEnvironment</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.305">getWebEnvironment</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet">ServletContext</a>&nbsp;sc,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;attrName)</pre>
<div class="block">Find the Shiro <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sc</code> - ServletContext to find the web application context for</dd><dd><code>attrName</code> - the name of the ServletContext attribute to look for</dd>
<dt><span class="strong">Returns:</span></dt><dd>the desired WebEnvironment for this web app, or <code>null</code> if none</dd><dt><span class="strong">Since:</span></dt>
<dd>1.2</dd></dl>
</li>
</ul>
<a name="decodeRequestString(javax.servlet.http.HttpServletRequest, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeRequestString</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.343">decodeRequestString</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;source)</pre>
<div class="block">Decode the given source string with a URLDecoder. The encoding will be taken
from the request, falling back to the default "ISO-8859-1".
<p>The default implementation uses <code>URLDecoder.decode(input, enc)</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - current HTTP request</dd><dd><code>source</code> - the String to decode</dd>
<dt><span class="strong">Returns:</span></dt><dd>the decoded String</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#DEFAULT_CHARACTER_ENCODING"><code>DEFAULT_CHARACTER_ENCODING</code></a>,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet"><code>ServletRequest.getCharacterEncoding()</code></a>,
<a href="http://java.sun.com/javase/6/docs/api/java/net/URLDecoder.html?is-external=true#decode(java.lang.String, java.lang.String)" title="class or interface in java.net"><code>URLDecoder.decode(String, String)</code></a>,
<a href="http://java.sun.com/javase/6/docs/api/java/net/URLDecoder.html?is-external=true#decode(java.lang.String)" title="class or interface in java.net"><code>URLDecoder.decode(String)</code></a></dd></dl>
</li>
</ul>
<a name="determineEncoding(javax.servlet.http.HttpServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>determineEncoding</h4>
<pre>protected static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.367">determineEncoding</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;request)</pre>
<div class="block">Determine the encoding for the given request.
Can be overridden in subclasses.
<p>The default implementation checks the request's
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet"><code>character encoding</code></a>, and if that
<code>null</code>, falls back to the <a href="../../../../../org/apache/shiro/web/util/WebUtils.html#DEFAULT_CHARACTER_ENCODING"><code>DEFAULT_CHARACTER_ENCODING</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - current HTTP request</dd>
<dt><span class="strong">Returns:</span></dt><dd>the encoding for the request (never <code>null</code>)</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet"><code>ServletRequest.getCharacterEncoding()</code></a></dd></dl>
</li>
</ul>
<a name="isWeb(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWeb</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.389">isWeb</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
</li>
</ul>
<a name="isHttp(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isHttp</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.393">isHttp</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
</li>
</ul>
<a name="getRequest(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRequest</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.397">getRequest</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
</li>
</ul>
<a name="getResponse(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponse</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.404">getResponse</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
</li>
</ul>
<a name="getHttpRequest(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHttpRequest</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.411">getHttpRequest</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
</li>
</ul>
<a name="getHttpResponse(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHttpResponse</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.419">getHttpResponse</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
</li>
</ul>
<a name="_isSessionCreationEnabled(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_isSessionCreationEnabled</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.451">_isSessionCreationEnabled</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;requestPairSource)</pre>
<div class="block">Returns <code>true</code> if a session is allowed to be created for a subject-associated request, <code>false</code>
otherwise.
<p/>
<b>This method exists for Shiro's internal framework needs and should never be called by Shiro end-users. It
could be changed/removed at any time.</b></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>requestPairSource</code> - a <a href="../../../../../org/apache/shiro/web/util/RequestPairSource.html" title="interface in org.apache.shiro.web.util"><code>RequestPairSource</code></a> instance, almost always a
<a href="../../../../../org/apache/shiro/web/subject/WebSubject.html" title="interface in org.apache.shiro.web.subject"><code>WebSubject</code></a> instance.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if a session is allowed to be created for a subject-associated request, <code>false</code>
otherwise.</dd></dl>
</li>
</ul>
<a name="_isSessionCreationEnabled(javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_isSessionCreationEnabled</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.470">_isSessionCreationEnabled</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
<div class="block">Returns <code>true</code> if a session is allowed to be created for a subject-associated request, <code>false</code>
otherwise.
<p/>
<b>This method exists for Shiro's internal framework needs and should never be called by Shiro end-users. It
could be changed/removed at any time.</b></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - incoming servlet request.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if a session is allowed to be created for a subject-associated request, <code>false</code>
otherwise.</dd></dl>
</li>
</ul>
<a name="toHttp(javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHttp</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.492">toHttp</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
<div class="block">A convenience method that merely casts the incoming <code>ServletRequest</code> to an
<code>HttpServletRequest</code>:
<p/>
<code>return (HttpServletRequest)request;</code>
<p/>
Logic could be changed in the future for logging or throwing an meaningful exception in
non HTTP request environments (e.g. Portlet API).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the incoming ServletRequest</dd>
<dt><span class="strong">Returns:</span></dt><dd>the <code>request</code> argument casted to an <code>HttpServletRequest</code>.</dd></dl>
</li>
</ul>
<a name="toHttp(javax.servlet.ServletResponse)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHttp</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.508">toHttp</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response)</pre>
<div class="block">A convenience method that merely casts the incoming <code>ServletResponse</code> to an
<code>HttpServletResponse</code>:
<p/>
<code>return (HttpServletResponse)response;</code>
<p/>
Logic could be changed in the future for logging or throwing an meaningful exception in
non HTTP request environments (e.g. Portlet API).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>response</code> - the outgoing ServletResponse</dd>
<dt><span class="strong">Returns:</span></dt><dd>the <code>response</code> argument casted to an <code>HttpServletResponse</code>.</dd></dl>
</li>
</ul>
<a name="issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.util.Map, boolean, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>issueRedirect</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.523">issueRedirect</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;queryParams,
boolean&nbsp;contextRelative,
boolean&nbsp;http10Compatible)
throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Redirects the current request to a new URL based on the given parameters.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the servlet request.</dd><dd><code>response</code> - the servlet response.</dd><dd><code>url</code> - the URL to redirect the user to.</dd><dd><code>queryParams</code> - a map of parameters that should be set as request parameters for the new request.</dd><dd><code>contextRelative</code> - true if the URL is relative to the servlet context path, or false if the URL is absolute.</dd><dd><code>http10Compatible</code> - whether to stay compatible with HTTP 1.0 clients.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if thrown by response methods.</dd></dl>
</li>
</ul>
<a name="issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>issueRedirect</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.537">issueRedirect</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url)
throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Redirects the current request to a new URL based on the given parameters and default values
for unspecified parameters.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the servlet request.</dd><dd><code>response</code> - the servlet response.</dd><dd><code>url</code> - the URL to redirect the user to.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if thrown by response methods.</dd></dl>
</li>
</ul>
<a name="issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>issueRedirect</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.551">issueRedirect</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;queryParams)
throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Redirects the current request to a new URL based on the given parameters and default values
for unspecified parameters.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the servlet request.</dd><dd><code>response</code> - the servlet response.</dd><dd><code>url</code> - the URL to redirect the user to.</dd><dd><code>queryParams</code> - a map of parameters that should be set as request parameters for the new request.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if thrown by response methods.</dd></dl>
</li>
</ul>
<a name="issueRedirect(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.util.Map, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>issueRedirect</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.566">issueRedirect</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;queryParams,
boolean&nbsp;contextRelative)
throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Redirects the current request to a new URL based on the given parameters and default values
for unspecified parameters.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the servlet request.</dd><dd><code>response</code> - the servlet response.</dd><dd><code>url</code> - the URL to redirect the user to.</dd><dd><code>queryParams</code> - a map of parameters that should be set as request parameters for the new request.</dd><dd><code>contextRelative</code> - true if the URL is relative to the servlet context path, or false if the URL is absolute.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if thrown by response methods.</dd></dl>
</li>
</ul>
<a name="isTrue(javax.servlet.ServletRequest, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTrue</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.580">isTrue</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;paramName)</pre>
<div class="block"><p>Checks to see if a request param is considered true using a loose matching strategy for
general values that indicate that something is true or enabled, etc.</p>
<p/>
<p>Values that are considered "true" include (case-insensitive): true, t, 1, enabled, y, yes, on.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the servlet request</dd><dd><code>paramName</code> - @return true if the param value is considered true or false if it isn't.</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the given parameter is considered "true" - false otherwise.</dd></dl>
</li>
</ul>
<a name="getCleanParam(javax.servlet.ServletRequest, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCleanParam</h4>
<pre>public static&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.600">getCleanParam</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;paramName)</pre>
<div class="block">Convenience method that returns a request parameter value, first running it through
<a href="../../../../../org/apache/shiro/util/StringUtils.html#clean(java.lang.String)"><code>StringUtils.clean(String)</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the servlet request.</dd><dd><code>paramName</code> - the parameter name.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the clean param value, or null if the param does not exist or is empty.</dd></dl>
</li>
</ul>
<a name="saveRequest(javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>saveRequest</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.604">saveRequest</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
</li>
</ul>
<a name="getAndClearSavedRequest(javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAndClearSavedRequest</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.612">getAndClearSavedRequest</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
</li>
</ul>
<a name="getSavedRequest(javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSavedRequest</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.622">getSavedRequest</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
</li>
</ul>
<a name="redirectToSavedRequest(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>redirectToSavedRequest</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.651">redirectToSavedRequest</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fallbackUrl)
throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Redirects the to the request url from a previously
<a href="../../../../../org/apache/shiro/web/util/WebUtils.html#saveRequest(javax.servlet.ServletRequest)"><code>saved</code></a> request, or if there is no saved request, redirects the
end user to the specified <code>fallbackUrl</code>. If there is no saved request or fallback url, this method
throws an <a href="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalStateException</code></a>.
<p/>
This method is primarily used to support a common login scenario - if an unauthenticated user accesses a
page that requires authentication, it is expected that request is
<a href="../../../../../org/apache/shiro/web/util/WebUtils.html#saveRequest(javax.servlet.ServletRequest)"><code>saved</code></a> first and then redirected to the login page. Then,
after a successful login, this method can be called to redirect them back to their originally requested URL, a
nice usability feature.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the incoming request</dd><dd><code>response</code> - the outgoing response</dd><dd><code>fallbackUrl</code> - the fallback url to redirect to if there is no saved request available.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if there is no saved request and the <code>fallbackUrl</code> is <code>null</code>.</dd>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is an error redirecting</dd><dt><span class="strong">Since:</span></dt>
<dd>1.0</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WebUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/shiro/web/util/WebUtils.html" target="_top">Frames</a></li>
<li><a href="WebUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2004-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>