If the var attribute is set on the BeanTag, it will place the instantiated bean into the
* stack's Context.
- *
+ *
*
- *
- *
+ *
*
*
*
var - the stack's context name (if supplied) that the created bean will be store under
@@ -65,8 +64,8 @@
* </s:bean>
*
*
- *
- *
+ *
+ *
*
*
This example instantiates a bean called SimpleCounter and sets the foo property (setFoo('BAR')). The
* SimpleCounter object is then pushed onto the Valuestack, which means that we can call its accessor methods (getFoo())
@@ -95,7 +94,7 @@ public class Bean extends ContextBean {
protected static final Logger LOG = LogManager.getLogger(Bean.class);
protected Object bean;
- protected String name;
+ private String name;
protected ObjectFactory objectFactory;
protected ReflectionProvider reflectionProvider;
@@ -146,6 +145,15 @@ public void addParameter(String key, Object value) {
reflectionProvider.setProperty(key, value, bean, getStack().getContext());
}
+ /**
+ * Gets the class name of the bean to be instantiated.
+ *
+ * @return the class name
+ */
+ public String getName() {
+ return name;
+ }
+
@StrutsTagAttribute(description = "The class name of the bean to be instantiated (must respect JavaBean specification)", required = true)
public void setName(String name) {
this.name = name;
diff --git a/core/src/main/java/org/apache/struts2/components/Form.java b/core/src/main/java/org/apache/struts2/components/Form.java
index 7db1477c32..46f6b87fa0 100644
--- a/core/src/main/java/org/apache/struts2/components/Form.java
+++ b/core/src/main/java/org/apache/struts2/components/Form.java
@@ -18,11 +18,15 @@
*/
package org.apache.struts2.components;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.ObjectFactory;
import org.apache.struts2.config.Configuration;
import org.apache.struts2.config.RuntimeConfiguration;
import org.apache.struts2.config.entities.ActionConfig;
import org.apache.struts2.config.entities.InterceptorMapping;
+import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.inject.Inject;
import org.apache.struts2.interceptor.MethodFilterInterceptorUtil;
import org.apache.struts2.util.ValueStack;
@@ -33,10 +37,6 @@
import org.apache.struts2.validator.Validator;
import org.apache.struts2.validator.ValidatorContext;
import org.apache.struts2.validator.validators.VisitorFieldValidator;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -90,10 +90,10 @@
*
*/
@StrutsTag(
- name = "form",
- tldTagClass = "org.apache.struts2.views.jsp.ui.FormTag",
- description = "Renders an input form",
- allowDynamicAttributes = true)
+ name = "form",
+ tldTagClass = "org.apache.struts2.views.jsp.ui.FormTag",
+ description = "Renders an input form",
+ allowDynamicAttributes = true)
public class Form extends ClosingUIBean {
public static final String OPEN_TEMPLATE = "form";
public static final String TEMPLATE = "form-close";
@@ -170,7 +170,7 @@ protected void evaluateExtraParams() {
addParameter("validate", findValue(validate, Boolean.class));
}
- if (name == null) {
+ if (getName() == null) {
//make the name the same as the id
String id = (String) getAttributes().get("id");
if (StringUtils.isNotEmpty(id)) {
@@ -223,7 +223,7 @@ protected void evaluateExtraParams() {
*/
@Override
protected void populateComponentHtmlId(Form form) {
- if (id != null) {
+ if (getId() != null) {
super.populateComponentHtmlId(null);
}
@@ -508,7 +508,7 @@ public void setNamespace(String namespace) {
}
@StrutsTagAttribute(description = "Whether client side/remote validation should be performed. Only" +
- " useful with theme xhtml/ajax", type = "Boolean", defaultValue = "false")
+ " useful with theme xhtml/ajax", type = "Boolean", defaultValue = "false")
public void setValidate(String validate) {
this.validate = validate;
}
diff --git a/core/src/main/java/org/apache/struts2/components/FormButton.java b/core/src/main/java/org/apache/struts2/components/FormButton.java
index d46828db51..02ac884f47 100644
--- a/core/src/main/java/org/apache/struts2/components/FormButton.java
+++ b/core/src/main/java/org/apache/struts2/components/FormButton.java
@@ -18,10 +18,10 @@
*/
package org.apache.struts2.components;
-import org.apache.struts2.util.ValueStack;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
/**
@@ -54,7 +54,7 @@ public void evaluateExtraParams() {
addParameter("type", submitType);
- if (!BUTTON_TYPE_INPUT.equals(submitType) && (label == null)) {
+ if (!BUTTON_TYPE_INPUT.equals(submitType) && (getLabel() == null)) {
addParameter("label", getAttributes().get("nameValue"));
}
@@ -94,15 +94,15 @@ public void evaluateExtraParams() {
*/
protected void populateComponentHtmlId(Form form) {
String tmpId = "";
- if (id != null) {
+ if (getId() != null) {
// this check is needed for backwards compatibility with 2.1.x
- tmpId = findString(id);
+ tmpId = findString(getId());
} else {
if (form != null && form.getAttributes().get("id") != null) {
tmpId = tmpId + form.getAttributes().get("id").toString() + "_";
}
- if (name != null) {
- tmpId = tmpId + escape(findString(name));
+ if (getName() != null) {
+ tmpId = tmpId + escape(findString(getName()));
} else if (action != null || method != null) {
if (action != null) {
tmpId = tmpId + escape(findString(action));
@@ -141,7 +141,7 @@ public void setMethod(String method) {
@StrutsTagAttribute(description = "The type of submit to use. Valid values are input, " +
- "button and image.", defaultValue = "input")
+ "button and image.", defaultValue = "input")
public void setType(String type) {
this.type = type;
}
diff --git a/core/src/main/java/org/apache/struts2/components/I18n.java b/core/src/main/java/org/apache/struts2/components/I18n.java
index 64e002a361..1c418d4636 100644
--- a/core/src/main/java/org/apache/struts2/components/I18n.java
+++ b/core/src/main/java/org/apache/struts2/components/I18n.java
@@ -18,38 +18,37 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
-import java.util.ResourceBundle;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.StrutsException;
+import org.apache.struts2.inject.Inject;
+import org.apache.struts2.locale.LocaleProvider;
import org.apache.struts2.locale.LocaleProviderFactory;
import org.apache.struts2.text.LocalizedTextProvider;
+import org.apache.struts2.text.TextProvider;
import org.apache.struts2.text.TextProviderFactory;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.StrutsException;
-import org.apache.struts2.locale.LocaleProvider;
-import org.apache.struts2.text.TextProvider;
-import org.apache.struts2.inject.Inject;
-import org.apache.struts2.util.ValueStack;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import java.io.Writer;
+import java.util.ResourceBundle;
/**
*
- *
+ *
* Gets a resource bundle and place it on the value stack. This allows
* the text tag to access messages from any bundle, and not just the bundle
* associated with the current action.
- *
+ *
*
- *
+ *
*
*
*
*
name* - the resource bundle's name (eg foo/bar/customBundle)
*
- *
+ *
*
*
*
@@ -78,14 +77,14 @@
*
*
*/
-@StrutsTag(name="i18n", tldTagClass="org.apache.struts2.views.jsp.I18nTag", description="Get a resource bundle" +
- " and place it on the value stack")
+@StrutsTag(name = "i18n", tldTagClass = "org.apache.struts2.views.jsp.I18nTag", description = "Get a resource bundle" +
+ " and place it on the value stack")
public class I18n extends Component {
private static final Logger LOG = LogManager.getLogger(I18n.class);
protected boolean pushed;
- protected String name;
+ private String name;
private LocalizedTextProvider localizedTextProvider;
private TextProvider textProvider;
@@ -145,17 +144,26 @@ public boolean end(Writer writer, String body) throws StrutsException {
if (pushed) {
Object o = getStack().pop();
if ((o == null) || (!o.equals(textProvider))) {
- LOG.error("A closing i18n tag attempted to pop its own TextProvider from the top of the ValueStack but popped an unexpected object ("+(o != null ? o.getClass() : "null")+"). " +
- "Refactor the page within the i18n tags to ensure no objects are pushed onto the ValueStack without popping them prior to the closing tag. " +
- "If you see this message it's likely that the i18n's TextProvider is still on the stack and will continue to provide message resources after the closing tag.");
- throw new StrutsException("A closing i18n tag attempted to pop its TextProvider from the top of the ValueStack but popped an unexpected object ("+(o != null ? o.getClass() : "null")+")");
+ LOG.error("A closing i18n tag attempted to pop its own TextProvider from the top of the ValueStack but popped an unexpected object (" + (o != null ? o.getClass() : "null") + "). " +
+ "Refactor the page within the i18n tags to ensure no objects are pushed onto the ValueStack without popping them prior to the closing tag. " +
+ "If you see this message it's likely that the i18n's TextProvider is still on the stack and will continue to provide message resources after the closing tag.");
+ throw new StrutsException("A closing i18n tag attempted to pop its TextProvider from the top of the ValueStack but popped an unexpected object (" + (o != null ? o.getClass() : "null") + ")");
}
}
return super.end(writer, body);
}
- @StrutsTagAttribute(description="Name of resource bundle to use (eg foo/bar/customBundle)", required=true, defaultValue="String")
+ /**
+ * Gets the name of the resource bundle to use.
+ *
+ * @return the resource bundle name
+ */
+ public String getName() {
+ return name;
+ }
+
+ @StrutsTagAttribute(description = "Name of resource bundle to use (eg foo/bar/customBundle)", required = true, defaultValue = "String")
public void setName(String name) {
this.name = name;
}
diff --git a/core/src/main/java/org/apache/struts2/components/Label.java b/core/src/main/java/org/apache/struts2/components/Label.java
index 52ba02ac79..5f813d8867 100644
--- a/core/src/main/java/org/apache/struts2/components/Label.java
+++ b/core/src/main/java/org/apache/struts2/components/Label.java
@@ -18,10 +18,10 @@
*/
package org.apache.struts2.components;
-import org.apache.struts2.util.ValueStack;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.struts2.util.TextProviderHelper;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -32,7 +32,7 @@
*
*
*
Examples
- *
+ *
*
*
In this example, a label is rendered. The label is retrieved from a ResourceBundle via the key attribute
* giving you an output of 'User Name: Ford.Prefect'. Assuming that i18n message userName corresponds
@@ -51,10 +51,10 @@
*
*/
@StrutsTag(
- name="label",
- tldTagClass="org.apache.struts2.views.jsp.ui.LabelTag",
- description="Render a label that displays read-only information",
- allowDynamicAttributes=true)
+ name = "label",
+ tldTagClass = "org.apache.struts2.views.jsp.ui.LabelTag",
+ description = "Render a label that displays read-only information",
+ allowDynamicAttributes = true)
public class Label extends UIBean {
final public static String TEMPLATE = "label";
@@ -76,8 +76,8 @@ protected void evaluateExtraParams() {
}
// try value, then key, then name (this overrides the default behavior in the superclass)
- if (value != null) {
- addParameter("nameValue", findString(value));
+ if (getValue() != null) {
+ addParameter("nameValue", findString(getValue()));
} else if (key != null) {
Object nameValue = attributes.get("nameValue");
if (nameValue == null || nameValue.toString().isEmpty()) {
@@ -85,13 +85,13 @@ protected void evaluateExtraParams() {
String providedLabel = TextProviderHelper.getText(key, key, stack);
addParameter("nameValue", providedLabel);
}
- } else if (name != null) {
- String expr = completeExpression(name);
+ } else if (getName() != null) {
+ String expr = completeExpression(getName());
addParameter("nameValue", findString(expr));
}
}
- @StrutsTagAttribute(description=" HTML for attribute")
+ @StrutsTagAttribute(description = " HTML for attribute")
public void setFor(String forAttr) {
this.forAttr = forAttr;
}
diff --git a/core/src/main/java/org/apache/struts2/components/Param.java b/core/src/main/java/org/apache/struts2/components/Param.java
index 6fcd70a2eb..8c4b336f84 100644
--- a/core/src/main/java/org/apache/struts2/components/Param.java
+++ b/core/src/main/java/org/apache/struts2/components/Param.java
@@ -18,9 +18,9 @@
*/
package org.apache.struts2.components;
-import org.apache.struts2.util.ValueStack;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.StrutsException;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -102,17 +102,16 @@
*
*
*
- *
* @see Include
* @see Bean
* @see Text
*
*/
-@StrutsTag(name="param", tldTagClass="org.apache.struts2.views.jsp.ParamTag", description="Parametrize other tags")
+@StrutsTag(name = "param", tldTagClass = "org.apache.struts2.views.jsp.ParamTag", description = "Parametrize other tags")
public class Param extends Component {
- protected String name;
- protected String value;
+ private String name;
+ private String value;
protected boolean suppressEmptyParameters;
public Param(ValueStack stack) {
@@ -170,17 +169,35 @@ public boolean usesBody() {
return true;
}
- @StrutsTagAttribute(description="Name of Parameter to set")
+ /**
+ * Gets the name of the parameter.
+ *
+ * @return the parameter name
+ */
+ public String getName() {
+ return name;
+ }
+
+ @StrutsTagAttribute(description = "Name of Parameter to set")
public void setName(String name) {
this.name = name;
}
- @StrutsTagAttribute(description="Value expression for Parameter to set", defaultValue="The value of evaluating provided name against stack")
+ /**
+ * Gets the value expression for the parameter.
+ *
+ * @return the value expression
+ */
+ public String getValue() {
+ return value;
+ }
+
+ @StrutsTagAttribute(description = "Value expression for Parameter to set", defaultValue = "The value of evaluating provided name against stack")
public void setValue(String value) {
this.value = value;
}
- @StrutsTagAttribute(description="Whether to suppress empty parameters", type="Boolean", defaultValue="false")
+ @StrutsTagAttribute(description = "Whether to suppress empty parameters", type = "Boolean", defaultValue = "false")
public void setSuppressEmptyParameters(boolean suppressEmptyParameters) {
this.suppressEmptyParameters = suppressEmptyParameters;
}
@@ -198,7 +215,8 @@ public interface UnnamedParametric {
/**
* Adds the given value as a parameter to the outer tag.
- * @param value the value
+ *
+ * @param value the value
*/
void addParameter(Object value);
}
diff --git a/core/src/main/java/org/apache/struts2/components/Reset.java b/core/src/main/java/org/apache/struts2/components/Reset.java
index c1ec34ca2b..dea9c33308 100644
--- a/core/src/main/java/org/apache/struts2/components/Reset.java
+++ b/core/src/main/java/org/apache/struts2/components/Reset.java
@@ -18,13 +18,12 @@
*/
package org.apache.struts2.components;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
/**
*
* Render a reset button. The reset tag is used together with the form tag to provide form resetting.
@@ -54,10 +53,10 @@
*
*/
@StrutsTag(
- name="reset",
- tldTagClass="org.apache.struts2.views.jsp.ui.ResetTag",
- description="Render a reset button",
- allowDynamicAttributes=true)
+ name = "reset",
+ tldTagClass = "org.apache.struts2.views.jsp.ui.ResetTag",
+ description = "Render a reset button",
+ allowDynamicAttributes = true)
public class Reset extends FormButton {
final public static String TEMPLATE = "reset";
@@ -82,8 +81,8 @@ public void evaluateExtraParams() {
}
public void evaluateParams() {
- if (value == null) {
- value = (key != null ? "%{getText('"+key+"')}" : "Reset");
+ if (getValue() == null) {
+ setValue(key != null ? "%{getText('" + key + "')}" : "Reset");
}
super.evaluateParams();
}
@@ -97,13 +96,13 @@ protected boolean supportsImageType() {
return false;
}
- @StrutsTagAttribute(description="Supply a reset button text apart from reset value. Will have no effect for " +
- "input type reset, since button text will always be the value parameter.")
+ @StrutsTagAttribute(description = "Supply a reset button text apart from reset value. Will have no effect for " +
+ "input type reset, since button text will always be the value parameter.")
public void setLabel(String label) {
super.setLabel(label);
}
- @StrutsTagAttribute(description="Supply an image src for image type reset button. Will have no effect for types input and button.")
+ @StrutsTagAttribute(description = "Supply an image src for image type reset button. Will have no effect for types input and button.")
public void setSrc(String src) {
this.src = src;
}
diff --git a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
index c6bfec306b..37928a41a4 100644
--- a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
+++ b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
@@ -18,19 +18,19 @@
*/
package org.apache.struts2.components;
-import org.apache.struts2.ActionContext;
-import org.apache.struts2.ActionInvocation;
-import org.apache.struts2.config.entities.ActionConfig;
-import org.apache.struts2.inject.Inject;
-import org.apache.struts2.util.ValueStack;
import jakarta.servlet.RequestDispatcher;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+import org.apache.struts2.ActionContext;
+import org.apache.struts2.ActionInvocation;
import org.apache.struts2.StrutsException;
+import org.apache.struts2.config.entities.ActionConfig;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
+import org.apache.struts2.inject.Inject;
import org.apache.struts2.url.QueryStringParser;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.util.UrlHelper;
import java.io.IOException;
@@ -172,12 +172,12 @@ public void renderFormUrl(Form formComponent) {
String actionMethod = nameMapping.getMethod();
final ActionConfig actionConfig = formComponent.configuration.getRuntimeConfiguration().getActionConfig(
- namespace, actionName);
+ namespace, actionName);
if (actionConfig != null) {
ActionMapping mapping = new ActionMapping(actionName, namespace, actionMethod, formComponent.attributes);
String result = urlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping),
- formComponent.request, formComponent.response, queryStringResult.getQueryParams(), scheme, formComponent.includeContext, true, false, false);
+ formComponent.request, formComponent.response, queryStringResult.getQueryParams(), scheme, formComponent.includeContext, true, false, false);
formComponent.addParameter("action", result);
// let's try to get the actual action class and name
@@ -193,7 +193,7 @@ public void renderFormUrl(Form formComponent) {
formComponent.addParameter("namespace", namespace);
// if the name isn't specified, use the action name
- if (formComponent.name == null) {
+ if (formComponent.getName() == null) {
formComponent.addParameter("name", actionName);
}
diff --git a/core/src/main/java/org/apache/struts2/components/Submit.java b/core/src/main/java/org/apache/struts2/components/Submit.java
index 47024e99c9..14f607df42 100644
--- a/core/src/main/java/org/apache/struts2/components/Submit.java
+++ b/core/src/main/java/org/apache/struts2/components/Submit.java
@@ -18,17 +18,15 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
-
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.util.ValueStack;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
+import java.io.Writer;
/**
*
@@ -44,10 +42,10 @@
*
*/
@StrutsTag(
- name="submit",
- tldTagClass="org.apache.struts2.views.jsp.ui.SubmitTag",
- description="Render a submit button",
- allowDynamicAttributes=true)
+ name = "submit",
+ tldTagClass = "org.apache.struts2.views.jsp.ui.SubmitTag",
+ description = "Render a submit button",
+ allowDynamicAttributes = true)
public class Submit extends FormButton {
private static final Logger LOG = LogManager.getLogger(Submit.class);
@@ -68,12 +66,12 @@ protected String getDefaultTemplate() {
}
public void evaluateParams() {
- if ((key == null) && (value == null)) {
- value = "Submit";
+ if ((key == null) && (getValue() == null)) {
+ setValue("Submit");
}
- if ((key != null) && (value == null)) {
- this.value = "%{getText('"+key +"')}";
+ if ((key != null) && (getValue() == null)) {
+ setValue("%{getText('" + key + "')}");
}
super.evaluateParams();
@@ -98,7 +96,7 @@ protected boolean supportsImageType() {
return true;
}
- @StrutsTagAttribute(description="Supply an image src for image type submit button. Will have no effect for types input and button.")
+ @StrutsTagAttribute(description = "Supply an image src for image type submit button. Will have no effect for types input and button.")
public void setSrc(String src) {
this.src = src;
}
@@ -124,8 +122,7 @@ public boolean end(Writer writer, String body) {
mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate()));
} catch (Exception e) {
LOG.error("error when rendering", e);
- }
- finally {
+ } finally {
popComponentStack();
}
diff --git a/core/src/main/java/org/apache/struts2/components/Text.java b/core/src/main/java/org/apache/struts2/components/Text.java
index 4f9ea316d6..5d1f69a354 100644
--- a/core/src/main/java/org/apache/struts2/components/Text.java
+++ b/core/src/main/java/org/apache/struts2/components/Text.java
@@ -18,12 +18,12 @@
*/
package org.apache.struts2.components;
-import org.apache.struts2.util.ValueStack;
-import org.apache.commons.text.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.text.StringEscapeUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.util.TextProviderHelper;
+import org.apache.struts2.util.ValueStack;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -59,7 +59,7 @@
* action context (action scope).
*
*
- *
+ *
*
*
*
@@ -69,13 +69,13 @@
*
escapeXml (Boolean) - Escape XML. Defaults to false
*
escapeCsv (Boolean) - Escape CSV. Defaults to false
*
- *
+ *
*
*
*
* Example:
*
- *
+ *
*
*
Accessing messages from a given bundle (the i18n Shop example bundle in the first example) and using bundle defined through the framework in the second example.
*
@@ -118,16 +118,16 @@
*
*/
@StrutsTag(
- name="text",
- tldTagClass="org.apache.struts2.views.jsp.TextTag",
- description="Render a I18n text message")
+ name = "text",
+ tldTagClass = "org.apache.struts2.views.jsp.TextTag",
+ description = "Render a I18n text message")
public class Text extends ContextBean implements Param.UnnamedParametric {
private static final Logger LOG = LogManager.getLogger(Text.class);
protected List