This is an automated email from the ASF dual-hosted git repository. yasserzamani pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/master by this push: new dd691a6 Replaces ([a-z]\s)\n\n~~~~~~~\n([^\n]+)\n~~~~~~~\n(\s[a-z]) with $1`$2`$3 dd691a6 is described below commit dd691a6d9d4ae09088a2a19941ef4d07d33ad7fd Author: Yasser Zamani <yasserzam...@apache.org> AuthorDate: Thu Nov 23 20:06:05 2017 +0330 Replaces ([a-z]\s)\n\n~~~~~~~\n([^\n]+)\n~~~~~~~\n(\s[a-z]) with $1`$2`$3 --- source/core-developers/basic-validation.md | 12 +-- source/core-developers/client-side-validation.md | 29 +------ source/core-developers/client-validation.md | 21 +---- .../configuration-provider-and-configuration.md | 7 +- source/core-developers/file-upload.md | 70 +++------------- source/core-developers/freemarker-support.md | 21 +---- source/core-developers/jboss-5.md | 7 +- source/core-developers/model-driven.md | 24 +----- source/core-developers/namespace-annotation.md | 12 +-- source/core-developers/object-factory.md | 14 +--- .../core-developers/parent-package-annotation.md | 7 +- .../pure-java-script-client-side-validation.md | 7 +- source/core-developers/restful-action-mapper.md | 7 +- source/core-developers/result-annotation.md | 68 +-------------- source/core-developers/weblogic-6-1.md | 26 +----- source/core-developers/weblogic.md | 33 +------- source/core-developers/zero-configuration.md | 21 +---- source/tag-developers/form-tags.md | 96 ++-------------------- source/tag-developers/tag-syntax.md | 59 ++----------- source/tag-developers/velocity.md | 7 +- 20 files changed, 59 insertions(+), 489 deletions(-) diff --git a/source/core-developers/basic-validation.md b/source/core-developers/basic-validation.md index b2becce..6ab92ed 100644 --- a/source/core-developers/basic-validation.md +++ b/source/core-developers/basic-validation.md @@ -100,17 +100,7 @@ public class QuizAction extends ActionSupport { ## 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/source/core-developers/client-side-validation.md b/source/core-developers/client-side-validation.md index 90eaa4f..fb2f238 100644 --- a/source/core-developers/client-side-validation.md +++ b/source/core-developers/client-side-validation.md @@ -7,12 +7,7 @@ title: Client Side Validation 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\. ~~~~~~~ @@ -22,27 +17,7 @@ validate="true" ~~~~~~~ -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/source/core-developers/client-validation.md b/source/core-developers/client-validation.md index 52a9139..9b62a1c 100644 --- a/source/core-developers/client-validation.md +++ b/source/core-developers/client-validation.md @@ -7,12 +7,7 @@ title: Client Validation 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 @@ -62,12 +57,7 @@ Create the form\. ``` {% comment %}end snippet id=clientValidation|lang=xml|javadoc=false|url=struts2/apps/showcase/src/main/webapp/WEB-INF/validation/quiz-client.jsp {% endcomment %} -(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 @@ -117,12 +107,7 @@ public class QuizAction extends ActionSupport { __Step 3__ -Create the - -~~~~~~~ -validation.xml -~~~~~~~ - to configure the validators to be used\. +Create the `validation.xml` to configure the validators to be used\. {% comment %}start snippet id=quizValidators|javadoc=false|lang=xml|url=struts2/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/QuizAction-validation.xml {% endcomment %} diff --git a/source/core-developers/configuration-provider-and-configuration.md b/source/core-developers/configuration-provider-and-configuration.md index 015a189..eb0def2 100644 --- a/source/core-developers/configuration-provider-and-configuration.md +++ b/source/core-developers/configuration-provider-and-configuration.md @@ -49,12 +49,7 @@ ConfigurationManager ~~~~~~~ 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 + diff --git a/source/core-developers/file-upload.md b/source/core-developers/file-upload.md index e771272..8f76c60 100644 --- a/source/core-developers/file-upload.md +++ b/source/core-developers/file-upload.md @@ -55,12 +55,7 @@ If you are using Maven then you can add these libraries as dependencies in your ## Basic Usage -The - -~~~~~~~ -org.apache.struts2.interceptor.FileUploadInterceptor -~~~~~~~ - class is included as part of the +The `org.apache.struts2.interceptor.FileUploadInterceptor` class is included as part of the ~~~~~~~ defaultStack @@ -148,12 +143,7 @@ The purpose of each one of these methods is described in the table below\. Notic ## Uploading Multiple Files -As mentioned in the previous section one technique for uploading multiple files would be to simply have multiple form input elements of type file all with different names\. This would require a number of setter methods that was equal to 3 times the number of files being uploaded\. Another option is to use Arrays or java\.util\.Lists\. The following examples are taken from the Showcase example application that is part sample applications you can download at [http://struts\.apache\.org/dow [...] - -~~~~~~~ -struts-fileupload.xml -~~~~~~~ - in the sample application download\. +As mentioned in the previous section one technique for uploading multiple files would be to simply have multiple form input elements of type file all with different names\. This would require a number of setter methods that was equal to 3 times the number of files being uploaded\. Another option is to use Arrays or java\.util\.Lists\. The following examples are taken from the Showcase example application that is part sample applications you can download at [http://struts\.apache\.org/dow [...] __Uploading Multiple Files using Arrays__ @@ -307,12 +297,7 @@ struts.multipart.maxSize=2097152 | -In order to change theses settings you define a constant in your applications - -~~~~~~~ -struts.xml -~~~~~~~ - file like so: +In order to change theses settings you define a constant in your applications `struts.xml` file like so: ~~~~~~~ @@ -327,12 +312,7 @@ struts.xml ~~~~~~~ -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\. ~~~~~~~ @@ -351,22 +331,12 @@ fileUpload __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\. The other setting, ~~~~~~~ maximumSize @@ -415,21 +385,11 @@ There are two ways to limit the uploaded file type, declaratively and programmat ~~~~~~~ -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 keep under 2 megs\. __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 @@ -447,12 +407,7 @@ com.opensymphony.xwork2.ActionSupport __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 @@ -466,12 +421,7 @@ javax.servlet.context.tempdir __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 Struts 2 plugin, for more details s [...] As from Struts version 2\.3\.18 a new implementation of diff --git a/source/core-developers/freemarker-support.md b/source/core-developers/freemarker-support.md index 70b7118..6e5c11a 100644 --- a/source/core-developers/freemarker-support.md +++ b/source/core-developers/freemarker-support.md @@ -14,12 +14,7 @@ freemarker __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 @@ -56,12 +51,7 @@ ${name ~~~~~~~ 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 : @@ -132,12 +122,7 @@ exception __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))^[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(java\.lang\.String,%20java\.lang\.String))^[http://freemarker\.org/docs/api/freemarker/template/Configuration\.html\#setSetting(java\.lang\.String,%20java\.lang\.String)] for [...] ~~~~~~~ diff --git a/source/core-developers/jboss-5.md b/source/core-developers/jboss-5.md index 0f4e949..3fd2fad 100644 --- a/source/core-developers/jboss-5.md +++ b/source/core-developers/jboss-5.md @@ -12,12 +12,7 @@ To have proper support of the _Convention Plugin_ in JBoss AS 5, especi ~~~~~~~ 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/source/core-developers/model-driven.md b/source/core-developers/model-driven.md index 91e0e72..b45886e 100644 --- a/source/core-developers/model-driven.md +++ b/source/core-developers/model-driven.md @@ -7,31 +7,11 @@ title: Model Driven 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](visitor-field-validator-annotation.html) 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 [VisitorFieldValidator Annotation](visitor-field-validator-annotation.html) which can [...] ## Interceptor -To use - -~~~~~~~ -ModelDriven -~~~~~~~ - actions, make sure that the [Model Driven Interceptor](model-driven-interceptor.html) 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](model-driven-interceptor.html) 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/source/core-developers/namespace-annotation.md b/source/core-developers/namespace-annotation.md index a3c996d..f020a21 100644 --- a/source/core-developers/namespace-annotation.md +++ b/source/core-developers/namespace-annotation.md @@ -7,17 +7,7 @@ title: Namespace Annotation ## Namespace Annotation -The - -~~~~~~~ -@Namespace -~~~~~~~ - annotation allows the definition of an Action's namespace in the - -~~~~~~~ -Action -~~~~~~~ - class rather than based on [Zero Configuration](zero-configuration.html)'s conventions\. +The `@Namespace` annotation allows the definition of an Action's namespace in the `Action` class rather than based on [Zero Configuration](zero-configuration.html)'s conventions\. ### Usage diff --git a/source/core-developers/object-factory.md b/source/core-developers/object-factory.md index ec1cca1..fab7623 100644 --- a/source/core-developers/object-factory.md +++ b/source/core-developers/object-factory.md @@ -41,12 +41,7 @@ public class MyObjectFactory extends ObjectFactory { ### Define dedicated factory -If you want to just extend one part of ObjectFactory, ie\. to change how [Result Types](result-types.html) 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](result-types.html) 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 Object [...] List of Factory interfaces: @@ -62,12 +57,7 @@ ResultFactory ~~~~~~~ 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](result-types.html) 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](result-types.html) for more info\. + diff --git a/source/core-developers/parent-package-annotation.md b/source/core-developers/parent-package-annotation.md index 31f6ca9..28644e8 100644 --- a/source/core-developers/parent-package-annotation.md +++ b/source/core-developers/parent-package-annotation.md @@ -5,12 +5,7 @@ title: ParentPackage Annotation # ParentPackage Annotation -The - -~~~~~~~ -@ParentPackage -~~~~~~~ - annotation allows the definition of +The `@ParentPackage` annotation allows the definition of ~~~~~~~ Action diff --git a/source/core-developers/pure-java-script-client-side-validation.md b/source/core-developers/pure-java-script-client-side-validation.md index dc07139..fac906e 100644 --- a/source/core-developers/pure-java-script-client-side-validation.md +++ b/source/core-developers/pure-java-script-client-side-validation.md @@ -35,12 +35,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/source/core-developers/restful-action-mapper.md b/source/core-developers/restful-action-mapper.md index b4321b2..123bb1e 100644 --- a/source/core-developers/restful-action-mapper.md +++ b/source/core-developers/restful-action-mapper.md @@ -131,12 +131,7 @@ For the Restful2ActionMapper to work we also have to set __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\. ~~~~~~~ diff --git a/source/core-developers/result-annotation.md b/source/core-developers/result-annotation.md index 016b30d..7d277ed 100644 --- a/source/core-developers/result-annotation.md +++ b/source/core-developers/result-annotation.md @@ -5,22 +5,7 @@ title: Result Annotation # 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\. @@ -28,42 +13,7 @@ Action | -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](zero-configuration.html) 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](zero-configuration.html) for further information; there are `Action` class naming conventions if you don't implement the `Action` interface and other tidbits there\. ## @Result Annotation Parameters @@ -134,12 +84,7 @@ ServletRedirectResult.class ~~~~~~~ ServletActionRedirectResult.class ~~~~~~~ - \- equivalent to the - -~~~~~~~ -redirectAction -~~~~~~~ - type in XML config + \- equivalent to the `redirectAction` type in XML config + @@ -147,12 +92,7 @@ redirectAction TilesResult.class ~~~~~~~ - + \.\. (for more result, please consult the API docs, and look for implementations of the XWork - -~~~~~~~ -Result -~~~~~~~ - interface) + + \.\. (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\} diff --git a/source/core-developers/weblogic-6-1.md b/source/core-developers/weblogic-6-1.md index 83957bc..fea5cc1 100644 --- a/source/core-developers/weblogic-6-1.md +++ b/source/core-developers/weblogic-6-1.md @@ -35,24 +35,14 @@ getServletContext ~~~~~~~ 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, ~~~~~~~ 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: @@ -88,17 +78,7 @@ In the \{\{web\.xml\} file, make the following class name substitutions: __I still get the AbstractMethodError Exception when Weblogic Server starts up\. What am I doing wrong?__ -1. Check to see if a - -~~~~~~~ -action2-example.war -~~~~~~~ - is still lingering in your - -~~~~~~~ -mydomain/applications -~~~~~~~ - folder and delete it if it is there. +1. Check to see if a `action2-example.war` is still lingering in your `mydomain/applications` folder and delete it if it is there. 2. See next FAQ question. diff --git a/source/core-developers/weblogic.md b/source/core-developers/weblogic.md index b4a1455..d265f0a 100644 --- a/source/core-developers/weblogic.md +++ b/source/core-developers/weblogic.md @@ -16,17 +16,7 @@ To deploy to WebLogic, the common approach is to create and deploy an unexpanded ## 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\. ++ In the `struts.properties` file (usually kept in the `WEB-INF/classes` directory), add an entry that specifies a Velocity configuation file\. + @@ -40,31 +30,16 @@ struts.velocity.configfile = struts-velocity.properties ~~~~~~~ -+ Create the corresponding Velocity properties file ("struts\-velocity\.properties"), preferably in the same location as the ++ Create the corresponding Velocity properties file ("struts\-velocity\.properties"), preferably in the same location as the `struts.properties` file\. -~~~~~~~ -struts.properties -~~~~~~~ - file\. - -+ Copy into the Velocity properties file the contents of the - -~~~~~~~ -velocity.properties -~~~~~~~ - file that is the the SAF ++ Copy into the Velocity properties file the contents of the `velocity.properties` file that is the the SAF ~~~~~~~ velocity-dep.jar ~~~~~~~ \. -+ In your new - -~~~~~~~ -struts-velocity.properties -~~~~~~~ - file, find he section titled " ++ In your new `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/source/core-developers/zero-configuration.md b/source/core-developers/zero-configuration.md index 1bf7d65..60331eb 100644 --- a/source/core-developers/zero-configuration.md +++ b/source/core-developers/zero-configuration.md @@ -48,12 +48,7 @@ The only example right now is in the showcase, where the person package uses the ## 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](http://server/myapp/member/edit\.action)\. For multi\-word actions, the first letter is lower\-cased and the rest is left alon [...] - -~~~~~~~ -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](http://server/myapp/member/edit\.action)\. For multi\-word actions, the first letter is lower\-cased and the rest is left alon [...] ~~~~~~~ myCustom.action @@ -70,19 +65,9 @@ The [Namespace Annotation](#PAGE_68488) overrides the namespace\. ## Parent Package -The [ParentPackage Annotation](#PAGE_68490) 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](#PAGE_68490) 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, then adds the action annotations as they are load [...] -~~~~~~~ -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: ~~~~~~~ diff --git a/source/tag-developers/form-tags.md b/source/tag-developers/form-tags.md index 5c9b868..46b2644 100644 --- a/source/tag-developers/form-tags.md +++ b/source/tag-developers/form-tags.md @@ -30,12 +30,7 @@ The predefined themes can be used "as is" or customized. __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__ @@ -51,12 +46,7 @@ In addition to the common attributes, a special attribute exists for all form el ~~~~~~~ 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__ @@ -374,37 +364,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 @@ -427,27 +392,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. ~~~~~~~ @@ -458,32 +408,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__ @@ -519,12 +444,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/source/tag-developers/tag-syntax.md b/source/tag-developers/tag-syntax.md index ebfa067..3c042cc 100644 --- a/source/tag-developers/tag-syntax.md +++ b/source/tag-developers/tag-syntax.md @@ -29,12 +29,7 @@ Sometimes, we want to pass the dynamic data to a tag. For example, we might want ~~~~~~~ -The expression language ([OGNL](#PAGE_14198)) 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](#PAGE_14198)) 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 @@ -43,12 +38,7 @@ getText ## 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 @@ -64,12 +54,7 @@ int ~~~~~~~ -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. @@ -102,44 +87,19 @@ Since it's easy to forget which attributes are String and which are non-String, ## 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 Object****_NOT_ ****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!** @@ -150,12 +110,7 @@ value ~~~~~~~ -If a - -~~~~~~~ -textfield -~~~~~~~ - is passed the value attribute +If a `textfield` is passed the value attribute ~~~~~~~ "ca" diff --git a/source/tag-developers/velocity.md b/source/tag-developers/velocity.md index d35141f..d51743c 100644 --- a/source/tag-developers/velocity.md +++ b/source/tag-developers/velocity.md @@ -51,12 +51,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" <commits@struts.apache.org>'].