<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3580268113024111385</id><updated>2011-11-16T22:25:33.742-05:00</updated><category term='Decorating Struts2 with Tiles'/><category term='User interface'/><category term='struts2 installation'/><category term='Form Tags'/><category term='Apache Struts'/><category term='struts2 course'/><category term='Securing Struts2 applications in tomcat'/><category term='struts2 actions'/><category term='struts tutorial'/><category term='Decorating Struts2 with SiteMesh'/><category term='struts2 configuration'/><category term='Internationalization and localization'/><category term='Generic Tags'/><category term='struts2 introduction'/><category term='Java'/><category term='Programming'/><category term='The Persistence Layer'/><category term='mvc'/><category term='Model Driven and  Prepare Interceptors'/><category term='File upload and File download'/><category term='Data Access Object'/><category term='Custom Interceptors'/><category term='modelview controller'/><category term='results'/><category term='Databases and Persistence'/><category term='OGNL'/><category term='Web application'/><category term='struts2 tutorial'/><category term='actions'/><category term='Execute and Wait Interceptor'/><category term='struts2 Message Handling and Internationalization'/><category term='Preventing Double Submits'/><category term='Struts2 Type Conversion'/><category term='Struts2  Input Validation'/><category term='struts2 results'/><category term='Custom Result Types'/><title type='text'>Javaee trainer</title><subtitle type='html'>&lt;b&gt;Free open courseware of the main frameworks of java: struts2, spring, jpa, etc.&lt;/b&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-1592428088422006945</id><published>2010-02-27T00:43:00.012-05:00</published><updated>2010-05-14T23:29:00.282-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Decorating Struts2 with Tiles'/><title type='text'>Struts2 course chapter 19: Decorating Struts2 with Tiles</title><content type='html'>&lt;div align="justify"&gt;In this presentation the topic of decorating Struts2 websites with Apache Tiles is covered.

Apache Tiles is a framework built to simplify the development of web application through the use of templates. With Tiles authors can define page fragments which can be assembled into a complete page at runtime. These fragments, called tiles, can be used as simple includes in order to reduce the duplication of common page elements or embedded within other tiles to develop a series of reusable templates. These templates allow the development of a consistent look and feel for an entire application.

The integration between Apcahe Tiles and Struts can be difficult and in the slide the details of the configuration are explained. In addition, a working example is presented.

&lt;div align="center"&gt;

&lt;b&gt;Struts2 course chapter 19: Decorating Struts2 with Tiles&lt;/b&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter19-20-1-1#slide" title="Decorating Struts2 with Tiles" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-19-100407190115-phpapp02-thumbnail?1271434479" with="400" height="300" alt="Decorating Struts2 with Tiles"&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;br&gt;&lt;br&gt;
Download the eclipse project with the example of the slide from the following location:
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter19-20-1-1#download" title="Decorating Struts2 with Tiles code" target="_blank"&gt;
Struts2 Course chapter 19: Decorating Struts2 with Tiles code
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.nofluffjuststuff.com/blog/craig_walls/2010/04/announcement_action_framework_"&gt;Announcement: Action Framework!&lt;/a&gt; (nofluffjuststuff.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://checkedexception.blogspot.com/2010/04/why-you-should-not-use-web-framework.html"&gt;Why you should NOT use a web framework&lt;/a&gt; (checkedexception.blogspot.com)&lt;/li&gt;&lt;/ul&gt;&lt;/fieldset&gt;

&lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/0ce45369-c7a1-42e5-8573-276d3be93378/" title="Reblog this post [with Zemanta]"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=0ce45369-c7a1-42e5-8573-276d3be93378" alt="Reblog this post [with Zemanta]" style="border:none;float:right"&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-1592428088422006945?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/1592428088422006945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2010/02/struts2-course-chapter-19-decorating.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/1592428088422006945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/1592428088422006945'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2010/02/struts2-course-chapter-19-decorating.html' title='Struts2 course chapter 19: Decorating Struts2 with Tiles'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-8331914017238223901</id><published>2010-02-26T20:22:00.014-05:00</published><updated>2010-05-07T13:41:13.103-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Decorating Struts2 with SiteMesh'/><title type='text'>Struts2 course chapter 18: Decorating Struts2 with SiteMesh</title><content type='html'>&lt;div align="justify"&gt;In this presentation the topic of decorating Struts2 websites with SiteMesh will be covered.

SiteMesh is a framework for web-page layout and decoration as well as for web-application integration. This framework helps to the creation of large sites consisting of many pages for which a consistent look/feel, navigation and layout scheme is required.

The integration of SiteMesh and Struts2 can be tricky so all the deails of the configuration will be covered.
&lt;br&gt;
&lt;div align="center"&gt;
&lt;b&gt;Struts2 course chapter 18: Decorating Struts2 with SiteMesh&lt;/b&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter18-19-1-1#slide" title="Decorating Struts2 with SiteMesh2" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-18-100407185459-phpapp02-thumbnail?1271434342" with="400" height="300" alt="Decorating Struts2 with SiteMesh"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;
Download the eclipse projects with the examples of the slide from the following locations:
&lt;br/&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter18-19-1-1#download" title="Decorating Struts2 with SiteMesh code example" target="_blank"&gt;
Struts2 course chapter 18: Decorating Struts2 with SiteMesh code example
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-8331914017238223901?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/8331914017238223901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2010/02/struts2-course-chapter-18-decorating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/8331914017238223901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/8331914017238223901'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2010/02/struts2-course-chapter-18-decorating.html' title='Struts2 course chapter 18: Decorating Struts2 with SiteMesh'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-2989221141422374913</id><published>2010-01-07T23:04:00.011-05:00</published><updated>2010-05-07T13:43:41.994-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Execute and Wait Interceptor'/><title type='text'>'Struts2 Course chapter 17: The Execute and Wait Interceptor</title><content type='html'>&lt;div align="justify"&gt;
The Execute And Wait interceptor is useful for running time consuming process in the background while showing the user some feedback with a progress meter.  This also prevents the HTTP request from timing out when the action takes more than 5 or 10 minutes.
&lt;br&gt;&lt;br&gt;
This interceptor works on a per-session basis. That means that the same action name cannot be run more than once at a time in a given session. 
On the initial request or any subsequent requests (before the action has completed), the wait result will be returned. 
&lt;br&gt;&lt;br&gt;
The wait result is responsible for issuing a subsequent request back to the action, giving the effect of a self-updating progress meter.
&lt;br&gt;&lt;br&gt;
Using this interceptor is pretty easy but this interceptor is  not part of the default stack. Since it's not part of the default stack, actions that need this interceptor must declare it and because of the nature of this interceptor, it must be the last interceptor in the stack.
&lt;br&gt;&lt;br&gt;
If no "wait" result is found, Struts will automatically generate a wait result on the fly. 
&lt;br&gt;&lt;br&gt;
This is the topic of the next slides.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Struts2 Course chapter 17: The Execute and Wait Interceptor&lt;/b&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter17-18-1-1#slide" title="The Execute and Wait Interceptor in Struts2" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-17-100407185137-phpapp01-thumbnail?1271434061" with="400" height="300" alt="The Execute and Wait Interceptor in Struts2"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;&lt;br&gt;
Download the eclipse ready example projects:
&lt;br&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter17-18-1-1#download" title="The Execute and Wait Interceptor in Struts2" target="_blank"&gt;
Struts2 Course chapter 17: The Execute and Wait Interceptor code example
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-2989221141422374913?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/2989221141422374913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2010/01/struts2-course-chapter-17-execute-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/2989221141422374913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/2989221141422374913'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2010/01/struts2-course-chapter-17-execute-and.html' title='&apos;Struts2 Course chapter 17: The Execute and Wait Interceptor'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-5375968657990667717</id><published>2010-01-07T23:03:00.008-05:00</published><updated>2010-05-07T13:43:43.957-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Preventing Double Submits'/><title type='text'>Struts2 Course chapter 16: Preventing Double Submits</title><content type='html'>&lt;div align="justify"&gt;
Double form submits are the nightmare of web application developers. They normally happen by accident or lack of feedback when users wait for a long time process of a form submission. 
&lt;br&gt;&lt;br&gt;
Double submits may have fatal consequences. For instance, when submitting an online payment in which a credit card will be charged. 
&lt;br&gt;&lt;br&gt;
Users may click the submit button for a second time if the server's response time is too slow. This may result in his/her credit card being charged twice. 
&lt;br&gt;&lt;br&gt;
Other less critical examples include forms that add a new product and doubly submitting these forms will cause a product to be added twice causing inconsistencies in the database and inventory. 
&lt;br&gt;&lt;br&gt;
Fortunately Struts has built-in support for preventing double submits. It employs a technique that you can also find in other web application development technologies. 
&lt;br&gt;&lt;br&gt;
This technique involves storing a unique token in the server and inserting a copy of the token into a form. When the form is submitted, this token is also sent to the server. 
&lt;br&gt;&lt;br&gt;
The server application will compare the token with its own copy for the current user. If they match, form submission is considered valid and the token is reset. Subsequent (accidental) submits of the same form will fail because the token on the server have been reset. 
&lt;br&gt;&lt;br&gt;
This is the topic of the next slides.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Struts2 Course chapter 16: Preventing Double Submits&lt;/b&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter16-17-1-1#slide" title="Preventing Double Submits in Struts2" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-16-100407175645-phpapp02-thumbnail?1271433780" with="400" height="300" alt="Preventing Double Submits in Struts2"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;&lt;br&gt;
Download the eclipse ready example projects:
&lt;br&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter15-16-1-1#download" title="Preventing Double Submits in Struts2 code example" target="_blank"&gt;
Struts2 Course chapter 16: Preventing Double Submits code example
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-5375968657990667717?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/5375968657990667717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2010/01/struts2-course-chapter-16-preventing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5375968657990667717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5375968657990667717'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2010/01/struts2-course-chapter-16-preventing.html' title='Struts2 Course chapter 16: Preventing Double Submits'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-7964876311348399665</id><published>2009-12-28T00:45:00.014-05:00</published><updated>2010-05-07T13:22:43.453-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Custom Result Types'/><title type='text'>Struts2 course chapter 15: Custom Result Types</title><content type='html'>&lt;div align="justify"&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.roseindia.net/struts/struts2/processing.gif"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 280px; height: 240px;" src="http://www.roseindia.net/struts/struts2/processing.gif" border="0" alt="" /&gt;&lt;/a&gt;
Struts2 comes with a dozen or more result types, for example: Dispatcher Result, Redirect Result, Chain Result, XSL Result, etc. These results cover the majority of our necesities.
&lt;br&gt;&lt;br&gt;
However, what happen if I need a new type of result type? for ejample an Json reult type to deal with Ajax clients? or a Image result?. In these cases, we need to imlement our own results and in the next slides we will show how to make our own custom interceptors.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Struts2 course chapter 15: Custom Result Types&lt;/b&gt;&lt;br&gt;

&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter15-16-1-1#slide" title="Custom Result Type in Struts2" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-15-100407175051-phpapp01-thumbnail?1271433651" with="400" height="300" alt="Custom Result Type in Struts2"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;&lt;br&gt;
Download the code example (yes is file 16):
&lt;br&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter15-16-1-1#download" title="Struts2 Model Driven and Prepare Interceptors code example" target="_blank"&gt;
Struts2 course chapter 10: Model Driven and  Prepare Interceptors code example
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-7964876311348399665?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/7964876311348399665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/12/struts2-course-chapter-15-custom-result.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/7964876311348399665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/7964876311348399665'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/12/struts2-course-chapter-15-custom-result.html' title='Struts2 course chapter 15: Custom Result Types'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-5704559308099990803</id><published>2009-12-28T00:34:00.015-05:00</published><updated>2010-05-04T23:32:53.245-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Custom Interceptors'/><title type='text'>Struts2 Course chapter 14: Custom Interceptors</title><content type='html'>&lt;div align="justify"&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.roseindia.net/struts/struts2/processing.gif"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 300px; height: 250px;" src="http://www.roseindia.net/struts/struts2/processing.gif" border="0" alt="" /&gt;&lt;/a&gt;
Struts2 comes with a rich set of default interceptors. For example, there is the input validation that is handled by the Validation interceptor. Unplug this interceptor and validation will stop working. 
&lt;br&gt;&lt;br&gt;
File upload is so easy beacuse of another interceptor, the File Upload interceptor. Some interceptors may prevent from the execution of an action if certain conditions are not met. For instance, the Validation interceptor keeps an action from firing if an error occurs during the validation of that action.
&lt;br&gt;&lt;br&gt;
For most applications, the default interceptors are sufficient. However, sometimes  you will need to create your own interceptor. This chapter explains how to create custom interceptors.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;Struts2 Course chapter 14: Custom Interceptors&lt;/b&gt;&lt;br&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter14-15-1-1#slide" title="Custom Interceptors in Struts2" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-14-100407174157-phpapp01-thumbnail?1270769303" with="400" height="300" alt="Custom Interceptors in Struts2"&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;&lt;br&gt;

Download the code example (yes is file 15)::
&lt;br&gt;&lt;br&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter14-15-1-1#download" target=_blank&gt;Custom Interceptors in Struts2&lt;/a&gt;


&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-5704559308099990803?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/5704559308099990803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/12/struts2-course-chapter-14-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5704559308099990803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5704559308099990803'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/12/struts2-course-chapter-14-custom.html' title='Struts2 Course chapter 14: Custom Interceptors'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-3321007586548989782</id><published>2009-11-17T11:44:00.004-05:00</published><updated>2010-05-04T23:30:00.426-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Securing Struts2 applications in tomcat'/><title type='text'>Struts2 course chatper 13: Securing Struts2 applications</title><content type='html'>&lt;div align="justify"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Zi4Lw8CNvFg/SwLQqDHcfbI/AAAAAAAAAeo/6GHsaaUpogY/s1600/struts2-servlet-http.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 195px;" src="http://1.bp.blogspot.com/_Zi4Lw8CNvFg/SwLQqDHcfbI/AAAAAAAAAeo/6GHsaaUpogY/s200/struts2-servlet-http.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5405111923607633330" /&gt;&lt;/a&gt;Security is one of the most critical features in web application development. However, as I said before, Struts2 is the C (controller) in the MVC (model - view - controller) framework. As such, Struts2 has not its own security model. Struts2 is build on the top of the Java Servlet API and the HTTP protocol. Then, the security configuration is the same described for the Servlet API. Yet, other security models such as ACEGI can be implemented with Struts2, but this will be exposed in a future post.
&lt;br&gt;&lt;br&gt;

In the next slides I will discuss about the two ways to secure application resources:
&lt;ul&gt;
&lt;li&gt;by configuring the application and &lt;/li&gt;
&lt;li&gt;by writing Java code. &lt;/li&gt;
&lt;/ul&gt;
The first is the easier because you only need to edit your deployment descriptor (the web.xml file) to change your security policy without rewriting code. For instance, you can restrict access to certain roles and HTTP methods, determine how users can authenticate themselves, and so forth. Since Struts is based on the Servlet technology, securing a Struts application will center on this configuration plus the security feature in Struts itself. 
&lt;br&gt;&lt;br&gt;
Remember that to be good at security configuration, you need to be familiar with the concepts of principal and roles, therefore this chapter will start with a review of both. Then, the chapter explains how to write a security policy and deals with authentication methods. 
&lt;br&gt;&lt;br&gt;
After a section about how to hide resources and another on Struts-specific security features, these slides concludes with the second way of security Servlet applications: by writing code and by the use the Struts2 roles interceptor. 

&lt;br&gt;&lt;br&gt;

&lt;b&gt;Struts2 course chatper 13: Securing Struts2 applications&lt;/b&gt;&lt;br&gt;

&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter13-14-1-1#slide" title="Securing Struts2 applications" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-13-100407173737-phpapp02-thumbnail?1270769309" with="400" height="300" alt="Securing Struts2 applications in Tomcat"&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;br&gt;&lt;br&gt;
&lt;b&gt;Downloads (in &lt;a target="_blank" href="http://www.eclipse.org"&gt;Eclipse&lt;/a&gt; project)&lt;/b&gt;
&lt;br&gt;&lt;br&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.jeetrainers.com/struts2-course/chapter13-14-1-1#download" target=_blank&gt;Securing Struts2 applications&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-3321007586548989782?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/3321007586548989782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/11/struts2-course-chatper-13-securing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/3321007586548989782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/3321007586548989782'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/11/struts2-course-chatper-13-securing.html' title='Struts2 course chatper 13: Securing Struts2 applications'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Zi4Lw8CNvFg/SwLQqDHcfbI/AAAAAAAAAeo/6GHsaaUpogY/s72-c/struts2-servlet-http.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-7871138046333751973</id><published>2009-11-08T19:41:00.011-05:00</published><updated>2010-05-04T23:25:41.249-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='File upload and File download'/><title type='text'>Struts2 course chapter 12: File upload and File download</title><content type='html'>&lt;div align="justify"&gt;File upload and file download are common activities of Internet users and these features are usually not well covered in programming books. Struts supports those both features with elegance and easiness.
&lt;br&gt;&lt;br&gt;
Before Struts2 to manage file upload or file download  you would have to deall with the getInputStream method on HttpServletRequest and parse the resulting InputStream object to retrieve the uploaded file. This is a tedious and error-prone task. 
&lt;br&gt;&lt;br&gt;
Luckily, Struts2 makes it very easy to retrieve uploaded files. Indeed, Struts make extensive use of the Java Commons FileUpload library and the File Upload interceptor for file uploading. For file downloading Struts2 makes use of the Stream result type. 
&lt;br&gt;&lt;br&gt;
In the both aforementioned cases Struts2 allow you to make declarative and programmatic implementations providing in this way simplicity with flexibility when you develop these features.
&lt;br&gt;&lt;br&gt;

&lt;b&gt;Struts2 course chapter 12: File upload and File download&lt;/b&gt;
&lt;br&gt;&lt;br&gt;

&lt;br&gt;&lt;br&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter12-13-1-1#slide" title="Struts2 File upload and File download" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-12-100407173212-phpapp01-thumbnail?1270769326" with="400" height="300" alt="Struts2 File upload and File download"&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;br&gt;&lt;br&gt;
&lt;b&gt;Downloads projects in eclipse formats&lt;/b&gt;
&lt;br&gt;&lt;br&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter12-13-1-1#download" target=_blank&gt;Struts2 File upload and File download&lt;/a&gt;
&lt;br&gt;


&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-7871138046333751973?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/7871138046333751973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/11/struts2-course-chapter-12-file-upload.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/7871138046333751973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/7871138046333751973'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/11/struts2-course-chapter-12-file-upload.html' title='Struts2 course chapter 12: File upload and File download'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-4633026128432014522</id><published>2009-11-08T19:37:00.007-05:00</published><updated>2010-08-04T16:21:29.776-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='Databases and Persistence'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Access Object'/><category scheme='http://www.blogger.com/atom/ns#' term='The Persistence Layer'/><title type='text'>Struts2 course chapter 11: The Persistence Layer</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:Model_view_controller.png" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/10/Model_view_controller.png/300px-Model_view_controller.png" alt="Model view controller" style="font-size:0.8em;border:none;" width="300" height="172" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:Model_view_controller.png"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;Struts2 is a MVC framework where it solves only the C (controller) side of the equation. This means that the developer must implement the V (the view) and the M (the model). Although Struts2 offers OGNL for the V layer, Struts2 is agnostic regarding the M layer. Therefore, we as developers have to implement this layer.


&lt;br/&gt;&lt;br/&gt;
To implement the Model layer you can find many alternatives, &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Java_Database_Connectivity" title="Java Database Connectivity" rel="wikipedia"&gt;JDBC&lt;/a&gt;, JPA (Java Persistence API), JDO (&lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Java_Data_Objects" title="Java Data Objects" rel="wikipedia"&gt;Java Data Objects&lt;/a&gt;), etc. In this slide I will use a common denominator implementation that is the &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Data_access_object" title="Data access object" rel="wikipedia"&gt;Data Access Object&lt;/a&gt; (DAO) pattern, that the easiest to learn and is sufficient in most applications. Even though I will use JDBC in the examples in the sake of simplicity, it is easy to switch to other persistence framework.

&lt;br/&gt;&lt;br/&gt;


&lt;b&gt;Struts2 course chapter 11: The Persistence Layer&lt;/b&gt;

&lt;br/&gt;&lt;br/&gt;



&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter11_persistence-12-1-1#slide" title="Struts2 Persistence Layer" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-11-100407170653-phpapp01-thumbnail?1270767616" with="400" height="300" alt="Struts2 Persistence Layer" /&gt;
&lt;/a&gt;
&lt;/div&gt;


&lt;br/&gt;&lt;br/&gt;



&lt;b&gt;Downloads in eclipse projects&lt;/b&gt;

&lt;br/&gt;&lt;br/&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter11_persistence-12-1-1#download" title="Struts2 Model Driven and Prepare Interceptors" target="_blank"&gt;
Struts2 course chapter 11: Struts2 Persistence Layer
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;/div&gt;&lt;div class="zemanta-related"&gt;&lt;h6 class="zemanta-related-title" style="font-size:1em;margin:1em 0 0 0;"&gt;Related articles by Zemanta&lt;/h6&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://java.sys-con.com/node/1428021"&gt;Managing Persistent Entities with the JPA Persistence Entity Editor&lt;/a&gt; (java.sys-con.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://apache.sys-con.com/node/1428021"&gt;Managing Persistent Entities with the JPA Persistence Entity Editor&lt;/a&gt; (apache.sys-con.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://java.sys-con.com/node/1469182"&gt;Exploring Persistence Settings - Part 5&lt;/a&gt; (java.sys-con.com)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=f7bf3869-9b7c-4ec9-bc42-f5c9f9060f0a" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-4633026128432014522?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/4633026128432014522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/11/struts2-course-chapter-11-persistence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/4633026128432014522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/4633026128432014522'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/11/struts2-course-chapter-11-persistence.html' title='Struts2 course chapter 11: The Persistence Layer'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-3044357950726560211</id><published>2009-10-26T16:46:00.009-05:00</published><updated>2010-08-04T16:16:51.311-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='Model Driven and  Prepare Interceptors'/><title type='text'>Struts2 course chapter 10: Model Driven and  Prepare Interceptors</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:Business_logic_layers.jpg" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/86/Business_logic_layers.jpg/300px-Business_logic_layers.jpg" alt="The three business logic layers used in the Do..." style="font-size:0.8em;border:none;" width="300" height="270" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:Business_logic_layers.jpg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;In this slide i will explain one of the most powerful &lt;a class="zem_slink" href="http://struts.apache.org/" title="Apache Struts" rel="homepage"&gt;struts2&lt;/a&gt; features. the Model Driven and the Prepare interceptors. These interceptors help with the separation of the action and the model. But the main utility is the automatic population of the properties of the action and transfer objects. No more setters and getter in the middle. That is done by the framework.


&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;Separating the Action and the Model&lt;/b&gt;

&lt;br/&gt;&lt;br/&gt;


Web applications are normally multi-tiered. They are the presentation tier, the logic tier, and the data tier. Communication between two tiers is conducted by invoking methods and passing data in the form of &lt;b&gt;transfer objects&lt;/b&gt;. Also known as the &lt;b&gt;value object&lt;/b&gt;,  this transfer object is simple and has no business methods.

&lt;br/&gt;&lt;br/&gt;

In fact, there is a pattern that governs the design and use of transfer objects:&lt;b&gt; the &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Data_transfer_object" title="Data transfer object" rel="wikipedia"&gt;Data Transfer Object&lt;/a&gt; (DTO) pattern&lt;/b&gt;. Struts resides mainly in the presentation tier and since you can write &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Business_logic" title="Business logic" rel="wikipedia"&gt;business logic&lt;/a&gt; in Struts actions, you can argue that Struts encapsulates the logic tier too.

&lt;br/&gt;&lt;br/&gt;

However, in an enterprise application, it is not recommendable to write business logic in action classes. Rather, you should call methods in another tier from your action classes. You should do this, even though the Struts actions have methods and properties and can definitely act as a transfer object.
&lt;br/&gt;&lt;br/&gt;


However, why not is appropriate to send an action object to another tier? Because an action class has methods that are useful only in the presentation tier. What would an execute method that returns "success" do in an EJB container, for example? Transferring an action object to another tier is not only awkward but could be dangerous too.


&lt;br/&gt;&lt;br/&gt;
This explain the need of a clear separation between the action and the model in an enterprise application that uses Struts as the front-end. There will be action classes that don't represent model objects and whose functions are limited to serve the presentation tier. The names of such action classes should end with Action.

&lt;br/&gt;&lt;br/&gt;

Model classes, on the other hand, should have no suffix. An action class that manages products should be called ProductAction whereas an instance of a Product class should be used as a transfer object that encapsulates information about a product.

&lt;br/&gt;&lt;br/&gt;

&lt;b&gt;The Model Driven Interceptor&lt;/b&gt;

&lt;br/&gt;&lt;br/&gt;

This interceptor helps to map form fields with the transfer object's properties and viceversa. In other words, Struts2 will populate automatically the content fro the form imputs in the DTO object and viceersa.
&lt;br/&gt;&lt;br/&gt;


&lt;b&gt;The Preparable Interceptor&lt;/b&gt;

&lt;br/&gt;&lt;br/&gt;

This interceptor helps to map data (from a database for example) fields with the transfer object's properties and viceversa. In other words, Struts2 will populate automatically the content from the source of data in the DTO object and viceersa.



&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;Struts2 course chapter 10: Model Driven and  Prepare Interceptors&lt;/b&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter10_model_driven_prepare_interceptors-11-1-1#slide" title="Struts2 Model Driven and Prepare Interceptors" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-10-100407170304-phpapp02-thumbnail?1270767594" with="400" height="300" alt="Struts2 Model Driven and Prepare Interceptors" /&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;

Download the eclipse project with the code sample
&lt;br/&gt;&lt;br/&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter10_model_driven_prepare_interceptors-11-1-1#download" title="Struts2 Model Driven and Prepare Interceptors" target="_blank"&gt;
Struts2 Model Driven and  Prepare Interceptors example
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;div class="zemanta-related"&gt;&lt;h6 class="zemanta-related-title" style="font-size:1em;margin:1em 0 0 0;"&gt;Related articles by Zemanta&lt;/h6&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://zef.me/878/why-java-sucks"&gt;Does Java Suck?&lt;/a&gt; (zef.me)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=d1a12713-9012-4336-8c69-ee2fcb5b4ae7" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-3044357950726560211?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/3044357950726560211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-10-model-driven.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/3044357950726560211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/3044357950726560211'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-10-model-driven.html' title='Struts2 course chapter 10: Model Driven and  Prepare Interceptors'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-5794176585883368505</id><published>2009-10-26T16:28:00.006-05:00</published><updated>2010-08-04T16:11:35.655-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internationalization and localization'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 Message Handling and Internationalization'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><title type='text'>Struts2 course chapter 9: Message Handling and Internationalization</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:JavaHamster.jpg" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/c/c0/JavaHamster.jpg" alt="JavaHamster" style="font-size:0.8em;border:none;" width="242" height="309" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:JavaHamster.jpg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;&lt;b&gt;Message handling&lt;/b&gt;



&lt;br/&gt;&lt;br/&gt;



Message handling is an important task in professional application. For example, it is almost always mandatory that text and messages be editable without source recompilation. In addition, nowadays it is often a requirement that an application be able to "speak" many languages.



&lt;br/&gt;&lt;br/&gt;



&lt;b&gt;Internationalization&lt;/b&gt;



&lt;br/&gt;&lt;br/&gt;



internationalization is a technique for application development that support multiple languages and data formats without having to rewrite programming logic. Internationalization is abbreviated &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Internationalization_and_localization" title="Internationalization and localization" rel="wikipedia"&gt;i18n&lt;/a&gt; because the word starts with an i and ends with an n, and there are 18 characters between the first i and the last n.



&lt;br/&gt;&lt;br/&gt;



&lt;b&gt;Localization&lt;/b&gt;



&lt;br/&gt;&lt;br/&gt;



Localization is a technique for adapting an internationalized application to support a specific locale. A locale is a specific geographical, political, or cultural region. An operation that takes a locale into consideration is said to be locale-sensitive. For example, displaying a date is locale-sensitive because the date must be in the format used by the country or region of the user. The 15th day of November 2005 is written as 11/15/2005 in the US, but printed as 15/11/2005 in Australia. Localization is abbreviated l10n because the word starts with an l and ends with an n and there are 10 letters between the l and the n.



&lt;br/&gt;&lt;br/&gt;



&lt;b&gt;Strus2 easy suport for messaging handling, I18n and i10n&lt;/b&gt;




&lt;br/&gt;&lt;br/&gt;


WIth Strus2 you can change visual text in an application quickly and easily. Java has built-in supports for internationalization and Struts makes use of this feature and has been designed from the outset to support easy message handling and internationalization. For instance, the com.opensymphony.xwork2.ActionSupport class, has getText methods for reading messages from a text file and selecting messages in the correct language. A custom tag can display a localized message simply by calling one of these methods.


&lt;br/&gt;&lt;br/&gt;





&lt;b&gt;Struts2 course chapter 9: Message Handling and Internationalization&lt;/b&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter9_message_handling_internationalization-10-1-1#slide" title="Struts2 Message Handling and Internationalization" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-09-100407165047-phpapp02-thumbnail?1270767562" with="400" height="300" alt="Struts2 Message Handling and Internationalization" /&gt;
&lt;/a&gt;
&lt;/div&gt;


&lt;br/&gt;&lt;br/&gt;





Download the example code in eclipse project


&lt;br/&gt;&lt;br/&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter9_message_handling_internationalization-10-1-1#download" title="Struts2 Message Handling and Internationalization" target="_blank"&gt;
Struts2 Message Handling and Internationalization
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;


 &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=6bfb9b52-5af1-472b-8bb5-48d4093f7664" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-5794176585883368505?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/5794176585883368505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-9-message_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5794176585883368505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5794176585883368505'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-9-message_26.html' title='Struts2 course chapter 9: Message Handling and Internationalization'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-2008765300687243567</id><published>2009-10-18T11:45:00.016-05:00</published><updated>2010-08-04T15:59:56.432-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='OGNL'/><category scheme='http://www.blogger.com/atom/ns#' term='Struts2 Type Conversion'/><title type='text'>Struts2 course chapter 7: Type Conversion</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:HTML.svg" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/84/HTML.svg/266px-HTML.svg.png" alt="A graphical despiction of a very simple html d..." style="font-size:0.8em;border:none;" width="266" height="310" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:HTML.svg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;When you transfer data from an HTML form to an action object, conversions are typically from strings to non-strings.
&lt;br/&gt;&lt;br/&gt;

All form inputs are sent to the server as request parameters and each form input is either a String or a String array. This because because HTTP is type neutral.
&lt;br/&gt;&lt;br/&gt;

The Struts 2 framework comes with built-in support for converting between the HTTP native strings and the following list of Java types:

&lt;ul&gt;
&lt;li&gt;String
Sometimes a string is just a string.&lt;/li&gt;
&lt;li&gt;boolean/Boolean

True and false strings can be converted to both primitive and object versions of Boolean.&lt;/li&gt;
&lt;li&gt;char/Character

Primitive or object.&lt;/li&gt;
&lt;li&gt;int/Integer, float/Float, long/Long, double/Double

Primitives or objects.&lt;/li&gt;
&lt;li&gt;Date

String version will be in SHORT format of current Locale (for example, 12/10/97).&lt;/li&gt;
&lt;li&gt;array

Each string element must be convertible to the array's type.&lt;/li&gt;
&lt;li&gt;List

Populated with Strings by default.&lt;/li&gt;
&lt;li&gt;Map

Populated with Strings by default.&lt;/li&gt;
&lt;/ul&gt;

Struts2 uses the parameters interceptor, one of the interceptors in the default stack, for mapping request parameters with action properties.

&lt;br/&gt;&lt;br/&gt;
Since all request parameters are Strings, and not all action properties are of type String, type conversions must be performed on any non-String action properties.

&lt;br/&gt;&lt;br/&gt;
The Parameters interceptor uses the &lt;a class="zem_slink" href="http://www.opensymphony.com/ognl" title="OGNL" rel="homepage"&gt;OGNL&lt;/a&gt; API to achieve this.

&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;What happened with failed conversions?&lt;/b&gt;
&lt;br/&gt;&lt;br/&gt;

On the other hand, a failed conversion will leave a property unchanged. In other words, int will retain the value of 0 and a Date property will remain null.

&lt;br/&gt;&lt;br/&gt;
If zero or null is a valid property value, there's no way you can find out that a conversion has produced an error other than by comparing the property value with the corresponding request parameter.
&lt;br/&gt;&lt;br/&gt;

Doing so, however, is not recommended. Not only is checking the request parameter an inelegant solution, it also defeats the purpose of using Struts as capable of mapping request parameters to action properties.
&lt;br/&gt;&lt;br/&gt;

&lt;b&gt;So, how does Struts solve this problem? &lt;/b&gt;

A failed &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Type_conversion" title="Type conversion" rel="wikipedia"&gt;type conversion&lt;/a&gt; will not necessarily stop Struts. There are two possible outcomes for this misbehavior. Which one will happen depends on whether or not your action class implements the com.opensymphone.xwork2.ValidationAware interface.
&lt;br/&gt;&lt;br/&gt;

If the action class does not implement this interface, Struts will continue by invoking the action method upon failed type conversions, as if nothing bad had happened.
&lt;br/&gt;&lt;br/&gt;

If the action class does implement ValidationAware, Struts will prevent the action method from being invoked. Rather, Struts will enquiry if the corresponding action element declaration contains an input result. If so, Struts will forward to the page defined in the result element. If no such result was found, Struts will throw an exception.

&lt;br/&gt;&lt;br/&gt;
&lt;h3&gt;Struts2 course chapter  7: Type conversion&lt;/h3&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter7_type_conversion-8-1-1#slide" title="Struts2 Type conversion" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-07-100407163037-phpapp02-thumbnail?1270767548" with="400" height="300" alt="Struts2 Type conversion" /&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;Download eclipse project&lt;/b&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter7_type_conversion-8-1-1#download" title="Struts2 Type conversion example" target="_blank"&gt;
Struts2 Type conversion sample code
&lt;/a&gt;


&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;div class="zemanta-related"&gt;&lt;h6 class="zemanta-related-title" style="font-size:1em;margin:1em 0 0 0;"&gt;Related articles by Zemanta&lt;/h6&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.slideshare.net/fabriziogiudici/web-development-with-apache-struts-2"&gt;Web Development with Apache Struts 2&lt;/a&gt; (slideshare.net)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;    &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=e8c4997d-96bb-4f6c-8ce9-5b7063cfe509" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-2008765300687243567?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/2008765300687243567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-7-type_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/2008765300687243567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/2008765300687243567'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-7-type_18.html' title='Struts2 course chapter 7: Type Conversion'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-3915870471069250829</id><published>2009-10-18T11:45:00.010-05:00</published><updated>2010-05-01T23:47:38.700-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Struts2  Input Validation'/><title type='text'>Struts2 course chapter  8: Input Validation</title><content type='html'>&lt;div align="justify"&gt;Struts makes input validation easy by providing built-in validators that are based on the XWork Validation Framework. By using these validators you won't require programming validation. Instead, you will declare in an XML file how a validator should work. Among the things to declare are what field needs to be validated and what message to send to the browser if a validation fails.
&lt;br&gt; &lt;br&gt;
However, in more complex scenarios, built-in validators can help little and you have to write code to validate input. This is called programmatic validation and, along with built-in validators, is discussed in this sessions. 
&lt;br&gt; &lt;br&gt;
The specific topics to cover in this session are:

&lt;ul&gt;
&lt;li&gt;Building Built-in validators&lt;/li&gt;
&lt;li&gt;Bundled Validators&lt;/li&gt;
&lt;li&gt;Visitor Validator&lt;/li&gt;
&lt;li&gt;Custom Validators&lt;/li&gt;
&lt;li&gt;Programmatic Validation&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Struts2 course chapter  8: Input Validation&lt;/h3&gt;
&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter8-9-1-1#slide" title="Struts2 Input Validation" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-08-100407164611-phpapp01-thumbnail?1270767563" with="400" height="300" alt="Struts2 Input Validation"&gt;
&lt;/a&gt;
&lt;/div&gt;


&lt;b&gt;Downloads&lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://www.jeetrainers.com/struts2-course/chapter8-9-1-1#download" title="Struts2 Input Validation" target="_blank"&gt;
Struts2 course chapter 8: Input Validation
&lt;/a&gt;

&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-3915870471069250829?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/3915870471069250829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-8-input_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/3915870471069250829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/3915870471069250829'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-8-input_18.html' title='Struts2 course chapter  8: Input Validation'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-5179405353728970752</id><published>2009-10-14T17:19:00.004-05:00</published><updated>2010-08-04T15:37:05.595-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Generic Tags'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><title type='text'>Struts2 course chapter 6: Generic Tags</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:Merge_sort_animation.gif" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/8/8e/Merge_sort_animation.gif" alt="Sorting a random list using merge sort" style="font-size:0.8em;border:none;" width="280" height="237" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:Merge_sort_animation.gif"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;Struts comes loaded with a powerful tag library that contains UI and non-UI tags. In this post we will take a look at the non-UI tags, which are also known as generic tags.There two types of generic tags, data tag and control tag. The following are the data tags:




&lt;ul&gt;
&lt;li&gt;a&lt;/li&gt;
&lt;li&gt;action &lt;/li&gt;
&lt;li&gt;bean &lt;/li&gt;
&lt;li&gt;date &lt;/li&gt;
&lt;li&gt;debug &lt;/li&gt;
&lt;li&gt;i18n &lt;/li&gt;
&lt;li&gt;include &lt;/li&gt;
&lt;li&gt;param &lt;/li&gt;
&lt;li&gt;push &lt;/li&gt;
&lt;li&gt;set &lt;/li&gt;
&lt;li&gt;text &lt;/li&gt;
&lt;li&gt;url &lt;/li&gt;
&lt;li&gt;property &lt;/li&gt;
&lt;/ul&gt;




The following are the control tags:




&lt;ul&gt;
&lt;li&gt;if &lt;/li&gt;
&lt;li&gt;elself &lt;/li&gt;
&lt;li&gt;else &lt;/li&gt;
&lt;li&gt;append &lt;/li&gt;
&lt;li&gt;generator &lt;/li&gt;
&lt;li&gt;iterator &lt;/li&gt;
&lt;li&gt;merge &lt;/li&gt;
&lt;li&gt;sort &lt;/li&gt;
&lt;li&gt;subset &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;Struts2 Course chapter 6: Generic Tags&lt;/h3&gt;

&lt;div align="center"&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter6_generic_tags-7-1-1#slide" title="Struts2 Generic Tags" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-06-100407161540-phpapp02-thumbnail?1270767546" with="400" height="300" alt="Struts2 Generic Tags" /&gt;
&lt;/a&gt;
&lt;/div&gt;





&lt;b&gt;Download eclipse project&lt;/b&gt;


&lt;a href="http://www.jeetrainers.com/course/struts2_chapter6_generic_tags-7-1-1#download" title="Struts2 Generic Tags" target="_blank"&gt;
Struts2 Generic Tags sample code
&lt;/a&gt;


 &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=90960e0c-1e0e-40ed-b465-9afc900b1e0f" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-5179405353728970752?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/5179405353728970752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-6-generic-tags.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5179405353728970752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5179405353728970752'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-6-generic-tags.html' title='Struts2 course chapter 6: Generic Tags'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-6690840991603229991</id><published>2009-10-14T17:18:00.005-05:00</published><updated>2010-08-04T15:58:12.773-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='User interface'/><category scheme='http://www.blogger.com/atom/ns#' term='Form Tags'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><title type='text'>Struts2 course chapter 5: Form Tags</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:Fehlerteufel.svg" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Fehlerteufel.svg/300px-Fehlerteufel.svg.png" alt="Fehlerteufel" style="font-size:0.8em;border:none;" width="300" height="300" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:Fehlerteufel.svg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;Struts comes with a powerful tag library that incorporates two kinds of tags: &lt;b&gt;User Interface (UI) tags&lt;/b&gt; and &lt;b&gt;non-UI tags&lt;/b&gt;. The UI tags are further categorized into two groups, those used for data entry and those for displaying error messages. The UI tags in the first group are called the form tags and are the subject of discussion of this post.


&lt;br/&gt;&lt;br/&gt;
The UI tags for displaying error messages are explained in a future post, in the "Input Validation." chapter. Non-UI tags help with control flow and data access and are covered in the next post, "Generic Tags." In addition, there are also tags that assist with AJAX programming and are discussed in the future

&lt;br/&gt;&lt;br/&gt;

The main advantage of using the form tags is when input validation fails and the form is returned to the user. With manual HTML coding, you have to worry about repopulating the input fields with the values the user previously entered. With the form tags, the framework is who take care of this for you.

&lt;br/&gt;&lt;br/&gt;

The tags to cover are:

&lt;br/&gt;
&lt;ul&gt;
&lt;li&gt;Form&lt;/li&gt;
&lt;li&gt;Label&lt;/li&gt;
&lt;li&gt;TextField&lt;/li&gt;
&lt;li&gt;TextArea&lt;/li&gt;
&lt;li&gt;CheckBox&lt;/li&gt;
&lt;li&gt;CheckBox2&lt;/li&gt;
&lt;li&gt;CheckBoxList&lt;/li&gt;
&lt;li&gt;ComboBox&lt;/li&gt;
&lt;li&gt;DoubleSelect&lt;/li&gt;
&lt;li&gt;OptGroup&lt;/li&gt;
&lt;li&gt;OptionTransferSelect&lt;/li&gt;
&lt;li&gt;Radio&lt;/li&gt;
&lt;li&gt;Select&lt;/li&gt;
&lt;li&gt;UpDownSelect&lt;/li&gt;
&lt;/ul&gt;

&lt;br/&gt;


&lt;h3&gt;Struts2 Course 5: Form Tags&lt;/h3&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter5_form_tags-6-1-1#slide" title="Struts2 Form Tags" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-05-100407161051-phpapp01-thumbnail?1270767402" with="400" height="300" alt="" /&gt;
&lt;/a&gt;

&lt;br/&gt;&lt;br/&gt;

&lt;b&gt;Download&lt;/b&gt;

&lt;br/&gt;&lt;br/&gt;

&lt;a href="http://www.jeetrainers.com/course/struts2_chapter5_form_tags-6-1-1#download" title="Struts2 Form Tags example" target="_blank"&gt;
Struts2 Form Tags Example code
&lt;/a&gt;

&lt;/div&gt;  

&lt;br/&gt;&lt;br/&gt;

&lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=5ac56c70-9ae0-42a9-907c-f4fd8dd468ee" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-6690840991603229991?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/6690840991603229991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-5-form-tags.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/6690840991603229991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/6690840991603229991'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-5-form-tags.html' title='Struts2 course chapter 5: Form Tags'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-6526048409668550465</id><published>2009-10-10T12:35:00.006-05:00</published><updated>2010-08-04T15:56:34.774-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='OGNL'/><title type='text'>Struts2 course chapter 4: OGNL - Object graph notation language</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://en.wikipedia.org/wiki/File:Struts.gif" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/en/c/c2/Struts.gif" alt="logo" style="font-size:0.8em;border:none;" width="244" height="86" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://en.wikipedia.org/wiki/File:Struts.gif"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div align="justify"&gt;&lt;a class="zem_slink" href="http://www.opensymphony.com/ognl" title="OGNL" rel="homepage"&gt;OGNL&lt;/a&gt; stands for the Object-Graph Navigation Language. In despite of its name,  OGNL is a simple and powerful technology that's been integrated into the Struts 2 framework to help with data transfer and &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Type_conversion" title="Type conversion" rel="wikipedia"&gt;type conversion&lt;/a&gt;.

&lt;br/&gt;&lt;br/&gt;
OGNL is the glue between the framework's string-based HTTP input and output and the Java-based internal processing. While it seems that you can use the framework without really knowing about OGNL, your development efforts will be made many times more efficient by spending a few moments with this oddly named power utility.

&lt;br/&gt;&lt;br/&gt;
From the point of view of a developer building applications on the Struts 2 framework, OGNL consists of two things: an &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Expression_Language" title="Expression Language" rel="wikipedia"&gt;expression language&lt;/a&gt; and type converters.
&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;div align="center"&gt;
&lt;h3&gt;OGNL: Object graph notation language&lt;/h3&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter4_ognl-5-1-1#slide" title="OGNL (Object graph notation language)" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-04-100407115010-phpapp02-thumbnail?1270767406" with="400" height="300" alt="OGNL (Object graph notation language)" /&gt;
&lt;/a&gt;
&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;Downloads&lt;/b&gt;&lt;br/&gt;


&lt;a href="http://www.jeetrainers.com/course/struts2_chapter4_ognl-5-1-1#download" title="OGNL (Object graph notation language)" target="_blank"&gt;
Struts2 course chapter 4: OGNL (Object graph notation language)
&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;div class="zemanta-related"&gt;&lt;h6 class="zemanta-related-title" style="font-size:1em;margin:1em 0 0 0;"&gt;Related articles by Zemanta&lt;/h6&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://java.dzone.com/articles/best-java-tools-you-never-knew"&gt;The Best Java Tools You Never Knew Existed | Javalobby&lt;/a&gt; (java.dzone.com)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=a4ab70f2-484c-430c-aaab-b620252f8394" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-6526048409668550465?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/6526048409668550465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-4-ognl-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/6526048409668550465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/6526048409668550465'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-4-ognl-object.html' title='Struts2 course chapter 4: OGNL - Object graph notation language'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-5569686197966661912</id><published>2009-10-10T12:26:00.009-05:00</published><updated>2010-08-04T15:55:13.215-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 results'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 actions'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><category scheme='http://www.blogger.com/atom/ns#' term='actions'/><title type='text'>Struts2 course chapter 3: Actions and results</title><content type='html'>&lt;div align="center"&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://struts.apache.org/2.0.14/docs/big-picture.data/Struts2-Architecture.png"&gt;&lt;img style=" margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 300px; height: 350px;" src="http://struts.apache.org/2.0.14/docs/big-picture.data/Struts2-Architecture.png" border="0" alt="" /&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;div align="justify"&gt;Actions are the units of work of the framework. Essentially, the action maps an identifier to a handler class. When a request matches the action's name, the framework uses the mapping to determine how to process the request.


&lt;br/&gt;&lt;br/&gt;
Results are the response of the framework to indicate what view will be rendered to the user. If there are a few type of actions, there are many types of results . All of them will be covered here in the slides below.

&lt;br/&gt;&lt;br/&gt;

In the following slides you will read more about actions and results in detail with several examples.

&lt;br/&gt;&lt;br/&gt;

&lt;h3&gt;Struts2 course chapter 3: Actions and results&lt;/h3&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter3_action_results-4-1-1#slide" title="Struts2 Actions and Results" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-03-100405205924-phpapp01-thumbnail-2?1272337106" with="400" height="300" alt="Struts2 Actions and Results" /&gt;
&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;p&gt;
&lt;b&gt;Downloads&lt;/b&gt;
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter3_action_results-4-1-1#download" title="Struts2 Actions and Results" target="_blank"&gt;
Struts2 Actions and Results sample code
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;/div&gt;&lt;div class="zemanta-related"&gt;&lt;h6 class="zemanta-related-title" style="font-size:1em;margin:1em 0 0 0;"&gt;Related articles by Zemanta&lt;/h6&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.webdesignish.com/the-best-web-development-frameworks.html"&gt;The Best Web Development Frameworks&lt;/a&gt; (webdesignish.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.slideshare.net/williverson/choosing-a-javawebframework"&gt;Choosing a java_web_framework&lt;/a&gt; (slideshare.net)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://checkedexception.blogspot.com/2010/04/why-you-should-not-use-web-framework.html"&gt;Why you should NOT use a web framework&lt;/a&gt; (checkedexception.blogspot.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.slideshare.net/fabriziogiudici/web-development-with-apache-struts-2"&gt;Web Development with Apache Struts 2&lt;/a&gt; (slideshare.net)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=6205414d-189a-4717-9029-bc028cf9cf61" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-5569686197966661912?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/5569686197966661912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-3-actions-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5569686197966661912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/5569686197966661912'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-3-actions-and.html' title='Struts2 course chapter 3: Actions and results'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-243344563283983100</id><published>2009-10-04T20:46:00.005-05:00</published><updated>2010-08-04T15:54:15.159-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='struts2 tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Web application'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 installation'/><title type='text'>Struts2 course chapter 2: Installation and configuration</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://en.wikipedia.org/wiki/File:Struts.gif" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/en/c/c2/Struts.gif" alt="logo" style="font-size:0.8em;border:none;" width="244" height="86" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://en.wikipedia.org/wiki/File:Struts.gif"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;I this chapter I will explain how to install and configure Struts2. In fact, Installing and configuring Struts is pretty strightforward. As of the version 2.6.x of Struts2 just download the binary files from &lt;a href="http://struts.apache.org/download.cgi#struts217"&gt;http://struts.apache.org/download.cgi#struts217&lt;/a&gt; and drop in the classpath of the server or the one of the web application.

See the details in the slide below:


&lt;br/&gt;&lt;br/&gt;

&lt;h3&gt;Struts2 course chapter 2: Installation and configuration&lt;/h3&gt;

&lt;a href="ttp://www.jeetrainers.com/course/struts2_chapter2_installation_configuration-3-1-1#slide" title="Struts2 installation and configuration" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-02-100405204851-phpapp01-thumbnail?1270767758" with="400" height="300" alt="" /&gt;
&lt;/a&gt;

&lt;br/&gt;&lt;br/&gt;


&lt;p&gt;
&lt;b&gt;Download the ready to use eclipse projects&lt;/b&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="ttp://www.jeetrainers.com/course/struts2_chapter2_installation_configuration-3-1-1#download" title="Struts2 installation and configuration" target="_blank"&gt;
Struts2 course chapter 2: installation and configuration sample code
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;br/&gt;&lt;br/&gt;

&lt;/div&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=5a7b36d4-a61e-4de3-80b9-815b12c5ed3e" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-243344563283983100?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/243344563283983100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-2-installation_04.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/243344563283983100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/243344563283983100'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-2-installation_04.html' title='Struts2 course chapter 2: Installation and configuration'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3580268113024111385.post-8687624734773258013</id><published>2009-10-04T20:43:00.014-05:00</published><updated>2010-08-04T15:53:34.638-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='struts2 tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 introduction'/><category scheme='http://www.blogger.com/atom/ns#' term='struts2 course'/><category scheme='http://www.blogger.com/atom/ns#' term='struts tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='mvc'/><category scheme='http://www.blogger.com/atom/ns#' term='modelview controller'/><title type='text'>Struts2 course chapter 1: Evolution of web applications</title><content type='html'>&lt;p class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/File:ModelViewControllerDiagram.svg" style="margin-left: 1em; margin-right: 1em; display: block; float:right; clear: right;"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/ModelViewControllerDiagram.svg/300px-ModelViewControllerDiagram.svg.png" alt="A simple diagram depicting the relationship be..." style="font-size:0.8em;border:none;" width="300" height="141" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="margin-left: 1em; margin-right: 1em; clear: both; float: right;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/File:ModelViewControllerDiagram.svg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;This is the first of a series of slides trying of spread the word about Struts2, a powerful, easy to use, but still unknown MVC framework for most the Java developers.


&lt;br/&gt;&lt;br/&gt;
You should already know that Struts is the most popular framework for developing Java web applications. However, with the years, this framework has became short of features to meet the emerging paradigms of computer programming such as dependency injection, aspect oriented programming, REST, etc. Struts2 include these features and more, but some training is necessary. Thus, in the following weeks I will try to synthesize the most important aspects of this framework.


&lt;br/&gt;&lt;br/&gt;
I must say that Struts 2 is not only a new version of the popular Struts framework but it is a brand-new, state-of-the-art web application framework. In includes the following advantages:

&lt;br/&gt;

&lt;ul&gt;
&lt;li&gt;Is based on Java and therefore you can use your former Java talent pool&lt;/li&gt;
&lt;li&gt;Is uses the convention over configuration paradigm&lt;/li&gt;
&lt;li&gt;Is uses dependency injection (DI)&lt;/li&gt;
&lt;li&gt;It uses aspect oriented programming (AOP)&lt;/li&gt;
&lt;li&gt;Easy testability &lt;/li&gt;
&lt;li&gt;Easy extensibility (plug-ins)&lt;/li&gt;
&lt;li&gt;Portal support&lt;/li&gt;
&lt;li&gt;AJAX support&lt;/li&gt;
&lt;li&gt;Intelligent defaults&lt;/li&gt;
&lt;li&gt;Among others.&lt;/li&gt;
&lt;/ul&gt;

&lt;br/&gt;

One of the best things about Struts2 is that you do not need to be an expert of the last paradigms of computer programming such as DI or AOP and take advantage of them. Struts2 includes them inside the framework.

&lt;br/&gt;&lt;br/&gt;

In summary, Struts 2 isn't just a new release of the older Struts 1 framework. It is a completely re-engineering new framework, based on the OpenSymphony WebWork framework.

&lt;br/&gt;&lt;br/&gt;

In this chapter I will explain about the evolution of the MVC framework and its different implementations and comparing them:

&lt;ul&gt;&lt;li&gt;Life without MVC&lt;/li&gt;&lt;li&gt;Using the mediator pattern&lt;/li&gt;&lt;li&gt;MVC model 1&lt;/li&gt;&lt;li&gt;MVC model 2&lt;/li&gt;&lt;li&gt;Struts1 implementation of MVC2&lt;/li&gt;&lt;li&gt;Struts2 implementation of MVC2&lt;/li&gt;&lt;/ul&gt;

&lt;br/&gt;&lt;br/&gt;
&lt;h3&gt;Struts2 Course Chapter 1: Evolution of web applications&lt;/h3&gt;

&lt;a href="http://www.jeetrainers.com/course/struts2_chapter1_wep_applications-2-1-1#slide" title="Struts2 Course Chapter 1: Evolution of web applications" target="_blank"&gt;
&lt;img src="http://cdn.slidesharecdn.com/struts2-course-01-100403134410-phpapp02-thumbnail-2" with="400" height="320" alt="Struts2 Course Chapter 1: Evolution of web applications" /&gt;
&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;


&lt;p&gt;
&lt;b&gt;Download the ready to use eclipse projects&lt;/b&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.jeetrainers.com/course/struts2_chapter1_wep_applications-2-1-1#download" title="Dwonload Chapter 1: Evolution of web applications" target="_blank"&gt;
Evolution of web applications sample code
&lt;/a&gt;

&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=d51d4b17-f417-4ef3-9ecd-47e1f480d89a" alt="Enhanced by Zemanta" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3580268113024111385-8687624734773258013?l=javaee-trainer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaee-trainer.blogspot.com/feeds/8687624734773258013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-1-evolution-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/8687624734773258013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3580268113024111385/posts/default/8687624734773258013'/><link rel='alternate' type='text/html' href='http://javaee-trainer.blogspot.com/2009/10/struts2-course-chapter-1-evolution-of.html' title='Struts2 course chapter 1: Evolution of web applications'/><author><name>Marcelo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://bp2.blogger.com/_Zi4Lw8CNvFg/SB6zP_5TuyI/AAAAAAAAAPo/oNoT4X_RqV4/S220/blog-photo-03.jpg'/></author><thr:total>0</thr:total></entry></feed>
