| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="fr"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_201) on Wed May 01 07:16:45 RET 2019 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>WebUtils (Apache Shiro 1.4.1 API)</title> |
| <meta name="date" content="2019-05-01"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="WebUtils (Apache Shiro 1.4.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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="typeNameLink">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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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://docs.oracle.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://docs.oracle.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="simpleTagLabel">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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </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://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#DEFAULT_CHARACTER_ENCODING">DEFAULT_CHARACTER_ENCODING</a></span></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://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_CONTEXT_PATH_ATTRIBUTE">FORWARD_CONTEXT_PATH_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_PATH_INFO_ATTRIBUTE">FORWARD_PATH_INFO_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_QUERY_STRING_ATTRIBUTE">FORWARD_QUERY_STRING_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_REQUEST_URI_ATTRIBUTE">FORWARD_REQUEST_URI_ATTRIBUTE</a></span></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://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#FORWARD_SERVLET_PATH_ATTRIBUTE">FORWARD_SERVLET_PATH_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_CONTEXT_PATH_ATTRIBUTE">INCLUDE_CONTEXT_PATH_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_PATH_INFO_ATTRIBUTE">INCLUDE_PATH_INFO_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_QUERY_STRING_ATTRIBUTE">INCLUDE_QUERY_STRING_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_REQUEST_URI_ATTRIBUTE">INCLUDE_REQUEST_URI_ATTRIBUTE</a></span></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://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#INCLUDE_SERVLET_PATH_ATTRIBUTE">INCLUDE_SERVLET_PATH_ATTRIBUTE</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#SAVED_REQUEST_KEY">SAVED_REQUEST_KEY</a></span></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://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#SERVLET_REQUEST_KEY">SERVLET_REQUEST_KEY</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#SERVLET_RESPONSE_KEY">SERVLET_RESPONSE_KEY</a></span></code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#WebUtils--">WebUtils</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#Z:Z_isSessionCreationEnabled-java.lang.Object-">_isSessionCreationEnabled</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> 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 id="i1" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#Z:Z_isSessionCreationEnabled-javax.servlet.ServletRequest-">_isSessionCreationEnabled</a></span>(javax.servlet.ServletRequest 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 id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#decodeRequestString-javax.servlet.http.HttpServletRequest-java.lang.String-">decodeRequestString</a></span>(javax.servlet.http.HttpServletRequest request, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source)</code> |
| <div class="block">Decode the given source string with a URLDecoder.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#determineEncoding-javax.servlet.http.HttpServletRequest-">determineEncoding</a></span>(javax.servlet.http.HttpServletRequest request)</code> |
| <div class="block">Determine the encoding for the given request.</div> |
| </td> |
| </tr> |
| <tr id="i4" 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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getAndClearSavedRequest-javax.servlet.ServletRequest-">getAndClearSavedRequest</a></span>(javax.servlet.ServletRequest request)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getCleanParam-javax.servlet.ServletRequest-java.lang.String-">getCleanParam</a></span>(javax.servlet.ServletRequest request, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getContextPath-javax.servlet.http.HttpServletRequest-">getContextPath</a></span>(javax.servlet.http.HttpServletRequest 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 id="i7" class="rowColor"> |
| <td class="colFirst"><code>static javax.servlet.http.HttpServletRequest</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getHttpRequest-java.lang.Object-">getHttpRequest</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static javax.servlet.http.HttpServletResponse</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getHttpResponse-java.lang.Object-">getHttpResponse</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getPathWithinApplication-javax.servlet.http.HttpServletRequest-">getPathWithinApplication</a></span>(javax.servlet.http.HttpServletRequest request)</code> |
| <div class="block">Return the path within the web application for the given request.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static javax.servlet.ServletRequest</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getRequest-java.lang.Object-">getRequest</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getRequestUri-javax.servlet.http.HttpServletRequest-">getRequestUri</a></span>(javax.servlet.http.HttpServletRequest 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 id="i12" 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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getRequiredWebEnvironment-javax.servlet.ServletContext-">getRequiredWebEnvironment</a></span>(javax.servlet.ServletContext 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 id="i13" class="rowColor"> |
| <td class="colFirst"><code>static javax.servlet.ServletResponse</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getResponse-java.lang.Object-">getResponse</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</code> </td> |
| </tr> |
| <tr id="i14" 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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getSavedRequest-javax.servlet.ServletRequest-">getSavedRequest</a></span>(javax.servlet.ServletRequest request)</code> </td> |
| </tr> |
| <tr id="i15" 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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getWebEnvironment-javax.servlet.ServletContext-">getWebEnvironment</a></span>(javax.servlet.ServletContext 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 id="i16" 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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getWebEnvironment-javax.servlet.ServletContext-java.lang.String-">getWebEnvironment</a></span>(javax.servlet.ServletContext sc, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 id="i17" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#isHttp-java.lang.Object-">isHttp</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</code> </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#issueRedirect-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-">issueRedirect</a></span>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 id="i19" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#issueRedirect-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-java.util.Map-">issueRedirect</a></span>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> 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 id="i20" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><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></span>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> queryParams, |
| boolean 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 id="i21" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><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></span>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> queryParams, |
| boolean contextRelative, |
| boolean http10Compatible)</code> |
| <div class="block">Redirects the current request to a new URL based on the given parameters.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#isTrue-javax.servlet.ServletRequest-java.lang.String-">isTrue</a></span>(javax.servlet.ServletRequest request, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 id="i23" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#isWeb-java.lang.Object-">isWeb</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</code> </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.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><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#normalize-java.lang.String-">normalize</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> path)</code> |
| <div class="block">Normalize a relative URI path that may have relative values ("/./", |
| "/../", and so on ) it it.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#redirectToSavedRequest-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-">redirectToSavedRequest</a></span>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 id="i26" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#saveRequest-javax.servlet.ServletRequest-">saveRequest</a></span>(javax.servlet.ServletRequest request)</code> </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>static javax.servlet.http.HttpServletRequest</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#toHttp-javax.servlet.ServletRequest-">toHttp</a></span>(javax.servlet.ServletRequest 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 id="i28" class="altColor"> |
| <td class="colFirst"><code>static javax.servlet.http.HttpServletResponse</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#toHttp-javax.servlet.ServletResponse-">toHttp</a></span>(javax.servlet.ServletResponse 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 java.lang.<a href="http://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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://docs.oracle.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 <a href="http://docs.oracle.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 <a href="http://docs.oracle.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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">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 <a href="http://docs.oracle.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="seeLabel">See Also:</span></dt> |
| <dd><code>ServletRequest.getCharacterEncoding()</code>, |
| <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 <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 <a href="http://docs.oracle.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.110">getPathWithinApplication</a>(javax.servlet.http.HttpServletRequest 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - current HTTP request</dd> |
| <dt><span class="returnLabel">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 <a href="http://docs.oracle.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.135">getRequestUri</a>(javax.servlet.http.HttpServletRequest 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - current HTTP request</dd> |
| <dt><span class="returnLabel">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 <a href="http://docs.oracle.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.154">normalize</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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="paramLabel">Parameters:</span></dt> |
| <dd><code>path</code> - Relative path to be normalized</dd> |
| <dt><span class="returnLabel">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 <a href="http://docs.oracle.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.246">getContextPath</a>(javax.servlet.http.HttpServletRequest 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - current HTTP request</dd> |
| <dt><span class="returnLabel">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 <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.272">getRequiredWebEnvironment</a>(javax.servlet.ServletContext sc) |
| throws <a href="http://docs.oracle.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="paramLabel">Parameters:</span></dt> |
| <dd><code>sc</code> - ServletContext to find the web application context for</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the root WebApplicationContext for this web app</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.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="simpleTagLabel">Since:</span></dt> |
| <dd>1.2</dd> |
| <dt><span class="seeLabel">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 <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.294">getWebEnvironment</a>(javax.servlet.ServletContext 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="paramLabel">Parameters:</span></dt> |
| <dd><code>sc</code> - ServletContext to find the web application context for</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the root WebApplicationContext for this web app, or <code>null</code> if none</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.2</dd> |
| <dt><span class="seeLabel">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 <a href="../../../../../org/apache/shiro/web/env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.306">getWebEnvironment</a>(javax.servlet.ServletContext sc, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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="paramLabel">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="returnLabel">Returns:</span></dt> |
| <dd>the desired WebEnvironment for this web app, or <code>null</code> if none</dd> |
| <dt><span class="simpleTagLabel">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 <a href="http://docs.oracle.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.344">decodeRequestString</a>(javax.servlet.http.HttpServletRequest request, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - current HTTP request</dd> |
| <dd><code>source</code> - the String to decode</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the decoded String</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/shiro/web/util/WebUtils.html#DEFAULT_CHARACTER_ENCODING"><code>DEFAULT_CHARACTER_ENCODING</code></a>, |
| <code>ServletRequest.getCharacterEncoding()</code>, |
| <a href="http://docs.oracle.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://docs.oracle.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 <a href="http://docs.oracle.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.368">determineEncoding</a>(javax.servlet.http.HttpServletRequest 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 |
| <code>character encoding</code>, 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - current HTTP request</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the encoding for the request (never <code>null</code>)</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><code>ServletRequest.getCharacterEncoding()</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isWeb-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isWeb</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.390">isWeb</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a name="isHttp-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isHttp</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.394">isHttp</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a name="getRequest-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRequest</h4> |
| <pre>public static javax.servlet.ServletRequest <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.398">getRequest</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a name="getResponse-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResponse</h4> |
| <pre>public static javax.servlet.ServletResponse <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.405">getResponse</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a name="getHttpRequest-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHttpRequest</h4> |
| <pre>public static javax.servlet.http.HttpServletRequest <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.412">getHttpRequest</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a name="getHttpResponse-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHttpResponse</h4> |
| <pre>public static javax.servlet.http.HttpServletResponse <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.420">getHttpResponse</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a name="Z:Z_isSessionCreationEnabled-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>_isSessionCreationEnabled</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.452">_isSessionCreationEnabled</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> 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="paramLabel">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="returnLabel">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="Z:Z_isSessionCreationEnabled-javax.servlet.ServletRequest-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>_isSessionCreationEnabled</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.471">_isSessionCreationEnabled</a>(javax.servlet.ServletRequest 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - incoming servlet request.</dd> |
| <dt><span class="returnLabel">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 javax.servlet.http.HttpServletRequest <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.493">toHttp</a>(javax.servlet.ServletRequest 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - the incoming ServletRequest</dd> |
| <dt><span class="returnLabel">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 javax.servlet.http.HttpServletResponse <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.509">toHttp</a>(javax.servlet.ServletResponse 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="paramLabel">Parameters:</span></dt> |
| <dd><code>response</code> - the outgoing ServletResponse</dd> |
| <dt><span class="returnLabel">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 void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.524">issueRedirect</a>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> queryParams, |
| boolean contextRelative, |
| boolean http10Compatible) |
| throws <a href="http://docs.oracle.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="paramLabel">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="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.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 void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.538">issueRedirect</a>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url) |
| throws <a href="http://docs.oracle.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="paramLabel">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="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.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 void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.552">issueRedirect</a>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> queryParams) |
| throws <a href="http://docs.oracle.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="paramLabel">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="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.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 void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.567">issueRedirect</a>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> queryParams, |
| boolean contextRelative) |
| throws <a href="http://docs.oracle.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="paramLabel">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="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.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 boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.581">isTrue</a>(javax.servlet.ServletRequest request, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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="paramLabel">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="returnLabel">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 <a href="http://docs.oracle.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.601">getCleanParam</a>(javax.servlet.ServletRequest request, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - the servlet request.</dd> |
| <dd><code>paramName</code> - the parameter name.</dd> |
| <dt><span class="returnLabel">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 void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.605">saveRequest</a>(javax.servlet.ServletRequest request)</pre> |
| </li> |
| </ul> |
| <a name="getAndClearSavedRequest-javax.servlet.ServletRequest-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAndClearSavedRequest</h4> |
| <pre>public static <a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.613">getAndClearSavedRequest</a>(javax.servlet.ServletRequest request)</pre> |
| </li> |
| </ul> |
| <a name="getSavedRequest-javax.servlet.ServletRequest-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSavedRequest</h4> |
| <pre>public static <a href="../../../../../org/apache/shiro/web/util/SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.623">getSavedRequest</a>(javax.servlet.ServletRequest 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 void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.652">redirectToSavedRequest</a>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> fallbackUrl) |
| throws <a href="http://docs.oracle.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://docs.oracle.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="paramLabel">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="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.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://docs.oracle.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="simpleTagLabel">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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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="typeNameLink">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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2004–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |