Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1BB6E200D45 for ; Thu, 23 Nov 2017 17:37:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 17A49160BFE; Thu, 23 Nov 2017 16:37:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5F226160BED for ; Thu, 23 Nov 2017 17:37:08 +0100 (CET) Received: (qmail 46741 invoked by uid 500); 23 Nov 2017 16:37:07 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 46728 invoked by uid 99); 23 Nov 2017 16:37:07 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2017 16:37:07 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D4BD1854C1; Thu, 23 Nov 2017 16:37:06 +0000 (UTC) Date: Thu, 23 Nov 2017 16:37:06 +0000 To: "commits@struts.apache.org" Subject: [struts-site] branch asf-site updated: Updates production by Jenkins MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151145502680.26186.18302669232229246760@gitbox.apache.org> From: git-site-role@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: struts-site X-Git-Refname: refs/heads/asf-site X-Git-Reftype: branch X-Git-Oldrev: 4a36d96bf1a2031816947bbc124795152529f1be X-Git-Newrev: aaff75925b88b019baf578c3040155589336c983 X-Git-Rev: aaff75925b88b019baf578c3040155589336c983 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Thu, 23 Nov 2017 16:37:10 -0000 This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/asf-site by this push: new aaff759 Updates production by Jenkins aaff759 is described below commit aaff75925b88b019baf578c3040155589336c983 Author: jenkins AuthorDate: Thu Nov 23 16:37:05 2017 +0000 Updates production by Jenkins --- content/core-developers/basic-validation.html | 12 +-- .../core-developers/client-side-validation.html | 29 +------ content/core-developers/client-validation.html | 21 +---- .../configuration-provider-and-configuration.html | 7 +- content/core-developers/file-upload.html | 70 +++------------- content/core-developers/freemarker-support.html | 21 +---- content/core-developers/jboss-5.html | 7 +- content/core-developers/model-driven.html | 24 +----- content/core-developers/namespace-annotation.html | 12 +-- content/core-developers/object-factory.html | 14 +--- .../core-developers/parent-package-annotation.html | 7 +- .../pure-java-script-client-side-validation.html | 7 +- content/core-developers/restful-action-mapper.html | 7 +- content/core-developers/result-annotation.html | 77 ++--------------- content/core-developers/weblogic-6-1.html | 35 ++------ content/core-developers/weblogic.html | 48 +++-------- content/core-developers/zero-configuration.html | 21 +---- content/tag-developers/form-tags.html | 96 ++-------------------- content/tag-developers/tag-syntax.html | 59 ++----------- content/tag-developers/velocity.html | 7 +- 20 files changed, 78 insertions(+), 503 deletions(-) diff --git a/content/core-developers/basic-validation.html b/content/core-developers/basic-validation.html index 8a90e65..8606999 100644 --- a/content/core-developers/basic-validation.html +++ b/content/core-developers/basic-validation.html @@ -215,17 +215,7 @@

Step 3

-

Create the validators. The

- -
validation.xml
-
-
-

format is either

- -
<ActionClassName>-validation.xml
-
-
-

or

+

Create the validators. The validation.xml format is either <ActionClassName>-validation.xml or

<ActionClassName>-<ActionAliasName>-validation.xml
 
diff --git a/content/core-developers/client-side-validation.html b/content/core-developers/client-side-validation.html index 11e5cd7..eb567b6 100644 --- a/content/core-developers/client-side-validation.html +++ b/content/core-developers/client-side-validation.html @@ -130,12 +130,7 @@

The framework adds support for client-side validation on top of the standard validation framework.

-

Client-side validation can be enabled on a per-form basis by specifying

- -
validate="true"
-
-
-

in the form tag.

+

Client-side validation can be enabled on a per-form basis by specifying validate="true" in the form tag.

<s:form name="test" action="javascriptValidation" validate="true">
   ...
@@ -144,27 +139,7 @@
 
-

If a

- -
name
-
-
-

for the form is not given, the action mapping name will be used as the form name. Otherwise, a correct

- -
action
-
-
-

and

- -
namespace
-
-
-

attributes must be provided to the

- -
<saf:form>
-
-
-

tag.

+

If a name for the form is not given, the action mapping name will be used as the form name. Otherwise, a correct action and namespace attributes must be provided to the <saf:form> tag.

Referencing “submitProfile” in the “/user” namespace

diff --git a/content/core-developers/client-validation.html b/content/core-developers/client-validation.html index aa26066..bf4a2b6 100644 --- a/content/core-developers/client-validation.html +++ b/content/core-developers/client-validation.html @@ -130,12 +130,7 @@

Let’s create a Client-Side validation workflow, step by step.

-

(information) The

- -
validate
-
-
-

attribute is set to

+

(information) The validate attribute is set to

true
 
@@ -182,12 +177,7 @@
-

(information) This case uses the default xhtml theme, so the

- -
<s:head >
-
-
-

tag is used to link a style sheet.

+

(information) This case uses the default xhtml theme, so the <s:head > tag is used to link a style sheet.

Step 2

@@ -233,12 +223,7 @@

Step 3

-

Create the

- -
validation.xml
-
-
-

to configure the validators to be used.

+

Create the validation.xml to configure the validators to be used.

<!--
     Add the following DOCTYPE declaration as first line of your XXX-validation.xml file:
diff --git a/content/core-developers/configuration-provider-and-configuration.html b/content/core-developers/configuration-provider-and-configuration.html
index 034d976..66507dc 100644
--- a/content/core-developers/configuration-provider-and-configuration.html
+++ b/content/core-developers/configuration-provider-and-configuration.html
@@ -170,12 +170,7 @@
 
XmlConfigurationProvider
 
-

- proprietary XWork implementation which are using

- -
xwork.xml
-
-
-

file as source of configuration 

+

- proprietary XWork implementation which are using xwork.xml file as source of configuration 

-

file like so:

+

In order to change theses settings you define a constant in your applications struts.xml file like so:

<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE struts PUBLIC 
@@ -485,12 +470,7 @@ struts.multipart.maxSize=2097152
 
-

Additionally the

- -
fileUpload
-
-
-

interceptor has settings that can be put in place for individual action mappings by customizing your interceptor stack.

+

Additionally the fileUpload interceptor has settings that can be put in place for individual action mappings by customizing your interceptor stack.

<action name="doUpload" class="com.example.UploadAction">
     <interceptor-ref name="basicStack"/>
@@ -508,22 +488,12 @@ struts.multipart.maxSize=2097152
 
 

File Size Limits

-

There are two separate file size limits. First is

- -
struts.multipart.maxSize
-
-
-

which comes from the Struts 2

+

There are two separate file size limits. First is struts.multipart.maxSize which comes from the Struts 2

default.properties
 
-

file. This setting exists for security reasons to prohibit a malicious user from uploading extremely large files to file up your servers disk space. This setting defaults to approximately 2 megabytes and should be adjusted to the maximum size file (2 gigs max) that your will need the framework to receive. If you are uploading more than one file on a form the

- -
struts.multipart.maxSize
-
-
-

applies to the combined total, not the individual file sizes. The other setting,

+

file. This setting exists for security reasons to prohibit a malicious user from uploading extremely large files to file up your servers disk space. This setting defaults to approximately 2 megabytes and should be adjusted to the maximum size file (2 gigs max) that your will need the framework to receive. If you are uploading more than one file on a form the struts.multipart.maxSize applies to the combined total, not the individual file sizes. Th [...]

maximumSize
 
@@ -570,21 +540,11 @@ struts.multipart.maxSize=2097152
-

When the uploaded file type does not match one of the MIME types specified a field error will be created as described in the next section entitled Error Messages. Programmatically limiting the file type means using the information passed in to your Action class via the

- -
setXContentType(String contentType)
-
-
-

method. The benefit to this type of approach would be that it’s more flexible and no interceptor configuration would be needed if file sizes are keep under 2 megs.

+

When the uploaded file type does not match one of the MIME types specified a field error will be created as described in the next section entitled Error Messages. Programmatically limiting the file type means using the information passed in to your Action class via the setXContentType(String contentType) method. The benefit to this type of approach would be that it’s more flexible and no interceptor configuration would be needed if file sizes are [...]

Error Messages

-

If an error occurs several field errors will be added assuming that the action implements

- -
com.opensymphony.xwork2.ValidationAware
-
-
-

or extends

+

If an error occurs several field errors will be added assuming that the action implements com.opensymphony.xwork2.ValidationAware or extends

com.opensymphony.xwork2.ActionSupport
 
@@ -628,12 +588,7 @@ struts.multipart.maxSize=2097152

Temporary Directories

-

All uploaded files are saved to a temporary directory by the framework before being passed in to an Action. Depending on the allowed file sizes it may be necessary to have the framework store these temporary files in an alternate location. To do this change

- -
struts.multipart.saveDir
-
-
-

to the directory where the uploaded files will be placed. If this property is not set it defaults to

+

All uploaded files are saved to a temporary directory by the framework before being passed in to an Action. Depending on the allowed file sizes it may be necessary to have the framework store these temporary files in an alternate location. To do this change struts.multipart.saveDir to the directory where the uploaded files will be placed. If this property is not set it defaults to

javax.servlet.context.tempdir
 
@@ -647,12 +602,7 @@ struts.multipart.maxSize=2097152

Alternate Libraries

-

The

- -
struts.multipart.parser
-
-
-

used by the fileUpload interceptor to handle HTTP POST requests, encoded using the MIME-type multipart/form-data, can be changed out. Currently there are two choices, jakarta and pell. The jakarta parser is a standard part of the Struts 2 framework needing only its required libraries added to a project. The pell parser uses Jason Pell’s multipart parser instead of the Commons-FileUpload library. The pell parser is a Struts 2 plugin, for more details see: pell multipart plugin [...] +

The struts.multipart.parser used by the fileUpload interceptor to handle HTTP POST requests, encoded using the MIME-type multipart/form-data, can be changed out. Currently there are two choices, jakarta and pell. The jakarta parser is a standard part of the Struts 2 framework needing only its required libraries added to a project. The pell parser uses Jason Pell’s multipart parser instead of the Commons-FileUpload library. The pell parser is a St [...]

As from Struts version 2.3.18 a new implementation of 

diff --git a/content/core-developers/freemarker-support.html b/content/core-developers/freemarker-support.html index 2033adc..a460d81 100644 --- a/content/core-developers/freemarker-support.html +++ b/content/core-developers/freemarker-support.html @@ -137,12 +137,7 @@

Configure your action to use the freemarker result type

-

The

- -
freemarker
-
-
-

result type is defined in

+

The freemarker result type is defined in

struts-default.xml
 
@@ -178,12 +173,7 @@
stack.findValue("name")
 
-

, which generaly results in

- -
action.getName()
-
-
-

being executed.

+

, which generaly results in action.getName() being executed.

A search process is used to resolve the variable, searching the following scopes in order, until a value is found :

@@ -277,12 +267,7 @@

FreeMarker configuration with recent releases

-

To configure the freemarker engine that Struts uses, just add a file

- -
freemarker.properties
-
-
-

to the classpath. The supported properties are those that the Freemarker Configuration object expects - see the Freemarker documentation^[http://freemarker.org/docs/api/freemarker/template/Configuration.html#setSetting(java.lang.String,%20java.lang.String)] for these.

+

To configure the freemarker engine that Struts uses, just add a file freemarker.properties to the classpath. The supported properties are those that the Freemarker Configuration object expects - see the Freemarker documentation^[http://freemarker.org/docs/api/freemarker/template/Configuration.html#setSetting( [...]

default_encoding=ISO-8859-1
 template_update_delay=5
diff --git a/content/core-developers/jboss-5.html b/content/core-developers/jboss-5.html
index 31d58f6..f465567 100644
--- a/content/core-developers/jboss-5.html
+++ b/content/core-developers/jboss-5.html
@@ -135,12 +135,7 @@
 
WEB-INF/classes
 
-

, you must add the following line into

- -
$JBOSS_HOME/bin/run.conf
-
-
-

or into

+

, you must add the following line into $JBOSS_HOME/bin/run.conf or into

$JBOSS_HOME\bin\run.conf.bat
 
diff --git a/content/core-developers/model-driven.html b/content/core-developers/model-driven.html index 5ed836e..f1e485f 100644 --- a/content/core-developers/model-driven.html +++ b/content/core-developers/model-driven.html @@ -130,31 +130,11 @@

Struts 2 does not have “forms” like Struts 1 did. In Struts 2 request parameters are bound directly to fields in the actions class, and this class is placed on top of the stack when the action is executed.

-

If an action class implements the interface

- -
com.opensymphony.xwork2.ModelDriven
-
-
-

then it needs to return an object from the

- -
getModel()
-
-
-

method. Struts will then populate the fields of this object with the request parameters, and this object will be placed on top of the stack once the action is executed. Validation will also be performed on this model object, instead of the action. Please read about VisitorFieldValidator Annotation which can help you validate model’s fields.

+

If an action class implements the interface com.opensymphony.xwork2.ModelDriven then it needs to return an object from the getModel() method. Struts will then populate the fields of this object with the request parameters, and this object will be placed on top of the stack once the action is executed. Validation will also be performed on this model object, instead of the action. Please read about Interceptor -

To use

- -
ModelDriven
-
-
-

actions, make sure that the Model Driven Interceptor is applied to your action. This interceptor is part of the default interceptor stack

- -
defaultStack
-
-
-

so it is applied to all actions by default.

+

To use ModelDriven actions, make sure that the Model Driven Interceptor is applied to your action. This interceptor is part of the default interceptor stack defaultStack so it is applied to all actions by default.

Example

diff --git a/content/core-developers/namespace-annotation.html b/content/core-developers/namespace-annotation.html index d8c3999..85726be 100644 --- a/content/core-developers/namespace-annotation.html +++ b/content/core-developers/namespace-annotation.html @@ -130,17 +130,7 @@

Namespace Annotation

-

The

- -
@Namespace
-
-
-

annotation allows the definition of an Action’s namespace in the

- -
Action
-
-
-

class rather than based on Zero Configuration’s conventions.

+

The @Namespace annotation allows the definition of an Action’s namespace in the Action class rather than based on Zero Configuration’s conventions.

Usage

diff --git a/content/core-developers/object-factory.html b/content/core-developers/object-factory.html index 94c1087..42846b9 100644 --- a/content/core-developers/object-factory.html +++ b/content/core-developers/object-factory.html @@ -165,12 +165,7 @@

Define dedicated factory

-

If you want to just extend one part of ObjectFactory, ie. to change how Result Types are build, you can implement

- -
ResultFactory
-
-
-

interface and register it with dedicated name, see Extension Points for more details. Original ObjectFactory will use these dedicated factories to do the work. It’s already done this way - the original functionality of ObjectFactory was extracted to separated classes which implements the interfaces below. Check the source of ObjectFactory to see more details. All these factories are available as from version 2.3.16.

+

If you want to just extend one part of ObjectFactory, ie. to change how Result Types are build, you can implement ResultFactory interface and register it with dedicated name, see Extension Points for more details. Original ObjectFactory will use these dedicated factories to do the work. It’s already done this way - the original functionality of ObjectFactory was extracted to separated classes which implem [...]

List of Factory interfaces:

@@ -190,12 +185,7 @@
StrutsResultFactory
 
-

it’s internal implementation which checks if Result implements

- -
ParamNameAwareResult
-
-
-

interface to restrict names of parameters set on the instance of Result, see Result Types for more info.

+

it’s internal implementation which checks if Result implements ParamNameAwareResult interface to restrict names of parameters set on the instance of Result, see Result Types for more info.

  • diff --git a/content/core-developers/parent-package-annotation.html b/content/core-developers/parent-package-annotation.html index f100fce..1062fc6 100644 --- a/content/core-developers/parent-package-annotation.html +++ b/content/core-developers/parent-package-annotation.html @@ -128,12 +128,7 @@ Edit on GitHub

    ParentPackage Annotation

    -

    The

    - -
    @ParentPackage
    -
    -
    -

    annotation allows the definition of

    +

    The @ParentPackage annotation allows the definition of

    Action
     
    diff --git a/content/core-developers/pure-java-script-client-side-validation.html b/content/core-developers/pure-java-script-client-side-validation.html index bcce272..133d52f 100644 --- a/content/core-developers/pure-java-script-client-side-validation.html +++ b/content/core-developers/pure-java-script-client-side-validation.html @@ -162,12 +162,7 @@ some values will be considered acceptable by the JavaScript code but will be mar

    Error reporting

    -

    Because client side validation does not talk to the server, the theme (xhtml theme or css_xhtml theme ) is responsible for properly manipulating the HTML DOM to display the error message inline. The JavaScript that is responsible for doing this logic is

    - -
    validation.js
    -
    -
    -

    and can be found in each theme.

    +

    Because client side validation does not talk to the server, the theme (xhtml theme or css_xhtml theme ) is responsible for properly manipulating the HTML DOM to display the error message inline. The JavaScript that is responsible for doing this logic is validation.js and can be found in each theme.

    diff --git a/content/core-developers/restful-action-mapper.html b/content/core-developers/restful-action-mapper.html index 0d0f706..7f663e5 100644 --- a/content/core-developers/restful-action-mapper.html +++ b/content/core-developers/restful-action-mapper.html @@ -280,12 +280,7 @@

    Unit testing

    -

    Below you will find a simple unit test to test how to test actions when

    - -
    Restful2ActionMapper
    -
    -
    -

    is used.

    +

    Below you will find a simple unit test to test how to test actions when Restful2ActionMapper is used.

    
     public class MovieActionTest extends StrutsJUnit4TestCase<MovieActionTest>{
    diff --git a/content/core-developers/result-annotation.html b/content/core-developers/result-annotation.html
    index e45c70b..2a13520 100644
    --- a/content/core-developers/result-annotation.html
    +++ b/content/core-developers/result-annotation.html
    @@ -128,22 +128,7 @@
         Edit on GitHub
         

    Result Annotation

    -

    The

    - -
    @Result
    -
    -
    -

    annotation allows the definition of

    - -
    Action
    -
    -
    -

    results in the

    - -
    Action
    -
    -
    -

    class rather than an XML file.

    +

    The @Result annotation allows the definition of Action results in the Action class rather than an XML file.

    @@ -160,42 +145,7 @@
    -

    In order for

    - -
    @Result
    -
    -
    -

    and

    - -
    @Results
    -
    -
    -

    annotations to be configured correctly you must set the

    - -
    actionPackages
    -
    -
    -

    filter

    - -
    init-param
    -
    -
    -

    to a comma-separated list of packages containing the annotated

    - -
    Action
    -
    -
    -

    classes. See Zero Configuration for further information; there are

    - -
    Action
    -
    -
    -

    class naming conventions if you don’t implement the

    - -
    Action
    -
    -
    -

    interface and other tidbits there.

    +

    In order for @Result and @Results annotations to be configured correctly you must set the actionPackages filter init-param to a comma-separated list of packages containing the annotated Action classes. See Zero Configuration for further information; there [...]

    @Result Annotation Parameters

    @@ -284,12 +234,7 @@
    ServletActionRedirectResult.class
     
    -

    - equivalent to the

    - -
    redirectAction
    -
    -
    -

    type in XML config

    +

    - equivalent to the redirectAction type in XML config

    • @@ -300,16 +245,12 @@
      -
    • .. (for more result, please consult the API docs, and look for implementations of the XWork
    • -
    - -
    Result
    -
    -
    -

    interface)

    - -
      -
    • params - An Array of the parameters in the form {key1, value1, key2, value2}
    • +
    • +

      .. (for more result, please consult the API docs, and look for implementations of the XWork Result interface)

      +
    • +
    • +

      params - An Array of the parameters in the form {key1, value1, key2, value2}

      +

    @Result – Defining a Single Result

    diff --git a/content/core-developers/weblogic-6-1.html b/content/core-developers/weblogic-6-1.html index 7a79f4a..1a7a6f7 100644 --- a/content/core-developers/weblogic-6-1.html +++ b/content/core-developers/weblogic-6-1.html @@ -160,12 +160,7 @@
    getServletContext
     
    -

    , is then implemented to return the servlet context from where it is available in Servlet 2.3: the session object. The logical operation is unchanged, but now subclasses can override

    - -
    getServletContext
    -
    -
    -

    to retrieve the servlet context from a different location as we’ll see below.

    +

    , is then implemented to return the servlet context from where it is available in Servlet 2.3: the session object. The logical operation is unchanged, but now subclasses can override getServletContext to retrieve the servlet context from a different location as we’ll see below.

    1. SessionLifecycleListener is modified in the same way as RequestLifecycleFilter. The method,
    2. @@ -174,12 +169,7 @@
      getServletContext
       
      -

      , is implemented to return the servlet context, in this case also from the session object. Again, subclasses can override the

      - -
      getServletContext
      -
      -
      -

      method to restore the servlet context from a different source. Again, this class’s functionality is unchanged.

      +

      , is implemented to return the servlet context, in this case also from the session object. Again, subclasses can override the getServletContext method to restore the servlet context from a different source. Again, this class’s functionality is unchanged.

      Now, in a separate project, the following classes are added and compiled into a separate JAR:

      @@ -233,21 +223,12 @@

      I still get the AbstractMethodError Exception when Weblogic Server starts up. What am I doing wrong?

        -
      1. Check to see if a
      2. -
      - -
      action2-example.war
      -
      -
      -

      is still lingering in your

      - -
      mydomain/applications
      -
      -
      -

      folder and delete it if it is there.

      - -
        -
      1. See next FAQ question.
      2. +
      3. +

        Check to see if a action2-example.war is still lingering in your mydomain/applications folder and delete it if it is there.

        +
      4. +
      5. +

        See next FAQ question.

        +

      The server behavior seems like it is from a previous source code base; I can’t debug it. What’s the clue?

      diff --git a/content/core-developers/weblogic.html b/content/core-developers/weblogic.html index f6b5906..00c5abc 100644 --- a/content/core-developers/weblogic.html +++ b/content/core-developers/weblogic.html @@ -146,21 +146,13 @@

      Adding an struts-velocity.properties Configuration File

        -
      • In the
      • -
      - -
      struts.properties
      -
      -
      -

      file (usually kept in the

      - -
      WEB-INF/classes
      -
      -
      -

      directory), add an entry that specifies a Velocity configuation file.

      +
    3. +

      In the struts.properties file (usually kept in the WEB-INF/classes directory), add an entry that specifies a Velocity configuation file.

      -
        -
      • +
          +
        • +
        +

      struts.properties

      @@ -172,37 +164,23 @@ struts.velocity.configfile = struts-velocity.properties
    -
  • Create the corresponding Velocity properties file (“struts-velocity.properties”), preferably in the same location as the
  • -
- -
struts.properties
-
-
-

file.

- -
    -
  • Copy into the Velocity properties file the contents of the
  • +
  • +

    Create the corresponding Velocity properties file (“struts-velocity.properties”), preferably in the same location as the struts.properties file.

    +
  • +
  • +

    Copy into the Velocity properties file the contents of the velocity.properties file that is the the SAF

    +
-
velocity.properties
-
-
-

file that is the the SAF

-
velocity-dep.jar
 

.

    -
  • In your new
  • +
  • In your new struts-velocity.properties file, find he section titled “
-
struts-velocity.properties
-
-
-

file, find he section titled “

-
T E M P L A T E  L O A D E R S
 
diff --git a/content/core-developers/zero-configuration.html b/content/core-developers/zero-configuration.html index 9397969..15cc2f7 100644 --- a/content/core-developers/zero-configuration.html +++ b/content/core-developers/zero-configuration.html @@ -177,12 +177,7 @@

Action and Package name

-

The subpackage name makes the namespace, and the action class name makes the action name. If there is an “Action” suffix, it is dropped before creating the action name. Therefore, if the configured package is com.myapp.actions and the Action is com.myapp.actions. member.EditAction, you can access it via http://server/myapp/member/edit.action. For multi-word actions, the first letter is lower-ca [...] - -

MyCustomAction
-
-
-

will map to

+

The subpackage name makes the namespace, and the action class name makes the action name. If there is an “Action” suffix, it is dropped before creating the action name. Therefore, if the configured package is com.myapp.actions and the Action is com.myapp.actions. member.EditAction, you can access it via http://server/myapp/member/edit.action. For multi-word actions, the first letter is lower-ca [...]

myCustom.action
 
@@ -199,19 +194,9 @@

Parent Package

-

The ParentPackage Annotation configures the XWork package (an XWork package is created per Java package) to extend one or more defined packages. The best place for this annotation is on the package via the

+

The ParentPackage Annotation configures the XWork package (an XWork package is created per Java package) to extend one or more defined packages. The best place for this annotation is on the package via the package-info.java file, however, for backward-compatibility, they can be specified on one or more Actions in the package. To determine which parent packages should be set, first, it looks for the package annotation, t [...] -

package-info.java
-
-
-

file, however, for backward-compatibility, they can be specified on one or more Actions in the package. To determine which parent packages should be set, first, it looks for the package annotation, then adds the action annotations as they are loaded. Because the load order of Actions is undetermined, it is highly recommended you avoid putting the @ParentPackage annotation on Action classes themselves.

- -

For example, if you wanted to set the parent package for the

- -
com.mycompany.myapp.actions
-
-
-

package, create this package-info.java file:

+

For example, if you wanted to set the parent package for the com.mycompany.myapp.actions package, create this package-info.java file:


 @ParentPackage("my-parent-package")
diff --git a/content/tag-developers/form-tags.html b/content/tag-developers/form-tags.html
index f0fda9a..812feb5 100644
--- a/content/tag-developers/form-tags.html
+++ b/content/tag-developers/form-tags.html
@@ -184,12 +184,7 @@
 
 

Simple theme caveats

-

The downside of using the simple theme is that it doesn’t support as many of the attributes that the other themes do. For example, the

- -
label
-
-
-

attribute does nothing in the simple theme, and the automatic display of error messages is not supported.

+

The downside of using the simple theme is that it doesn’t support as many of the attributes that the other themes do. For example, the label attribute does nothing in the simple theme, and the automatic display of error messages is not supported.

Common Attributes

@@ -205,12 +200,7 @@
form
 
-

(${parameters.form}). The

- -
form
-
-
-

property represents the attributes used to render the form tag, such as the form’s id. In a template, the form’s ID can be found by calling ${parameters.form.id}.

+

(${parameters.form}). The form property represents the attributes used to render the form tag, such as the form’s id. In a template, the form’s ID can be found by calling ${parameters.form.id}.

Template-Related Attributes

@@ -517,37 +507,12 @@ __General Attributes__ __Value/Name Relationship__ -In many of the tags (except for the form tag) there is a unique relationship between the - -~~~~~~~ -name -~~~~~~~ - and - -~~~~~~~ -value -~~~~~~~ - attributes. The - -~~~~~~~ -name -~~~~~~~ - attribute provides the name for the tag, which in turn is used as the control attribute when the form is submitted. The value submitted is bound to the - -~~~~~~~ -name -~~~~~~~ -. In most cases, the +In many of the tags (except for the form tag) there is a unique relationship between the `name` and `value` attributes. The `name` attribute provides the name for the tag, which in turn is used as the control attribute when the form is submitted. The value submitted is bound to the ~~~~~~~ name ~~~~~~~ - maps to a simple JavaBean property, such as "postalCode". On a submit, the value would be set to the property by calling the - -~~~~~~~ -setPostalCode -~~~~~~~ - mutator. +. In most cases, the `name` maps to a simple JavaBean property, such as "postalCode". On a submit, the value would be set to the property by calling the `setPostalCode` mutator. Likewise, a form control could be populated by calling a JavaBean accessor, like @@ -570,27 +535,12 @@ getPostalCode ~~~~~~~ -However, since the tags imply a relationship between the - -~~~~~~~ -name -~~~~~~~ - and +However, since the tags imply a relationship between the `name` and ~~~~~~~ value ~~~~~~~ -, the - -~~~~~~~ -value -~~~~~~~ - attribute is optional. If a - -~~~~~~~ -value -~~~~~~~ - is not specified, by default, the JavaBean accessor is used instead. +, the `value` attribute is optional. If a `value` is not specified, by default, the JavaBean accessor is used instead. ~~~~~~~ @@ -601,32 +551,7 @@ value ~~~~~~~ -While most attributes are exposed to the underlying templates as the same key as the attribute (\${parameters.label}), the - -~~~~~~~ -value -~~~~~~~ - attribute is not. Instead, it can be accessed via the - -~~~~~~~ -nameValue -~~~~~~~ - key (\${parameters.nameValue}). The - -~~~~~~~ -nameValue -~~~~~~~ - key indicates that the value may have been generated from the - -~~~~~~~ -name -~~~~~~~ - attribute rather than explicitly defined in the - -~~~~~~~ -value -~~~~~~~ - attribute. +While most attributes are exposed to the underlying templates as the same key as the attribute (\${parameters.label}), the `value` attribute is not. Instead, it can be accessed via the `nameValue` key (\${parameters.nameValue}). The `nameValue` key indicates that the value may have been generated from the `name` attribute rather than explicitly defined in the `value` attribute. __ID Name Assignment__ @@ -662,12 +587,7 @@ labelposition __Required Attribute__ -The - -~~~~~~~ -required -~~~~~~~ - attribute on many UI tags defaults to true only if you have client-side validation enabled, and a validator is associated with that particular field. +The `required` attribute on many UI tags defaults to true only if you have client-side validation enabled, and a validator is associated with that particular field. __Tooltip__ diff --git a/content/tag-developers/tag-syntax.html b/content/tag-developers/tag-syntax.html index 8d52694..d4405ac 100644 --- a/content/tag-developers/tag-syntax.html +++ b/content/tag-developers/tag-syntax.html @@ -150,12 +150,7 @@
-

The expression language (OGNL) lets us call methods and evaluate properties. The method

- -
getText
-
-
-

is provided by ActionSupport, which is the base class for most Actions. Since the Action is on the stack, we can call any of its methods from an expression, including

+

The expression language (OGNL) lets us call methods and evaluate properties. The method getText is provided by ActionSupport, which is the base class for most Actions. Since the Action is on the stack, we can call any of its methods from an expression, including

getText
 
@@ -164,12 +159,7 @@

Non-String Attributes

-

The HTTP protocol is text-based, but some tags have non-String attribute types, like

- -
bool
-
-
-

or

+

The HTTP protocol is text-based, but some tags have non-String attribute types, like bool or

int
 
@@ -184,12 +174,7 @@
-

Since the attribute

- -
multiple
-
-
-

maps to a boolean property, the framework does not interpret the value as a String. The value is evaluated as an expression and automtically converted to a boolean.

+

Since the attribute multiple maps to a boolean property, the framework does not interpret the value as a String. The value is evaluated as an expression and automtically converted to a boolean.

Since it’s easy to forget which attributes are String and which are non-String, you can still use the escape notation.

@@ -219,44 +204,19 @@

value is an Object!

-

Most often, the

- -
value
-
-
-

attribute is set automatically, since

- -
name
-
-
-

attribute usually tells the framework which property to call to set the

- -
value
-
-
-

. But, if there is a reason to set the

+

Most often, the value attribute is set automatically, since name attribute usually tells the framework which property to call to set the

value
 
-

directly, be advised that

+

. But, if there is a reason to set the value directly, be advised that

value
 

is an ObjectNOT **a String**.

-

(!) Since

- -
value
-
-
-

is not a String, whatever is passed to

- -
value
-
-
-

is evaluated as an expression - NOT a String literal.

+

(!) Since value is not a String, whatever is passed to value is evaluated as an expression - NOT a String literal.

Probably wrong!

@@ -266,12 +226,7 @@
-

If a

- -
textfield
-
-
-

is passed the value attribute

+

If a textfield is passed the value attribute

"ca"
 
diff --git a/content/tag-developers/velocity.html b/content/tag-developers/velocity.html index 2b1137e..9de9518 100644 --- a/content/tag-developers/velocity.html +++ b/content/tag-developers/velocity.html @@ -179,12 +179,7 @@ Hello, ${name}
-

Where

- -
name
-
-
-

is a property on the Action class. That’s it!

+

Where name is a property on the Action class. That’s it!

There are few more details of interest, such as how templates are loaded and variables are resolved.

-- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" '].