| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc on Fri Jun 15 16:53:37 PDT 2001 --> |
| <TITLE> |
| Apache Struts API Documentation: Class RequestUtils |
| </TITLE> |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| </HEAD> |
| <BODY BGCOLOR="white"> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/struts/util/PropertyUtils.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/struts/util/ResponseUtils.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="RequestUtils.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.struts.util</FONT> |
| <BR> |
| Class RequestUtils</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.struts.util.RequestUtils</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT>public class <B>RequestUtils</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| General purpose utility methods related to processing a servlet request |
| in the Struts controller framework. |
| <P> |
| <DL> |
| <DT><B>Version: </B><DD>$Revision: 1.1 $ $Date$</DD> |
| <DT><B>Author: </B><DD>Craig R. McClanahan</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== INNER CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static java.util.Locale</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#defaultLocale">defaultLocale</A></B></CODE> |
| |
| <BR> |
| The default Locale for our server.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static <A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#messages">messages</A></B></CODE> |
| |
| <BR> |
| The message resources for this package.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#RequestUtils()">RequestUtils</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.net.URL</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#absoluteURL(javax.servlet.http.HttpServletRequest, java.lang.String)">absoluteURL</A></B>(javax.servlet.http.HttpServletRequest request, |
| java.lang.String path)</CODE> |
| |
| <BR> |
| Create and return an absolute URL for the specified context-relative |
| path, based on the server and context information in the specified |
| request.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.util.Map</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#computeParameters(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)">computeParameters</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String paramId, |
| java.lang.String paramName, |
| java.lang.String paramProperty, |
| java.lang.String paramScope, |
| java.lang.String name, |
| java.lang.String property, |
| java.lang.String scope, |
| boolean transaction)</CODE> |
| |
| <BR> |
| Compute a set of query parameters that will be dynamically added to |
| a generated URL.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#computeURL(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String, boolean)">computeURL</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String forward, |
| java.lang.String href, |
| java.lang.String page, |
| java.util.Map params, |
| java.lang.String anchor, |
| boolean redirect)</CODE> |
| |
| <BR> |
| Compute a hyperlink URL based on the <code>forward</code>, |
| <code>href</code>, or <code>page</code> parameter that is not null.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#lookup(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String)">lookup</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String name, |
| java.lang.String scope)</CODE> |
| |
| <BR> |
| Locate and return the specified bean, from an optionally specified |
| scope, in the specified page context.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.Object</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#lookup(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String)">lookup</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String name, |
| java.lang.String property, |
| java.lang.String scope)</CODE> |
| |
| <BR> |
| Locate and return the specified property of the specified bean, from |
| an optionally specified scope, in the specified page context.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#message(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String)">message</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String bundle, |
| java.lang.String locale, |
| java.lang.String key)</CODE> |
| |
| <BR> |
| Look up and return a message string, based on the specified parameters.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#message(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String, java.lang.Object[])">message</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String bundle, |
| java.lang.String locale, |
| java.lang.String key, |
| java.lang.Object[] args)</CODE> |
| |
| <BR> |
| Look up and return a message string, based on the specified parameters.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#populate(java.lang.Object, javax.servlet.http.HttpServletRequest)">populate</A></B>(java.lang.Object bean, |
| javax.servlet.http.HttpServletRequest request)</CODE> |
| |
| <BR> |
| Populate the properties of the specified JavaBean from the specified |
| HTTP request, based on matching each parameter name against the |
| corresponding JavaBeans "property setter" methods in the bean's class.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)">populate</A></B>(java.lang.Object bean, |
| java.lang.String prefix, |
| java.lang.String suffix, |
| javax.servlet.http.HttpServletRequest request)</CODE> |
| |
| <BR> |
| Populate the properties of the specified JavaBean from the specified |
| HTTP request, based on matching each parameter name (plus an optional |
| prefix and/or suffix) against the corresponding JavaBeans "property |
| setter" methods in the bean's class.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#present(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String)">present</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String bundle, |
| java.lang.String locale, |
| java.lang.String key)</CODE> |
| |
| <BR> |
| Return true if a message string for the specified message key |
| is present for the specified Locale.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#printableURL(java.net.URL)">printableURL</A></B>(java.net.URL url)</CODE> |
| |
| <BR> |
| Compute the printable representation of a URL, leaving off the |
| scheme/host/port part if no host is specified.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.net.URL</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#requestURL(javax.servlet.http.HttpServletRequest)">requestURL</A></B>(javax.servlet.http.HttpServletRequest request)</CODE> |
| |
| <BR> |
| Return the URL representing the current request.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#saveException(javax.servlet.jsp.PageContext, java.lang.Throwable)">saveException</A></B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.Throwable exception)</CODE> |
| |
| <BR> |
| Save the specified exception as a request attribute for later use.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.net.URL</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/struts/util/RequestUtils.html#serverURL(javax.servlet.http.HttpServletRequest)">serverURL</A></B>(javax.servlet.http.HttpServletRequest request)</CODE> |
| |
| <BR> |
| Return the URL representing the scheme, server, and port number of |
| the current request.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.lang.Object</B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="defaultLocale"><!-- --></A><H3> |
| defaultLocale</H3> |
| <PRE> |
| private static final java.util.Locale <B>defaultLocale</B></PRE> |
| <DL> |
| <DD>The default Locale for our server.</DL> |
| <HR> |
| |
| <A NAME="messages"><!-- --></A><H3> |
| messages</H3> |
| <PRE> |
| private static <A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A> <B>messages</B></PRE> |
| <DL> |
| <DD>The message resources for this package.</DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="RequestUtils()"><!-- --></A><H3> |
| RequestUtils</H3> |
| <PRE> |
| public <B>RequestUtils</B>()</PRE> |
| <DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="absoluteURL(javax.servlet.http.HttpServletRequest, java.lang.String)"><!-- --></A><H3> |
| absoluteURL</H3> |
| <PRE> |
| public static java.net.URL <B>absoluteURL</B>(javax.servlet.http.HttpServletRequest request, |
| java.lang.String path) |
| throws java.net.MalformedURLException</PRE> |
| <DL> |
| <DD>Create and return an absolute URL for the specified context-relative |
| path, based on the server and context information in the specified |
| request.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DD><CODE>path</CODE> - The context-relative path (must start with '/')<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if we cannot create an absolute URL</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="computeParameters(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)"><!-- --></A><H3> |
| computeParameters</H3> |
| <PRE> |
| public static java.util.Map <B>computeParameters</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String paramId, |
| java.lang.String paramName, |
| java.lang.String paramProperty, |
| java.lang.String paramScope, |
| java.lang.String name, |
| java.lang.String property, |
| java.lang.String scope, |
| boolean transaction) |
| throws javax.servlet.jsp.JspException</PRE> |
| <DL> |
| <DD>Compute a set of query parameters that will be dynamically added to |
| a generated URL. The returned Map is keyed by parameter name, and the |
| values are either null (no value specified), a String (single value |
| specified), or a String[] array (multiple values specified). Parameter |
| names correspond to the corresponding attributes of the |
| <code><html:link></code> tag. If no query parameters are |
| identified, return <code>null</code>.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - PageContext we are operating in<DD><CODE>paramId</CODE> - Single-value request parameter name (if any)<DD><CODE>paramName</CODE> - Bean containing single-value parameter value<DD><CODE>paramProperty</CODE> - Property (of bean named by <code>paramName</code> |
| containing single-value parameter value<DD><CODE>paramScope</CODE> - Scope containing bean named by |
| <code>paramScope</code><DD><CODE>name</CODE> - Bean containing multi-value parameters Map (if any)<DD><CODE>property</CODE> - Property (of bean named by <code>name</code> |
| containing multi-value parameters Map<DD><CODE>scope</CODE> - Scope containing bean named by |
| <code>name</code><DD><CODE>transaction</CODE> - Should we add our transaction control token?<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if we cannot look up the required beans<DD><CODE>javax.servlet.jsp.JspException</CODE> - if a class cast exception occurs on a |
| looked-up bean or property</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="computeURL(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String, boolean)"><!-- --></A><H3> |
| computeURL</H3> |
| <PRE> |
| public static java.lang.String <B>computeURL</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String forward, |
| java.lang.String href, |
| java.lang.String page, |
| java.util.Map params, |
| java.lang.String anchor, |
| boolean redirect) |
| throws java.net.MalformedURLException</PRE> |
| <DL> |
| <DD>Compute a hyperlink URL based on the <code>forward</code>, |
| <code>href</code>, or <code>page</code> parameter that is not null. |
| The returned URL will have already been passed to |
| <code>response.encodeURL()</code> for adding a session identifier.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - PageContext for the tag making this call<DD><CODE>forward</CODE> - Logical forward name for which to look up |
| the context-relative URI (if specified)<DD><CODE>href</CODE> - URL to be utilized unmodified (if specified)<DD><CODE>page</CODE> - Context-relative page for which a URL should |
| be created (if specified)<DD><CODE>params</CODE> - Map of parameters to be dynamically included (if any)<DD><CODE>anchor</CODE> - Anchor to be dynamically included (if any)<DD><CODE>redirect</CODE> - Is this URL for a <code>response.sendRedirect()</code>?<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if a URL cannot be created |
| for the specified parameters</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="lookup(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String)"><!-- --></A><H3> |
| lookup</H3> |
| <PRE> |
| public static java.lang.Object <B>lookup</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String name, |
| java.lang.String scope) |
| throws javax.servlet.jsp.JspException</PRE> |
| <DL> |
| <DD>Locate and return the specified bean, from an optionally specified |
| scope, in the specified page context. If no such bean is found, |
| return <code>null</code> instead. If an exception is thrown, it will |
| have already been saved via a call to <code>saveException()</code>.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - Page context to be searched<DD><CODE>name</CODE> - Name of the bean to be retrieved<DD><CODE>scope</CODE> - Scope to be searched (page, request, session, application) |
| or <code>null</code> to use <code>findAttribute()</code> instead<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if an invalid scope name |
| is requested</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="lookup(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> |
| lookup</H3> |
| <PRE> |
| public static java.lang.Object <B>lookup</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String name, |
| java.lang.String property, |
| java.lang.String scope) |
| throws javax.servlet.jsp.JspException</PRE> |
| <DL> |
| <DD>Locate and return the specified property of the specified bean, from |
| an optionally specified scope, in the specified page context. If an |
| exception is thrown, it will have already been saved via a call to |
| <code>saveException()</code>.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - Page context to be searched<DD><CODE>name</CODE> - Name of the bean to be retrieved<DD><CODE>property</CODE> - Name of the property to be retrieved, or |
| <code>null</code> to retrieve the bean itself<DD><CODE>scope</CODE> - Scope to be searched (page, request, session, application) |
| or <code>null</code> to use <code>findAttribute()</code> instead<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if an invalid scope name |
| is requested<DD><CODE>javax.servlet.jsp.JspException</CODE> - if the specified bean is not found<DD><CODE>javax.servlet.jsp.JspException</CODE> - if accessing this property causes an |
| IllegalAccessException, IllegalArgumentException, |
| InvocationTargetException, or NoSuchMethodException</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="message(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> |
| message</H3> |
| <PRE> |
| public static java.lang.String <B>message</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String bundle, |
| java.lang.String locale, |
| java.lang.String key) |
| throws javax.servlet.jsp.JspException</PRE> |
| <DL> |
| <DD>Look up and return a message string, based on the specified parameters.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext associated with this request<DD><CODE>bundle</CODE> - Name of the servlet context attribute for our |
| message resources bundle<DD><CODE>locale</CODE> - Name of the session attribute for our user's Locale<DD><CODE>key</CODE> - Message key to be looked up and returned<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if a lookup error occurs (will have been |
| saved in the request already)</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="message(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String, java.lang.Object[])"><!-- --></A><H3> |
| message</H3> |
| <PRE> |
| public static java.lang.String <B>message</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String bundle, |
| java.lang.String locale, |
| java.lang.String key, |
| java.lang.Object[] args) |
| throws javax.servlet.jsp.JspException</PRE> |
| <DL> |
| <DD>Look up and return a message string, based on the specified parameters.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext associated with this request<DD><CODE>bundle</CODE> - Name of the servlet context attribute for our |
| message resources bundle<DD><CODE>locale</CODE> - Name of the session attribute for our user's Locale<DD><CODE>key</CODE> - Message key to be looked up and returned<DD><CODE>args</CODE> - Replacement parameters for this message<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if a lookup error occurs (will have been |
| saved in the request already)</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="populate(java.lang.Object, javax.servlet.http.HttpServletRequest)"><!-- --></A><H3> |
| populate</H3> |
| <PRE> |
| public static void <B>populate</B>(java.lang.Object bean, |
| javax.servlet.http.HttpServletRequest request) |
| throws javax.servlet.ServletException</PRE> |
| <DL> |
| <DD>Populate the properties of the specified JavaBean from the specified |
| HTTP request, based on matching each parameter name against the |
| corresponding JavaBeans "property setter" methods in the bean's class. |
| Suitable conversion is done for argument types as described under |
| <code>convert()</code>.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>bean</CODE> - The JavaBean whose properties are to be set<DD><CODE>request</CODE> - The HTTP request whose parameters are to be used |
| to populate bean properties<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if an exception is thrown while setting |
| property values</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="populate(java.lang.Object, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)"><!-- --></A><H3> |
| populate</H3> |
| <PRE> |
| public static void <B>populate</B>(java.lang.Object bean, |
| java.lang.String prefix, |
| java.lang.String suffix, |
| javax.servlet.http.HttpServletRequest request) |
| throws javax.servlet.ServletException</PRE> |
| <DL> |
| <DD>Populate the properties of the specified JavaBean from the specified |
| HTTP request, based on matching each parameter name (plus an optional |
| prefix and/or suffix) against the corresponding JavaBeans "property |
| setter" methods in the bean's class. Suitable conversion is done for |
| argument types as described under <code>setProperties()</code>. |
| <p> |
| If you specify a non-null <code>prefix</code> and a non-null |
| <code>suffix</code>, the parameter name must match <strong>both</strong> |
| conditions for its value(s) to be used in populating bean properties. |
| If the request's content type is "multipart/form-data" and the |
| method is "POST", the HttpServletRequest object will be wrapped in |
| a MultipartRequestWrapper object.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>bean</CODE> - The JavaBean whose properties are to be set<DD><CODE>prefix</CODE> - The prefix (if any) to be prepend to bean property |
| names when looking for matching parameters<DD><CODE>suffix</CODE> - The suffix (if any) to be appended to bean property |
| names when looking for matching parameters<DD><CODE>request</CODE> - The HTTP request whose parameters are to be used |
| to populate bean properties<DT><B>Throws:</B><DD><CODE>javax.servlet.ServletException</CODE> - if an exception is thrown while setting |
| property values</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="present(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> |
| present</H3> |
| <PRE> |
| public static boolean <B>present</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.String bundle, |
| java.lang.String locale, |
| java.lang.String key) |
| throws javax.servlet.jsp.JspException</PRE> |
| <DL> |
| <DD>Return true if a message string for the specified message key |
| is present for the specified Locale.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext associated with this request<DD><CODE>bundle</CODE> - Name of the servlet context attribute for our |
| message resources bundle<DD><CODE>locale</CODE> - Name of the session attribute for our user's Locale<DD><CODE>key</CODE> - Message key to be looked up and returned<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if a lookup error occurs (will have been |
| saved in the request already)</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="printableURL(java.net.URL)"><!-- --></A><H3> |
| printableURL</H3> |
| <PRE> |
| public static java.lang.String <B>printableURL</B>(java.net.URL url)</PRE> |
| <DL> |
| <DD>Compute the printable representation of a URL, leaving off the |
| scheme/host/port part if no host is specified. This will typically |
| be the case for URLs that were originally created from relative |
| or context-relative URIs.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>url</CODE> - URL to render in a printable representation</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="requestURL(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3> |
| requestURL</H3> |
| <PRE> |
| public static java.net.URL <B>requestURL</B>(javax.servlet.http.HttpServletRequest request) |
| throws java.net.MalformedURLException</PRE> |
| <DL> |
| <DD>Return the URL representing the current request. This is equivalent |
| to <code>HttpServletRequest.getRequestURL()</code> in Servlet 2.3.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if a URL cannot be created</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="serverURL(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3> |
| serverURL</H3> |
| <PRE> |
| public static java.net.URL <B>serverURL</B>(javax.servlet.http.HttpServletRequest request) |
| throws java.net.MalformedURLException</PRE> |
| <DL> |
| <DD>Return the URL representing the scheme, server, and port number of |
| the current request. Server-relative URLs can be created by simply |
| appending the server-relative path (starting with '/') to this.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DT><B>Throws:</B><DD><CODE>java.net.MalformedURLException</CODE> - if a URL cannot be created</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="saveException(javax.servlet.jsp.PageContext, java.lang.Throwable)"><!-- --></A><H3> |
| saveException</H3> |
| <PRE> |
| public static void <B>saveException</B>(javax.servlet.jsp.PageContext pageContext, |
| java.lang.Throwable exception)</PRE> |
| <DL> |
| <DD>Save the specified exception as a request attribute for later use.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext for the current page<DD><CODE>exception</CODE> - The exception to be saved</DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/struts/util/PropertyUtils.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/struts/util/ResponseUtils.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="RequestUtils.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2000-2001 - Apache Software Foundation |
| </BODY> |
| </HTML> |