
Apache Struts 2, another popular Java Model-View-Contraller (MVC) framework, combine of both successful WebWork and Struts 1.x web frameworks.
Apache Struts 2, is totally different with Struts 1, it’s core features are all implemented with interceptors, “value stack” concept, OGNL expression and Struts 2 tags to work around the application data, and many annotations and conventions to make this framework more simpler to use. In this tutorials, it provides many step by step examples and explanations on using Struts 2 MVC framework.
Happy learning Struts 2. :)
Struts 2 Quick Start
Struts 2 quick start example.
- Struts 2 hello world (XML version)
Struts 2 hello world example with XML file. - Struts 2 Hello World (Annotation version)
Struts 2 hello world example with annotation. - @ResultPath annotation example
@ResultPath annotation explanation and example.
Struts 2 Configurations
Anything about Struts 2 configuration file.
- Multiple Struts configuration files example
Split the large Struts configuration file into multiple small configuration file. - Namespace configuration example and explanation
Struts 2 Namespace is a new concept to handle the multiple modules by given a namespace to each module. - Struts 2 Development mode
Enable the Struts 2 development mode will make debugging more easier. - How to remove the action suffix extension in Struts 2
The default “.action” extension is ugly and not user friendly, example to remove or replate it with another extension.
Struts 2 Action & Form
Struts 2 Action and form data management.
- Working with Struts 2 actions
Struts 2 Action explanation and example. - Struts 2 ActionError & ActionMessage Example
Struts 2 ActionError & ActionMessage explanation and example. - Struts 2 ModelDriven example
Transfer the form data into the object automatically.
Struts 2 Interceptors
Abything about Struts 2 interceptors.
- Mapping interceptors to action
Configurate the interceptoes to action. - Override the interceptor parameters
Few ways to override the interceptor’s parameters. - Interceptor stack example
Interceptor stack is used to group a set of the interceptors, good for reuse. - Creating own interceptor
Guide to create an own interceptor to suita your needs. - execAndWait interceptor example
A very convenient interceptor for long running actions in the background while showing the user an custom waiting page.
Struts 2 UI Tags
Struts 2 UI tags, to render the HTML form and non-form componnets.
- TextBox example
Struts 2 <s:textfield> textbox example. - Password example
Struts 2 <s:password> password example. - Hidden value example
Struts 2 <s:hidden> hidden value example. - Textarea example
Struts 2 <s:textarea> textarea example. - Radio button example
Struts 2 <s:radio> radio button example. - Preselect a radio button value
Guide to preselect a radio button value. - Checkbox example
Struts 2 <s:checkbox> checkbox example. - Multiple checkboxes example
Struts 2 <s:checkboxlist> mutiple check boxes example. - Set default value for multiple checkboxes
Guide to set default value for multiple check boxes. - Drop down box example
Struts 2 <s:select> drop down box example. - Auto select drop down box value
Guide to auto select drop down box value. - Combo box example
Struts 2 <s:combobox> combo box example. - head example
Struts 2 <s:head>, render a HTML head component. - File upload example
Struts 2 <s:file> file upload example. - Upload multiple files example
Struts 2 <s:file> multiple file upload example. - doubleselect example
Struts 2 <s:doubleselect>, create two HTML drop down boxes, once the first drop down list is selected, the second drop down list will be change accordingly - updownselect example
Struts 2 <s:updownselect>, create a HTML Select component with buttons to move up or down the options in the Select component. - optiontransferselect example
Struts 2 <s:optiontransferselect>, two “updownselect” select components align at the left and right side, in the middle of them, containing buttons to move the select options between themselves. - datetimepicker example
Struts 2 <s:datetimepicker>, will render a text box and append a calender icon behind, click on the calender icon will prompt a date time picker component. - autocompleter example
Struts 2 <s:autocompleter>, a combo box that will automatic prompt drop down suggestion lists while user typing on the text box. - autocompleter + JSON example
Example to populate JSON data to the autocompleter componenet.
Struts 2 Control Tags
Struts 2 Control tags or Logic tags, help to do conditional processing, iterate, manipulate and display the data.
- iterator tag example
Struts 2 Iterator tag is used to iterate over a value, which can be any of java.util.Collection or java.util.Iterator. - if, elseIf, else tag example
Struts 2 If, ElseIf and Else tags are used to perform basic condition checking. - append tag example
Struts 2 append tag is used to combine few Iterators (created by List or Map) into a single Iterator. - generator tag example
Struts 2 generator tag is used to generate an iterator based on the “val” attribute provided in the page. - merge tag example
Struts 2 merge tag is used to merge few Iterators (created by List or Map) into a single Iterator. - sort tag example
Struts 2 sort tag is used to sort a List using a java.util.Comparator. - subset tag example
Struts 2 subset tag is used to output a subset or portion of an iterator elements.
Struts 2 Data Tags
Struts 2 Data tags, help to get the data from the ValueStack, or place the data into the ValusStack.
- a tag example
Struts 2 a tag is used to render a HTML “<a>” tag. - action tag example
Struts 2 action tag is used to call action class directly from a JSP page. - bean tag example
Struts 2 bean tag is used to instantiate a class in the JSP page. - date tag example
Struts 2 date tag is used to format Date object in JSP page. - debug tag example
Struts 2 debug tag is a very useful debugging tag to output the content of the “Value Stack” and also the “Stack Context” details in JSP page. - include tag example
Struts 2 include tag is used to include JSP or HTML page directly into the current page. - i18n tag example
Struts 2 i18n tag is used to get the message from any declared resource bundle, not just the resource bundle that associated with the current action. - param tag example
Struts 2 param tag is used to parametrize other tags. - property tag example
Struts 2 property tag is used to get the property value from a class, which will default to the current Action class. - push tag example
Struts 2 push tag is used to push value to the top of stack, so that it can be access or reference easily. - set tag example
Struts 2 set tag is used to assign a value to a variable in a specified scope (application, session, request, page, or action). - text tag example
Struts 2 text tag is used to get the message from the resource bundle that’s bundle with the action class. - url tag example
Struts 2 “url” tag is used to create an URL and output it as a text format.
Struts 2 Resource Bundle & Localization
Struts 2 resource bundle to support the web localization features (multiple language).
- Resource bundle example
Struts 2 resource bundle exaplantion and example. - i18n or localization example
A Struts 2 internationalizing or multi-language example to show the use of resource bundle to display the message from different languages. - key attribute example
Struts 2 key attribute in the UI components is a common way to handle the localization and also a very efficient way of coding the UI tags. - Chinese localization issue
A common Chinese localization issue. - configure Global resource bundle
Guide to configure the global resource bundle in Struts 2.
Struts 2 Theme
Struts 2 layout is designed by the “xhtml” theme, understand the Struts 2 theme concept is a “MUST”.
- Working with Struts 2 Theme & Template
Struts 2 theme & template explanation and example.
Struts 2 Integrate with Other Frameworks
Anything about the Struts 2 integration with others framework – Spring, Hibernate, Quartz, Log4j…
- Struts 2 + Spring integration example
Integrate Struts 2 and Spring framework. - Struts 2 + Quartz scheduler integration example
Integrate Struts 2 and Quartz scheduler framework. - Struts 2 + Spring + Quartz scheduler integration example
Integrate Struts 2, Spring and Quartz scheduler framework. - Struts 2 + Hibernate integration example
Integrate Struts 2 and Hibernate framework. - Struts 2 + Hibernate integration with “Full Hibernate Plugin”
Integrate Struts 2 and Hibernate with “Full Hibernate Plugin”. - Struts 2 + Spring + Hibernate integration example
Integrate Struts 2, Spring and Hibernate framework. - Struts 2 + Log4j integration example
Integrate Struts 2 and Log4j framework.
Struts 2 FAQ
Struts 2 FAQ.
- Difference between FilterDispatcher and StrutsPrepareAndExecuteFilter
Common ask the diffrent between filterdispatcher and strutsprepareandexecutefilter. - How to get the HttpServletRequest in Struts 2
Example to get the HttpServletRequest in Struts 2. - How to get the HttpServletResponse in Struts 2
Example to get the HttpServletResponse in Struts 2. - How to get the ServletContext in Struts 2
Example to get the ServletContext in Struts 2. - Configure static parameter in Struts 2
Example to configurate static parameter in Struts 2. - Struts 2 download file example
Example to download file in Struts 2. - Struts 2 and JSON example
Example to integrate Struts 2 with JSON data.
Struts 2 Common Errors
Struts 2 common errors.
- ClassNotFoundException: com.opensymphony.xwork2.util.finder.Test
- There is no Action mapped for namespace / and action name “yourActionName”
Pingback: pirater un compte facebook()
Pingback: breaking bad streaming()
Pingback: domino online deposit 10rb()
Pingback: Grandeur park residences()
Pingback: unlock her legs official�()
Pingback: agen judi casino()
Pingback: pokerqiuqiu online()
Pingback: where to get()
Pingback: judi()
Pingback: agen bola terpercaya()
Pingback: situs dadu online()
Pingback: power rangers full movie()
Pingback: Shirl()
Pingback: jdm engine()
Pingback: J. Cole()
Pingback: Grandeur park residences()
Pingback: capsa susun()
Pingback: situs judi poker()
Pingback: affordable piano lesson vancouver bc Canada()
Pingback: sites de rencontre()
Pingback: casino()