| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>WebUtils (Apache Shiro :: Web 1.12.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../jquery/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jquery-ui.min.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="WebUtils (Apache Shiro :: Web 1.12.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"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":41,"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,"i29":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"><!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* We explicitly disable cookie tracking to avoid privacy issues */ _paq.push(['disableCookies']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo.privacy.apache.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '2']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.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" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </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 id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.shiro.web.util</a></div> |
| <h2 title="Class WebUtils" class="title">Class WebUtils</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">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> |
| <pre>public class <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.51">WebUtils</a> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">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 =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ALLOW_BACKSLASH">ALLOW_BACKSLASH</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_CHARACTER_ENCODING">DEFAULT_CHARACTER_ENCODING</a></span></code></th> |
| <td class="colLast"> |
| <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="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FORWARD_CONTEXT_PATH_ATTRIBUTE">FORWARD_CONTEXT_PATH_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FORWARD_PATH_INFO_ATTRIBUTE">FORWARD_PATH_INFO_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FORWARD_QUERY_STRING_ATTRIBUTE">FORWARD_QUERY_STRING_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FORWARD_REQUEST_URI_ATTRIBUTE">FORWARD_REQUEST_URI_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Standard Servlet 2.4+ spec request attributes for forward URI and paths.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FORWARD_SERVLET_PATH_ATTRIBUTE">FORWARD_SERVLET_PATH_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INCLUDE_CONTEXT_PATH_ATTRIBUTE">INCLUDE_CONTEXT_PATH_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INCLUDE_PATH_INFO_ATTRIBUTE">INCLUDE_PATH_INFO_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INCLUDE_QUERY_STRING_ATTRIBUTE">INCLUDE_QUERY_STRING_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INCLUDE_REQUEST_URI_ATTRIBUTE">INCLUDE_REQUEST_URI_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Standard Servlet 2.3+ spec request attributes for include URI and paths.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INCLUDE_SERVLET_PATH_ATTRIBUTE">INCLUDE_SERVLET_PATH_ATTRIBUTE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SAVED_REQUEST_KEY">SAVED_REQUEST_KEY</a></span></code></th> |
| <td class="colLast"> |
| <div class="block"><code>Session</code> 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="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SERVLET_REQUEST_KEY">SERVLET_REQUEST_KEY</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SERVLET_RESPONSE_KEY">SERVLET_RESPONSE_KEY</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">WebUtils</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#_isSessionCreationEnabled(java.lang.Object)">_isSessionCreationEnabled</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> |
| <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> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#_isSessionCreationEnabled(javax.servlet.ServletRequest)">_isSessionCreationEnabled</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</code></th> |
| <td class="colLast"> |
| <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="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decodeRequestString(javax.servlet.http.HttpServletRequest,java.lang.String)">decodeRequestString</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> source)</code></th> |
| <td class="colLast"> |
| <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="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#determineEncoding(javax.servlet.http.HttpServletRequest)">determineEncoding</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request)</code></th> |
| <td class="colLast"> |
| <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="SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAndClearSavedRequest(javax.servlet.ServletRequest)">getAndClearSavedRequest</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCleanParam(javax.servlet.ServletRequest,java.lang.String)">getCleanParam</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> paramName)</code></th> |
| <td class="colLast"> |
| <div class="block">Convenience method that returns a request parameter value, first running it through |
| <code>StringUtils.clean(String)</code>.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCleanParam(javax.servlet.ServletRequest,java.lang.String,boolean)">getCleanParam</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> paramName, |
| boolean trim)</code></th> |
| <td class="colLast"> |
| <div class="block">Convenience method that returns a request parameter value, first running it through |
| <code>StringUtils.clean(String)</code>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getContextPath(javax.servlet.http.HttpServletRequest)">getContextPath</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request)</code></th> |
| <td class="colLast"> |
| <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="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHttpRequest(java.lang.Object)">getHttpRequest</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletResponse</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHttpResponse(java.lang.Object)">getHttpResponse</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPathWithinApplication(javax.servlet.http.HttpServletRequest)">getPathWithinApplication</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request)</code></th> |
| <td class="colLast"> |
| <div class="block">Return the path within the web application for the given request.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRequest(java.lang.Object)">getRequest</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRequestUri(javax.servlet.http.HttpServletRequest)">getRequestUri</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use getPathWithinApplication() to get the path minus the context path, or call HttpServletRequest.getRequestURI() directly from your code.</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRequiredWebEnvironment(javax.servlet.ServletContext)">getRequiredWebEnvironment</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletContext</a> sc)</code></th> |
| <td class="colLast"> |
| <div class="block">Find the Shiro <a href="../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="../env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><code>EnvironmentLoaderListener</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResponse(java.lang.Object)">getResponse</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSavedRequest(javax.servlet.ServletRequest)">getSavedRequest</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static <a href="../env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWebEnvironment(javax.servlet.ServletContext)">getWebEnvironment</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletContext</a> sc)</code></th> |
| <td class="colLast"> |
| <div class="block">Find the Shiro <a href="../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="../env/EnvironmentLoaderListener.html" title="class in org.apache.shiro.web.env"><code>EnvironmentLoaderListener</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../env/WebEnvironment.html" title="interface in org.apache.shiro.web.env">WebEnvironment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWebEnvironment(javax.servlet.ServletContext,java.lang.String)">getWebEnvironment</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletContext</a> sc, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> attrName)</code></th> |
| <td class="colLast"> |
| <div class="block">Find the Shiro <a href="../env/WebEnvironment.html" title="interface in org.apache.shiro.web.env"><code>WebEnvironment</code></a> for this web application.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isHttp(java.lang.Object)">isHttp</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#issueRedirect(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String)">issueRedirect</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url)</code></th> |
| <td class="colLast"> |
| <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> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#issueRedirect(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.util.Map)">issueRedirect</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a> queryParams)</code></th> |
| <td class="colLast"> |
| <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> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#issueRedirect(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.util.Map,boolean)">issueRedirect</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a> queryParams, |
| boolean contextRelative)</code></th> |
| <td class="colLast"> |
| <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="i22" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#issueRedirect(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.util.Map,boolean,boolean)">issueRedirect</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a> queryParams, |
| boolean contextRelative, |
| boolean http10Compatible)</code></th> |
| <td class="colLast"> |
| <div class="block">Redirects the current request to a new URL based on the given parameters.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isTrue(javax.servlet.ServletRequest,java.lang.String)">isTrue</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> paramName)</code></th> |
| <td class="colLast"> |
| <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="i24" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWeb(java.lang.Object)">isWeb</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#normalize(java.lang.String)">normalize</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> path)</code></th> |
| <td class="colLast"> |
| <div class="block">Normalize a relative URI path that may have relative values ("/./", |
| "/../", and so on ) it it.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#redirectToSavedRequest(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String)">redirectToSavedRequest</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> fallbackUrl)</code></th> |
| <td class="colLast"> |
| <div class="block">Redirects the to the request url from a previously |
| <a href="#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="i27" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#saveRequest(javax.servlet.ServletRequest)">saveRequest</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toHttp(javax.servlet.ServletRequest)">toHttp</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</code></th> |
| <td class="colLast"> |
| <div class="block">A convenience method that merely casts the incoming <code>ServletRequest</code> to an |
| <code>HttpServletRequest</code>:</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletResponse</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toHttp(javax.servlet.ServletResponse)">toHttp</a></span>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response)</code></th> |
| <td class="colLast"> |
| <div class="block">A convenience method that merely casts the incoming <code>ServletResponse</code> to an |
| <code>HttpServletResponse</code>:</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="SERVLET_REQUEST_KEY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SERVLET_REQUEST_KEY</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.57">SERVLET_REQUEST_KEY</a></pre> |
| </li> |
| </ul> |
| <a id="SERVLET_RESPONSE_KEY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SERVLET_RESPONSE_KEY</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.58">SERVLET_RESPONSE_KEY</a></pre> |
| </li> |
| </ul> |
| <a id="ALLOW_BACKSLASH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ALLOW_BACKSLASH</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.60">ALLOW_BACKSLASH</a></pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.WebUtils.ALLOW_BACKSLASH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="SAVED_REQUEST_KEY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SAVED_REQUEST_KEY</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.66">SAVED_REQUEST_KEY</a></pre> |
| <div class="block"><code>Session</code> 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 id="INCLUDE_REQUEST_URI_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>INCLUDE_REQUEST_URI_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.73">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 id="INCLUDE_CONTEXT_PATH_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>INCLUDE_CONTEXT_PATH_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.74">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 id="INCLUDE_SERVLET_PATH_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>INCLUDE_SERVLET_PATH_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.75">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 id="INCLUDE_PATH_INFO_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>INCLUDE_PATH_INFO_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.76">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 id="INCLUDE_QUERY_STRING_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>INCLUDE_QUERY_STRING_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.77">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 id="FORWARD_REQUEST_URI_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FORWARD_REQUEST_URI_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.84">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 id="FORWARD_CONTEXT_PATH_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FORWARD_CONTEXT_PATH_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.85">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 id="FORWARD_SERVLET_PATH_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FORWARD_SERVLET_PATH_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.86">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 id="FORWARD_PATH_INFO_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FORWARD_PATH_INFO_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.87">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 id="FORWARD_QUERY_STRING_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FORWARD_QUERY_STRING_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.88">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 id="DEFAULT_CHARACTER_ENCODING"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DEFAULT_CHARACTER_ENCODING</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.96">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><a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet" class="externalLink"><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> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>WebUtils</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.51">WebUtils</a>()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getPathWithinApplication(javax.servlet.http.HttpServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPathWithinApplication</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.113">getPathWithinApplication</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> 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 id="getRequestUri(javax.servlet.http.HttpServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRequestUri</h4> |
| <pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang" class="externalLink">@Deprecated</a> |
| public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.130">getRequestUri</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">use getPathWithinApplication() to get the path minus the context path, or call HttpServletRequest.getRequestURI() directly from your code.</div> |
| </div> |
| <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 id="normalize(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>normalize</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.167">normalize</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">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 id="getContextPath(javax.servlet.http.HttpServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContextPath</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.263">getContextPath</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> 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 id="getRequiredWebEnvironment(javax.servlet.ServletContext)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRequiredWebEnvironment</h4> |
| <pre class="methodSignature">public static <a href="../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.289">getRequiredWebEnvironment</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletContext</a> sc) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></pre> |
| <div class="block">Find the Shiro <a href="../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="../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="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">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="../env/EnvironmentLoader.html#ENVIRONMENT_ATTRIBUTE_KEY"><code>EnvironmentLoader.ENVIRONMENT_ATTRIBUTE_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getWebEnvironment(javax.servlet.ServletContext)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWebEnvironment</h4> |
| <pre class="methodSignature">public static <a href="../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.311">getWebEnvironment</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletContext</a> sc)</pre> |
| <div class="block">Find the Shiro <a href="../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="../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="../env/EnvironmentLoader.html#ENVIRONMENT_ATTRIBUTE_KEY"><code>EnvironmentLoader.ENVIRONMENT_ATTRIBUTE_KEY</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getWebEnvironment(javax.servlet.ServletContext,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWebEnvironment</h4> |
| <pre class="methodSignature">public static <a href="../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.323">getWebEnvironment</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletContext</a> sc, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> attrName)</pre> |
| <div class="block">Find the Shiro <a href="../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 id="decodeRequestString(javax.servlet.http.HttpServletRequest,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>decodeRequestString</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.360">decodeRequestString</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">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="#DEFAULT_CHARACTER_ENCODING"><code>DEFAULT_CHARACTER_ENCODING</code></a>, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet" class="externalLink"><code>ServletRequest.getCharacterEncoding()</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URLDecoder.html?is-external=true#decode(java.lang.String,java.lang.String)" title="class or interface in java.net" class="externalLink"><code>URLDecoder.decode(String, String)</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/URLDecoder.html?is-external=true#decode(java.lang.String)" title="class or interface in java.net" class="externalLink"><code>URLDecoder.decode(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="determineEncoding(javax.servlet.http.HttpServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>determineEncoding</h4> |
| <pre class="methodSignature">protected static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.385">determineEncoding</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> 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="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet" class="externalLink"><code>character encoding</code></a>, and if that |
| <code>null</code>, falls back to the <a href="#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><a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true#getCharacterEncoding()" title="class or interface in javax.servlet" class="externalLink"><code>ServletRequest.getCharacterEncoding()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isWeb(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isWeb</h4> |
| <pre class="methodSignature">public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.407">isWeb</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a id="isHttp(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isHttp</h4> |
| <pre class="methodSignature">public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.411">isHttp</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a id="getRequest(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRequest</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.415">getRequest</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a id="getResponse(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResponse</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.422">getResponse</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a id="getHttpRequest(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHttpRequest</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.429">getHttpRequest</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a id="getHttpResponse(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHttpResponse</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletResponse</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.437">getHttpResponse</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> requestPairSource)</pre> |
| </li> |
| </ul> |
| <a id="_isSessionCreationEnabled(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>_isSessionCreationEnabled</h4> |
| <pre class="methodSignature">public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.469">_isSessionCreationEnabled</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">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="RequestPairSource.html" title="interface in org.apache.shiro.web.util"><code>RequestPairSource</code></a> instance, almost always a |
| <a href="../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 id="_isSessionCreationEnabled(javax.servlet.ServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>_isSessionCreationEnabled</h4> |
| <pre class="methodSignature">public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.488">_isSessionCreationEnabled</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> 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 id="toHttp(javax.servlet.ServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toHttp</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.510">toHttp</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> 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 id="toHttp(javax.servlet.ServletResponse)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toHttp</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http" class="externalLink">HttpServletResponse</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.526">toHttp</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> 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 id="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 class="methodSignature">public static void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.541">issueRedirect</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a> queryParams, |
| boolean contextRelative, |
| boolean http10Compatible) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">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="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if thrown by response methods.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="issueRedirect(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>issueRedirect</h4> |
| <pre class="methodSignature">public static void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.555">issueRedirect</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">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="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if thrown by response methods.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="issueRedirect(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>issueRedirect</h4> |
| <pre class="methodSignature">public static void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.569">issueRedirect</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a> queryParams) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">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="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if thrown by response methods.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="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 class="methodSignature">public static void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.584">issueRedirect</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> url, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a> queryParams, |
| boolean contextRelative) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">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="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if thrown by response methods.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isTrue(javax.servlet.ServletRequest,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isTrue</h4> |
| <pre class="methodSignature">public static boolean <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.598">isTrue</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">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> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the param value is considered true or false if it isn't.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCleanParam(javax.servlet.ServletRequest,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCleanParam</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.618">getCleanParam</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> paramName)</pre> |
| <div class="block">Convenience method that returns a request parameter value, first running it through |
| <code>StringUtils.clean(String)</code>.</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 id="getCleanParam(javax.servlet.ServletRequest,java.lang.String,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCleanParam</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.631">getCleanParam</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> paramName, |
| boolean trim)</pre> |
| <div class="block">Convenience method that returns a request parameter value, first running it through |
| <code>StringUtils.clean(String)</code>.</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> |
| <dd><code>trim</code> - specifies whether the parameter value should be trimmed or not</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 id="saveRequest(javax.servlet.ServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>saveRequest</h4> |
| <pre class="methodSignature">public static void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.635">saveRequest</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</pre> |
| </li> |
| </ul> |
| <a id="getAndClearSavedRequest(javax.servlet.ServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAndClearSavedRequest</h4> |
| <pre class="methodSignature">public static <a href="SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.643">getAndClearSavedRequest</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</pre> |
| </li> |
| </ul> |
| <a id="getSavedRequest(javax.servlet.ServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSavedRequest</h4> |
| <pre class="methodSignature">public static <a href="SavedRequest.html" title="class in org.apache.shiro.web.util">SavedRequest</a> <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.653">getSavedRequest</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request)</pre> |
| </li> |
| </ul> |
| <a id="redirectToSavedRequest(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>redirectToSavedRequest</h4> |
| <pre class="methodSignature">public static void <a href="../../../../../src-html/org/apache/shiro/web/util/WebUtils.html#line.682">redirectToSavedRequest</a>​(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a> request, |
| <a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a> response, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> fallbackUrl) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre> |
| <div class="block">Redirects the to the request url from a previously |
| <a href="#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="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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="#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="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - if there is no saved request and the <code>fallbackUrl</code> is <code>null</code>.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">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> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.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" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses.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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </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 id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2004–2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |