org.apache.struts.taglib
Class MessageTag

org.apache.struts.taglib.MessageTag

public final class MessageTag

Custom tag that retrieves an internationalized messages string (with optional parametric replacement) from the ActionResources object stored as a context attribute by our associated ActionServlet implementation.

Version:
$Revision: 1.7 $ $Date: 2000/08/23 01:17:02 $
Author:
Craig R. McClanahan

Field Summary
private  java.lang.String arg0
          The first optional argument.
private  java.lang.String arg1
          The second optional argument.
private  java.lang.String arg2
          The third optional argument.
private  java.lang.String arg3
          The fourth optional argument.
private  java.lang.String arg4
          The fifth optional argument.
private  java.lang.String bundle
          The servlet context attribute key for our resources.
private static java.util.Locale defaultLocale
          The default Locale for our server.
private  java.lang.String key
          The message key of the message to be retrieved.
private  java.lang.String localeKey
          The session scope key under which our Locale is stored.
private static MessageResources messages
          The message resources for this package.
 
Constructor Summary
MessageTag()
          Construct a new instance of this tag.
 
Method Summary
 int doStartTag()
          Process the start tag.
 java.lang.String getArg0()
          Return the first optional argument.
 java.lang.String getArg1()
          Return the second optional argument.
 java.lang.String getArg2()
          Return the third optional argument.
 java.lang.String getArg3()
          Return the fourth optional argument.
 java.lang.String getArg4()
          Return the fifth optional argument.
 java.lang.String getBundle()
          Return the bundle key.
 java.lang.String getKey()
          Return the message key.
 java.lang.String getLocale()
          Return the locale key.
 void release()
          Release any acquired resources.
 void setArg0(java.lang.String arg0)
          Set the first optional argument.
 void setArg1(java.lang.String arg1)
          Set the second optional argument.
 void setArg2(java.lang.String arg2)
          Set the third optional argument.
 void setArg3(java.lang.String arg3)
          Set the fourth optional argument.
 void setArg4(java.lang.String arg4)
          Set the fifth optional argument.
 void setBundle(java.lang.String bundle)
          Set the bundle key.
 void setKey(java.lang.String key)
          Set the message key.
 void setLocale(java.lang.String locale)
          Set the locale key.
 

Field Detail

arg0

private java.lang.String arg0
The first optional argument.

arg1

private java.lang.String arg1
The second optional argument.

arg2

private java.lang.String arg2
The third optional argument.

arg3

private java.lang.String arg3
The fourth optional argument.

arg4

private java.lang.String arg4
The fifth optional argument.

bundle

private java.lang.String bundle
The servlet context attribute key for our resources.

defaultLocale

private static final java.util.Locale defaultLocale
The default Locale for our server.

key

private java.lang.String key
The message key of the message to be retrieved.

localeKey

private java.lang.String localeKey
The session scope key under which our Locale is stored.

messages

private static MessageResources messages
The message resources for this package.
Constructor Detail

MessageTag

public MessageTag()
Construct a new instance of this tag.
Method Detail

getArg0

public java.lang.String getArg0()
Return the first optional argument.

setArg0

public void setArg0(java.lang.String arg0)
Set the first optional argument.
Parameters:
arg0 - The new optional argument

getArg1

public java.lang.String getArg1()
Return the second optional argument.

setArg1

public void setArg1(java.lang.String arg1)
Set the second optional argument.
Parameters:
arg1 - The new optional argument

getArg2

public java.lang.String getArg2()
Return the third optional argument.

setArg2

public void setArg2(java.lang.String arg2)
Set the third optional argument.
Parameters:
arg2 - The new optional argument

getArg3

public java.lang.String getArg3()
Return the fourth optional argument.

setArg3

public void setArg3(java.lang.String arg3)
Set the fourth optional argument.
Parameters:
arg3 - The new optional argument

getArg4

public java.lang.String getArg4()
Return the fifth optional argument.

setArg4

public void setArg4(java.lang.String arg4)
Set the fifth optional argument.
Parameters:
arg4 - The new optional argument

getBundle

public java.lang.String getBundle()
Return the bundle key.

setBundle

public void setBundle(java.lang.String bundle)
Set the bundle key.
Parameters:
bundle - The new bundle key.

getKey

public java.lang.String getKey()
Return the message key.

setKey

public void setKey(java.lang.String key)
Set the message key.
Parameters:
key - The new message key

getLocale

public java.lang.String getLocale()
Return the locale key.

setLocale

public void setLocale(java.lang.String locale)
Set the locale key.
Parameters:
locale - The new locale key

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Process the start tag.
Throws:
JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.


Copyright © 2000-2002 - Apache Software Foundation