📄 tagutils.html
字号:
<A NAME="getModuleConfig(javax.servlet.jsp.PageContext)"><!-- --></A><H3>
getModuleConfig</H3>
<PRE>
public <A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A> <B>getModuleConfig</B>(javax.servlet.jsp.PageContext pageContext)</PRE>
<DL>
<DD>Return the ModuleConfig object if it exists, null if otherwise.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The page context.<DT><B>Returns:</B><DD>the ModuleConfig object</DL>
</DD>
</DL>
<HR>
<A NAME="getModuleConfig(java.lang.String, javax.servlet.jsp.PageContext)"><!-- --></A><H3>
getModuleConfig</H3>
<PRE>
public <A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A> <B>getModuleConfig</B>(java.lang.String module, javax.servlet.jsp.PageContext pageContext)</PRE>
<DL>
<DD>Return the ModuleConfig object for the given prefix if it exists, null if otherwise.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>module</CODE> - The module prefix<DD><CODE>pageContext</CODE> - The page context.<DT><B>Returns:</B><DD>the ModuleConfig object</DL>
</DD>
</DL>
<HR>
<A NAME="getScope(java.lang.String)"><!-- --></A><H3>
getScope</H3>
<PRE>
public int <B>getScope</B>(java.lang.String scopeName) throws javax.servlet.jsp.JspException</PRE>
<DL>
<DD>Converts the scope name into its corresponding PageContext constant value.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>scopeName</CODE> - Can be "page", "request", "session", or "application" in any case.<DT><B>Returns:</B><DD>The constant representing the scope (ie. PageContext.REQUEST_SCOPE).<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if the scopeName is not a valid name.</DL>
</DD>
</DL>
<HR>
<A NAME="getUserLocale(javax.servlet.jsp.PageContext, java.lang.String)"><!-- --></A><H3>
getUserLocale</H3>
<PRE>
public java.util.Locale <B>getUserLocale</B>(javax.servlet.jsp.PageContext pageContext, java.lang.String locale)</PRE>
<DL>
<DD>Look up and return current user locale, based on the specified parameters.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext associated with this request<DD><CODE>locale</CODE> - Name of the session attribute for our user's Locale. If this is <code>null</code>, the default locale key is used for the lookup.<DT><B>Returns:</B><DD>current user locale</DL>
</DD>
</DL>
<HR>
<A NAME="isXhtml(javax.servlet.jsp.PageContext)"><!-- --></A><H3>
isXhtml</H3>
<PRE>
public boolean <B>isXhtml</B>(javax.servlet.jsp.PageContext pageContext)</PRE>
<DL>
<DD>Returns true if the custom tags are in XHTML mode.</DL>
<HR>
<A NAME="lookup(javax.servlet.jsp.PageContext, java.lang.String, java.lang.String)"><!-- --></A><H3>
lookup</H3>
<PRE>
public java.lang.Object <B>lookup</B>(javax.servlet.jsp.PageContext pageContext, java.lang.String name, java.lang.String scopeName) 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>scopeName</CODE> - Scope to be searched (page, request, session, application) or <code>null</code> to use <code>findAttribute()</code> instead<DT><B>Returns:</B><DD>JavaBean in the specified page context<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 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>Returns:</B><DD>property of specified JavaBean<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 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>Returns:</B><DD>message string<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 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>Returns:</B><DD>message string<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="pageURL(javax.servlet.http.HttpServletRequest, java.lang.String, org.apache.struts.config.ModuleConfig)"><!-- --></A><H3>
pageURL</H3>
<PRE>
public java.lang.String <B>pageURL</B>(javax.servlet.http.HttpServletRequest request, java.lang.String page, <A HREF="../../../../org/apache/struts/config/ModuleConfig.html">ModuleConfig</A> moduleConfig)</PRE>
<DL>
<DD><p>Return the context-relative URL that corresponds to the specified <code>page</code> attribute value, calculated based on the <code>pagePattern</code> property of the current module's <A HREF="../../../../org/apache/struts/config/ModuleConfig.html"><CODE>ModuleConfig</CODE></A>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - The servlet request we are processing<DD><CODE>page</CODE> - The module-relative URL to be substituted in to the <code>pagePattern</code> pattern for the current module (<strong>MUST</strong> start with a slash)<DT><B>Returns:</B><DD>context-relative URL</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 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>Returns:</B><DD>true if a message string for message key exists<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="retrieveMessageResources(javax.servlet.jsp.PageContext, java.lang.String, boolean)"><!-- --></A><H3>
retrieveMessageResources</H3>
<PRE>
public <A HREF="../../../../org/apache/struts/util/MessageResources.html">MessageResources</A> <B>retrieveMessageResources</B>(javax.servlet.jsp.PageContext pageContext, java.lang.String bundle, boolean checkPageScope) throws javax.servlet.jsp.JspException</PRE>
<DL>
<DD>Returns the appropriate MessageResources object for the current module and the given bundle.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - Search the context's scopes for the resources.<DD><CODE>bundle</CODE> - The bundle name to look for. If this is <code>null</code>, the default bundle name is used.<DT><B>Returns:</B><DD>MessageResources The bundle's resources stored in some scope.<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if the MessageResources object could not be found.</DL>
</DD>
</DL>
<HR>
<A NAME="saveException(javax.servlet.jsp.PageContext, java.lang.Throwable)"><!-- --></A><H3>
saveException</H3>
<PRE>
public 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>
<HR>
<A NAME="write(javax.servlet.jsp.PageContext, java.lang.String)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(javax.servlet.jsp.PageContext pageContext, java.lang.String text) throws javax.servlet.jsp.JspException</PRE>
<DL>
<DD>Write the specified text as the response to the writer associated with this page. <strong>WARNING</strong> - If you are writing body content from the <code>doAfterBody()</code> method of a custom tag class that implements <code>BodyTag</code>, you should be calling <code>writePrevious()</code> instead.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext object for this page<DD><CODE>text</CODE> - The text to be written<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if an input/output error occurs (already saved)</DL>
</DD>
</DL>
<HR>
<A NAME="writePrevious(javax.servlet.jsp.PageContext, java.lang.String)"><!-- --></A><H3>
writePrevious</H3>
<PRE>
public void <B>writePrevious</B>(javax.servlet.jsp.PageContext pageContext, java.lang.String text) throws javax.servlet.jsp.JspException</PRE>
<DL>
<DD>Write the specified text as the response to the writer associated with the body content for the tag within which we are currently nested.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pageContext</CODE> - The PageContext object for this page<DD><CODE>text</CODE> - The text to be written<DT><B>Throws:</B><DD><CODE>javax.servlet.jsp.JspException</CODE> - if an input/output error occurs (already 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="class-use/TagUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="TagUtils.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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -