blob: b2850c91fd59db5b56b580bfe136b672b060fd9c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_14) on Mon Apr 26 10:16:14 PDT 2010 -->
<TITLE>
StrutsUtils (VelocityTools 2.0 Documentation)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.velocity.tools.struts.StrutsUtils class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="StrutsUtils (VelocityTools 2.0 Documentation)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/struts/StrutsLinkTool.html" title="class in org.apache.velocity.tools.struts"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/struts/TilesTool.html" title="class in org.apache.velocity.tools.struts"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/velocity/tools/struts/StrutsUtils.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="StrutsUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.velocity.tools.struts</FONT>
<BR>
Class StrutsUtils</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.velocity.tools.struts.StrutsUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>StrutsUtils</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
<p>A utility class to expose the Struts shared
resources. All methods are static.</p>
<p>This class is provided for use by Velocity view tools
that need access to Struts resources. By having all Struts-
specific code in this utility class, maintenance is simplified
and reuse fostered.</p>
<p>It is the aim, that sooner or later the functionality in
this class is integrated into Struts itself. See
<a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16814">Bug #16814</a>
for more on that.</p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: StrutsUtils.java 670093 2008-06-20 23:10:11Z nbubna $</DD>
<DT><B>Author:</B></DT>
<DD><a href="mailto:marinoj@centrum.is">Marino A. Jonsson</a>, Nathan Bubna, <a href="mailto:sidler@teamup.com">Gabe Sidler</a>
based on code by <a href="mailto:ted@husted.org">Ted Husted</a></DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html" title="class in org.apache.velocity.tools.struts">StrutsUtils</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#INSTANCE">INSTANCE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#StrutsUtils()">StrutsUtils</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#errorMarkup(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession, javax.servlet.ServletContext)">errorMarkup</A></B>(java.lang.String&nbsp;property,
javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session,
javax.servlet.ServletContext&nbsp;application)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a formatted error message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#errorMarkup(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession, javax.servlet.ServletContext)">errorMarkup</A></B>(java.lang.String&nbsp;property,
java.lang.String&nbsp;bundle,
javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session,
javax.servlet.ServletContext&nbsp;application)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a formatted error message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.apache.struts.action.ActionForm</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getActionForm(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)">getActionForm</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>ActionForm</code> bean associated with
this request of <code>null</code> if none exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getActionFormName(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)">getActionFormName</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the ActionForm name associated with
this request of <code>null</code> if none exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getActionMappingName(java.lang.String)">getActionMappingName</A></B>(java.lang.String&nbsp;action)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the form action converted into an action mapping path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getActionMappingURL(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, java.lang.String)">getActionMappingURL</A></B>(javax.servlet.ServletContext&nbsp;application,
javax.servlet.http.HttpServletRequest&nbsp;request,
java.lang.String&nbsp;action)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the form action converted into a server-relative URI
reference.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.apache.struts.action.ActionMessages</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getErrors(javax.servlet.http.HttpServletRequest)">getErrors</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Struts errors for this request or <code>null</code>
if none exist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getForwardURL(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext, java.lang.String)">getForwardURL</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.ServletContext&nbsp;app,
java.lang.String&nbsp;forward)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the action forward name converted into a server-relative URI
reference.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html" title="class in org.apache.velocity.tools.struts">StrutsUtils</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getInstance()">getInstance</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.Locale</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getLocale(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)">getLocale</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>java.util.Locale</code> for the user.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.apache.struts.util.MessageResources</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getMessageResources(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext)">getMessageResources</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.ServletContext&nbsp;app)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the message resources for this application or <code>null</code>
if not found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.apache.struts.util.MessageResources</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getMessageResources(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext, java.lang.String)">getMessageResources</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.ServletContext&nbsp;app,
java.lang.String&nbsp;bundle)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the message resources with the specified bundle name for this application
or <code>null</code> if not found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.apache.struts.action.ActionMessages</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getMessages(javax.servlet.http.HttpServletRequest)">getMessages</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Struts messages for this request or <code>null</code>
if none exist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#getToken(javax.servlet.http.HttpSession)">getToken</A></B>(javax.servlet.http.HttpSession&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the transaction token stored in this session or
<code>null</code> if not used.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.apache.struts.config.ModuleConfig</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html#selectModule(java.lang.String, javax.servlet.ServletContext)">selectModule</A></B>(java.lang.String&nbsp;urlPath,
javax.servlet.ServletContext&nbsp;app)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Select the module to which the specified request belongs, and
add return the corresponding ModuleConfig.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="INSTANCE"><!-- --></A><H3>
INSTANCE</H3>
<PRE>
public static final <A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html" title="class in org.apache.velocity.tools.struts">StrutsUtils</A> <B>INSTANCE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="StrutsUtils()"><!-- --></A><H3>
StrutsUtils</H3>
<PRE>
private <B>StrutsUtils</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getInstance()"><!-- --></A><H3>
getInstance</H3>
<PRE>
public <A HREF="../../../../../org/apache/velocity/tools/struts/StrutsUtils.html" title="class in org.apache.velocity.tools.struts">StrutsUtils</A> <B>getInstance</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMessageResources(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext)"><!-- --></A><H3>
getMessageResources</H3>
<PRE>
public static org.apache.struts.util.MessageResources <B>getMessageResources</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.ServletContext&nbsp;app)</PRE>
<DL>
<DD>Returns the message resources for this application or <code>null</code>
if not found.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>app</CODE> - the servlet context<DT><B>Since:</B></DT>
<DD>VelocityTools 1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMessageResources(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext, java.lang.String)"><!-- --></A><H3>
getMessageResources</H3>
<PRE>
public static org.apache.struts.util.MessageResources <B>getMessageResources</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.ServletContext&nbsp;app,
java.lang.String&nbsp;bundle)</PRE>
<DL>
<DD>Returns the message resources with the specified bundle name for this application
or <code>null</code> if not found.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>app</CODE> - the servlet context<DD><CODE>bundle</CODE> - The bundle name to look for. If this is <code>null</code>, the
default bundle name is used.<DT><B>Since:</B></DT>
<DD>VelocityTools 1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="selectModule(java.lang.String, javax.servlet.ServletContext)"><!-- --></A><H3>
selectModule</H3>
<PRE>
public static org.apache.struts.config.ModuleConfig <B>selectModule</B>(java.lang.String&nbsp;urlPath,
javax.servlet.ServletContext&nbsp;app)</PRE>
<DL>
<DD>Select the module to which the specified request belongs, and
add return the corresponding ModuleConfig.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>urlPath</CODE> - The requested URL<DD><CODE>app</CODE> - The ServletContext for this web application
<DT><B>Returns:</B><DD>The ModuleConfig for the given URL path<DT><B>Since:</B></DT>
<DD>VelocityTools 1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getLocale(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)"><!-- --></A><H3>
getLocale</H3>
<PRE>
public static java.util.Locale <B>getLocale</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session)</PRE>
<DL>
<DD>Returns the <code>java.util.Locale</code> for the user. If a
locale object is not found in the user's session, the system
default locale is returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the servlet request<DD><CODE>session</CODE> - the HTTP session</DL>
</DD>
</DL>
<HR>
<A NAME="getToken(javax.servlet.http.HttpSession)"><!-- --></A><H3>
getToken</H3>
<PRE>
public static java.lang.String <B>getToken</B>(javax.servlet.http.HttpSession&nbsp;session)</PRE>
<DL>
<DD>Returns the transaction token stored in this session or
<code>null</code> if not used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the HTTP session</DL>
</DD>
</DL>
<HR>
<A NAME="getErrors(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
getErrors</H3>
<PRE>
public static org.apache.struts.action.ActionMessages <B>getErrors</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>
<DL>
<DD>Returns the Struts errors for this request or <code>null</code>
if none exist. Since VelocityTools 1.2, this will also check
the session (if there is one) for errors if there are no errors
in the request.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the servlet request<DT><B>Since:</B></DT>
<DD>VelocityTools 1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMessages(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>
getMessages</H3>
<PRE>
public static org.apache.struts.action.ActionMessages <B>getMessages</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>
<DL>
<DD>Returns the Struts messages for this request or <code>null</code>
if none exist. Since VelocityTools 1.2, this will also check
the session (if there is one) for messages if there are no messages
in the request.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the servlet request<DT><B>Since:</B></DT>
<DD>VelocityTools 1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getActionForm(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)"><!-- --></A><H3>
getActionForm</H3>
<PRE>
public static org.apache.struts.action.ActionForm <B>getActionForm</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session)</PRE>
<DL>
<DD>Returns the <code>ActionForm</code> bean associated with
this request of <code>null</code> if none exists.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the servlet request<DD><CODE>session</CODE> - the HTTP session</DL>
</DD>
</DL>
<HR>
<A NAME="getActionFormName(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession)"><!-- --></A><H3>
getActionFormName</H3>
<PRE>
public static java.lang.String <B>getActionFormName</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session)</PRE>
<DL>
<DD>Returns the ActionForm name associated with
this request of <code>null</code> if none exists.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>request</CODE> - the servlet request<DD><CODE>session</CODE> - the HTTP session</DL>
</DD>
</DL>
<HR>
<A NAME="getActionMappingName(java.lang.String)"><!-- --></A><H3>
getActionMappingName</H3>
<PRE>
public static java.lang.String <B>getActionMappingName</B>(java.lang.String&nbsp;action)</PRE>
<DL>
<DD>Return the form action converted into an action mapping path. The
value of the <code>action</code> property is manipulated as follows in
computing the name of the requested mapping:
<ul>
<li>Any filename extension is removed (on the theory that extension
mapping is being used to select the controller servlet).</li>
<li>If the resulting value does not start with a slash, then a
slash is prepended.</li>
</ul>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getActionMappingURL(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, java.lang.String)"><!-- --></A><H3>
getActionMappingURL</H3>
<PRE>
public static java.lang.String <B>getActionMappingURL</B>(javax.servlet.ServletContext&nbsp;application,
javax.servlet.http.HttpServletRequest&nbsp;request,
java.lang.String&nbsp;action)</PRE>
<DL>
<DD>Returns the form action converted into a server-relative URI
reference.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>application</CODE> - the servlet context<DD><CODE>request</CODE> - the servlet request<DD><CODE>action</CODE> - the name of an action as per struts-config.xml</DL>
</DD>
</DL>
<HR>
<A NAME="getForwardURL(javax.servlet.http.HttpServletRequest, javax.servlet.ServletContext, java.lang.String)"><!-- --></A><H3>
getForwardURL</H3>
<PRE>
public static java.lang.String <B>getForwardURL</B>(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.ServletContext&nbsp;app,
java.lang.String&nbsp;forward)</PRE>
<DL>
<DD>Returns the action forward name converted into a server-relative URI
reference.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>app</CODE> - the servlet context<DD><CODE>request</CODE> - the servlet request<DD><CODE>forward</CODE> - the name of a forward as per struts-config.xml</DL>
</DD>
</DL>
<HR>
<A NAME="errorMarkup(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession, javax.servlet.ServletContext)"><!-- --></A><H3>
errorMarkup</H3>
<PRE>
public static java.lang.String <B>errorMarkup</B>(java.lang.String&nbsp;property,
javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session,
javax.servlet.ServletContext&nbsp;application)</PRE>
<DL>
<DD>Returns a formatted error message. The error message is assembled from
the following three pieces: First, value of message resource
"errors.header" is prepended. Then, the list of error messages is
rendered. Finally, the value of message resource "errors.footer"
is appended.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>property</CODE> - the category of errors to markup and return<DD><CODE>request</CODE> - the servlet request<DD><CODE>session</CODE> - the HTTP session<DD><CODE>application</CODE> - the servlet context
<DT><B>Returns:</B><DD>The formatted error message. If no error messages are queued,
an empty string is returned.</DL>
</DD>
</DL>
<HR>
<A NAME="errorMarkup(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpSession, javax.servlet.ServletContext)"><!-- --></A><H3>
errorMarkup</H3>
<PRE>
public static java.lang.String <B>errorMarkup</B>(java.lang.String&nbsp;property,
java.lang.String&nbsp;bundle,
javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpSession&nbsp;session,
javax.servlet.ServletContext&nbsp;application)</PRE>
<DL>
<DD>Returns a formatted error message. The error message is assembled from
the following three pieces: First, value of message resource
"errors.header" is prepended. Then, the list of error messages is
rendered. Finally, the value of message resource "errors.footer"
is appended.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>property</CODE> - the category of errors to markup and return<DD><CODE>bundle</CODE> - the message resource bundle to use<DD><CODE>request</CODE> - the servlet request<DD><CODE>session</CODE> - the HTTP session<DD><CODE>application</CODE> - the servlet context
<DT><B>Returns:</B><DD>The formatted error message. If no error messages are queued,
an empty string is returned.<DT><B>Since:</B></DT>
<DD>VelocityTools 1.1</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/struts/StrutsLinkTool.html" title="class in org.apache.velocity.tools.struts"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/struts/TilesTool.html" title="class in org.apache.velocity.tools.struts"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/velocity/tools/struts/StrutsUtils.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="StrutsUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright (c) 2003-2007 Apache Software Foundation
</BODY>
</HTML>