| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_21) on Thu May 30 14:51:27 PDT 2013 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>RedirectView (Apache Shiro 1.2.1 API)</title> |
| <meta name="date" content="2013-05-30"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="RedirectView (Apache Shiro 1.2.1 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/RedirectView.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../org/apache/shiro/web/util/RequestPairSource.html" title="interface in org.apache.shiro.web.util"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/shiro/web/util/RedirectView.html" target="_top">Frames</a></li> |
| <li><a href="RedirectView.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.shiro.web.util</div> |
| <h2 title="Class RedirectView" class="title">Class RedirectView</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.web.util.RedirectView</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.63">RedirectView</a> |
| extends <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">View that redirects to an absolute, context relative, or current request |
| relative URL, exposing all model attributes as HTTP query parameters. |
| <p/> |
| A URL for this view is supposed to be a HTTP redirect URL, i.e. |
| suitable for HttpServletResponse's <code>sendRedirect</code> method, which |
| is what actually does the redirect if the HTTP 1.0 flag is on, or via sending |
| back an HTTP 303 code - if the HTTP 1.0 compatibility flag is off. |
| <p/> |
| Note that while the default value for the "contextRelative" flag is off, |
| you will probably want to almost always set it to true. With the flag off, |
| URLs starting with "/" are considered relative to the web server root, while |
| with the flag on, they are considered relative to the web application root. |
| Since most web apps will never know or care what their context path actually |
| is, they are much better off setting this flag to true, and submitting paths |
| which are to be considered relative to the web application root. |
| <p/> |
| Note that in a Servlet 2.2 environment, i.e. a servlet container which |
| is only compliant to the limits of this spec, this class will probably fail |
| when feeding in URLs which are not fully absolute, or relative to the current |
| request (no leading "/"), as these are the only two types of URL that |
| <code>sendRedirect</code> supports in a Servlet 2.2 environment. |
| <p/> |
| <em>This class was borrowed from a nearly identical version found in |
| the <a href="http://www.springframework.org/">Spring Framework</a>, with minor modifications to |
| avoid a dependency on Spring itself for a very small amount of code - we couldn't have done it better, and |
| don't want to repeat all of their great effort ;). |
| The original author names and copyright (Apache 2.0) has been left in place. A special |
| thanks to Rod Johnson, Juergen Hoeller, and Colin Sampaleanu for making this available.</em></div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>0.2</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#setContextRelative(boolean)"><code>setContextRelative(boolean)</code></a>, |
| <a href="../../../../../org/apache/shiro/web/util/RedirectView.html#setHttp10Compatible(boolean)"><code>setHttp10Compatible(boolean)</code></a>, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true#sendRedirect(java.lang.String)" title="class or interface in javax.servlet.http"><code>HttpServletResponse.sendRedirect(java.lang.String)</code></a></dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#DEFAULT_ENCODING_SCHEME">DEFAULT_ENCODING_SCHEME</a></strong></code> |
| <div class="block">The default encoding scheme: UTF-8</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#RedirectView()">RedirectView</a></strong>()</code> |
| <div class="block">Constructor for use as a bean.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#RedirectView(java.lang.String)">RedirectView</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url)</code> |
| <div class="block">Create a new RedirectView with the given URL.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#RedirectView(java.lang.String, boolean)">RedirectView</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| boolean contextRelative)</code> |
| <div class="block">Create a new RedirectView with the given URL.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#RedirectView(java.lang.String, boolean, boolean)">RedirectView</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| boolean contextRelative, |
| boolean http10Compatible)</code> |
| <div class="block">Create a new RedirectView with the given URL.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#appendQueryProperties(java.lang.StringBuilder, java.util.Map, java.lang.String)">appendQueryProperties</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> targetUrl, |
| <a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> model, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodingScheme)</code> |
| <div class="block">Append query properties to the redirect URL.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#getUrl()">getUrl</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#queryProperties(java.util.Map)">queryProperties</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> model)</code> |
| <div class="block">Determine name-value pairs for query strings, which will be stringified, |
| URL-encoded and formatted by appendQueryProperties.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#renderMergedOutputModel(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)">renderMergedOutputModel</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> model, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a> request, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a> response)</code> |
| <div class="block">Convert model to request parameters and redirect to the given URL.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#sendRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, boolean)">sendRedirect</a></strong>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a> request, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a> response, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> targetUrl, |
| boolean http10Compatible)</code> |
| <div class="block">Send a redirect back to the HTTP client</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#setContextRelative(boolean)">setContextRelative</a></strong>(boolean contextRelative)</code> |
| <div class="block">Set whether to interpret a given URL that starts with a slash ("/") |
| as relative to the current ServletContext, i.e.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#setEncodingScheme(java.lang.String)">setEncodingScheme</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodingScheme)</code> |
| <div class="block">Set the encoding scheme for this view.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#setHttp10Compatible(boolean)">setHttp10Compatible</a></strong>(boolean http10Compatible)</code> |
| <div class="block">Set whether to stay compatible with HTTP 1.0 clients.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#setUrl(java.lang.String)">setUrl</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#urlEncode(java.lang.String, java.lang.String)">urlEncode</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodingScheme)</code> |
| <div class="block">URL-encode the given input String with the given encoding scheme, using |
| <a href="http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html?is-external=true#encode(java.lang.String, java.lang.String)" title="class or interface in java.net"><code>URLEncoder.encode(input, enc)</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="DEFAULT_ENCODING_SCHEME"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DEFAULT_ENCODING_SCHEME</h4> |
| <pre>public static final <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.70">DEFAULT_ENCODING_SCHEME</a></pre> |
| <div class="block">The default encoding scheme: UTF-8</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.shiro.web.util.RedirectView.DEFAULT_ENCODING_SCHEME">Constant Field Values</a></dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="RedirectView()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>RedirectView</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.84">RedirectView</a>()</pre> |
| <div class="block">Constructor for use as a bean.</div> |
| </li> |
| </ul> |
| <a name="RedirectView(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>RedirectView</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.95">RedirectView</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url)</pre> |
| <div class="block">Create a new RedirectView with the given URL. |
| <p>The given URL will be considered as relative to the web server, |
| not as relative to the current ServletContext.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>url</code> - the URL to redirect to</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#RedirectView(java.lang.String, boolean)"><code>RedirectView(String, boolean)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="RedirectView(java.lang.String, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>RedirectView</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.106">RedirectView</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| boolean contextRelative)</pre> |
| <div class="block">Create a new RedirectView with the given URL.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>url</code> - the URL to redirect to</dd><dd><code>contextRelative</code> - whether to interpret the given URL as |
| relative to the current ServletContext</dd></dl> |
| </li> |
| </ul> |
| <a name="RedirectView(java.lang.String, boolean, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>RedirectView</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.119">RedirectView</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url, |
| boolean contextRelative, |
| boolean http10Compatible)</pre> |
| <div class="block">Create a new RedirectView with the given URL.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>url</code> - the URL to redirect to</dd><dd><code>contextRelative</code> - whether to interpret the given URL as |
| relative to the current ServletContext</dd><dd><code>http10Compatible</code> - whether to stay compatible with HTTP 1.0 clients</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getUrl()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUrl</h4> |
| <pre>public <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.126">getUrl</a>()</pre> |
| </li> |
| </ul> |
| <a name="setUrl(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setUrl</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.130">setUrl</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> url)</pre> |
| </li> |
| </ul> |
| <a name="setContextRelative(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setContextRelative</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.148">setContextRelative</a>(boolean contextRelative)</pre> |
| <div class="block">Set whether to interpret a given URL that starts with a slash ("/") |
| as relative to the current ServletContext, i.e. as relative to the |
| web application root. |
| <p/> |
| Default is "false": A URL that starts with a slash will be interpreted |
| as absolute, i.e. taken as-is. If true, the context path will be |
| prepended to the URL in such a case.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>contextRelative</code> - whether to interpret a given URL that starts with a slash ("/") |
| as relative to the current ServletContext, i.e. as relative to the |
| web application root.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true#getContextPath()" title="class or interface in javax.servlet.http"><code>HttpServletRequest.getContextPath()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="setHttp10Compatible(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setHttp10Compatible</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.165">setHttp10Compatible</a>(boolean http10Compatible)</pre> |
| <div class="block">Set whether to stay compatible with HTTP 1.0 clients. |
| <p>In the default implementation, this will enforce HTTP status code 302 |
| in any case, i.e. delegate to <code>HttpServletResponse.sendRedirect</code>. |
| Turning this off will send HTTP status code 303, which is the correct |
| code for HTTP 1.1 clients, but not understood by HTTP 1.0 clients. |
| <p>Many HTTP 1.1 clients treat 302 just like 303, not making any |
| difference. However, some clients depend on 303 when redirecting |
| after a POST request; turn this flag off in such a scenario.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>http10Compatible</code> - whether to stay compatible with HTTP 1.0 clients.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true#sendRedirect(java.lang.String)" title="class or interface in javax.servlet.http"><code>HttpServletResponse.sendRedirect(java.lang.String)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="setEncodingScheme(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setEncodingScheme</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.175">setEncodingScheme</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodingScheme)</pre> |
| <div class="block">Set the encoding scheme for this view. Default is UTF-8.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>encodingScheme</code> - the encoding scheme for this view. Default is UTF-8.</dd></dl> |
| </li> |
| </ul> |
| <a name="renderMergedOutputModel(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>renderMergedOutputModel</h4> |
| <pre>public final void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.190">renderMergedOutputModel</a>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> model, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a> request, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a> response) |
| throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Convert model to request parameters and redirect to the given URL.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - the model to convert</dd><dd><code>request</code> - the incoming HttpServletRequest</dd><dd><code>response</code> - the outgoing HttpServletResponse</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem issuing the redirect</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#appendQueryProperties(java.lang.StringBuilder, java.util.Map, java.lang.String)"><code>appendQueryProperties(java.lang.StringBuilder, java.util.Map, java.lang.String)</code></a>, |
| <a href="../../../../../org/apache/shiro/web/util/RedirectView.html#sendRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, boolean)"><code>sendRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, boolean)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="appendQueryProperties(java.lang.StringBuilder, java.util.Map, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>appendQueryProperties</h4> |
| <pre>protected void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.218">appendQueryProperties</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> targetUrl, |
| <a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> model, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodingScheme) |
| throws <a href="http://java.sun.com/javase/6/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> |
| <div class="block">Append query properties to the redirect URL. |
| Stringifies, URL-encodes and formats model attributes as query properties.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>targetUrl</code> - the StringBuffer to append the properties to</dd><dd><code>model</code> - Map that contains model attributes</dd><dd><code>encodingScheme</code> - the encoding scheme to use</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if string encoding failed</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#urlEncode(java.lang.String, java.lang.String)"><code>urlEncode(java.lang.String, java.lang.String)</code></a>, |
| <a href="../../../../../org/apache/shiro/web/util/RedirectView.html#queryProperties(java.util.Map)"><code>queryProperties(java.util.Map)</code></a>, |
| <a href="../../../../../org/apache/shiro/web/util/RedirectView.html#urlEncode(java.lang.String, java.lang.String)"><code>urlEncode(String, String)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="urlEncode(java.lang.String, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>urlEncode</h4> |
| <pre>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.268">urlEncode</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encodingScheme) |
| throws <a href="http://java.sun.com/javase/6/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> |
| <div class="block">URL-encode the given input String with the given encoding scheme, using |
| <a href="http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html?is-external=true#encode(java.lang.String, java.lang.String)" title="class or interface in java.net"><code>URLEncoder.encode(input, enc)</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - the unencoded input String</dd><dd><code>encodingScheme</code> - the encoding scheme</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the encoded output String</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if thrown by the JDK URLEncoder</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html?is-external=true#encode(java.lang.String, java.lang.String)" title="class or interface in java.net"><code>URLEncoder.encode(String, String)</code></a>, |
| <a href="http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html?is-external=true#encode(java.lang.String)" title="class or interface in java.net"><code>URLEncoder.encode(String)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="queryProperties(java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>queryProperties</h4> |
| <pre>protected <a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.282">queryProperties</a>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> model)</pre> |
| <div class="block">Determine name-value pairs for query strings, which will be stringified, |
| URL-encoded and formatted by appendQueryProperties. |
| <p/> |
| This implementation returns all model elements as-is.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - the model elements for which to determine name-value pairs.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the name-value pairs for query strings.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/shiro/web/util/RedirectView.html#appendQueryProperties(java.lang.StringBuilder, java.util.Map, java.lang.String)"><code>appendQueryProperties(java.lang.StringBuilder, java.util.Map, java.lang.String)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="sendRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>sendRedirect</h4> |
| <pre>protected void <a href="../../../../../src-html/org/apache/shiro/web/util/RedirectView.html#line.296">sendRedirect</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletRequest</a> request, |
| <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html?is-external=true" title="class or interface in javax.servlet.http">HttpServletResponse</a> response, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> targetUrl, |
| boolean http10Compatible) |
| throws <a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Send a redirect back to the HTTP client</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - current HTTP request (allows for reacting to request method)</dd><dd><code>response</code> - current HTTP response (for sending response headers)</dd><dd><code>targetUrl</code> - the name URL to redirect to</dd><dd><code>http10Compatible</code> - whether to stay compatible with HTTP 1.0 clients</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if thrown by response methods</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/RedirectView.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../org/apache/shiro/web/util/RequestPairSource.html" title="interface in org.apache.shiro.web.util"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/shiro/web/util/RedirectView.html" target="_top">Frames</a></li> |
| <li><a href="RedirectView.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2004-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |
| |