WanTii, Inc. Tech Blog

Discussion of Java on the Web Server…

Archive for the 'Struts 2' Category

Writing and Configuring Struts2 Actions (Part 2)

July 11th, 2007 by Wes Wannemacher

In the last post, I presented an in-depth example of a very simple Struts2 Action. Although this may have been helpful to some, there is much more that can be done with actions. The important aspect of the last example is to understand that Struts2 Actions are simple POJOs. Having your UI built around simple objects allows you to create code that is much easier to maintain. Simple classes are easier to unit test, easier to enhance, and easier to debug. In this post, I will show you that this simplicity carries through even for advanced aspects of using Struts2 Actions. Read the rest of this entry »

Category: Java, Struts 2 | 18 Comments »

Writing and Configuring Struts2 Actions (Part 1)

July 7th, 2007 by Wes Wannemacher

The core component of the Struts2 framework is the Action. If you are unfamiliar with the Model 2 or MVC pattern, take a moment to read my previous post on the subject. The action is where you glue your business layer to your web-app. What does that mean, glue your business layer to your web-app? Well, if you have followed the guidelines of the Model 2 pattern, you will have created a separate set of classes to handle your business logic. Since this set of classes does not have any dependence on the the JSP/Servlet API, or any dependence on the API of the framework you have chosen (Struts2), then these classes need to be integrated into the web-app. To integrate these classes, you will use these classes in your actions. Read the rest of this entry »

Category: Java, Struts 2 | 34 Comments »

Getting Started with Struts2 (Part 3)

July 3rd, 2007 by Wes Wannemacher

So I have talked and talked in the previous entries without showing any code examples. Finally, it is time to start looking at code. I apologize for waiting this long, but in my defense, the Struts 2.x framework is complex and without thorough coverage, I would not be doing it justice. Read the rest of this entry »

Category: Java, Struts 2 | 17 Comments »

Getting Started with Struts2 (Part 2)

July 2nd, 2007 by Wes Wannemacher

At this point, you may have read the first part of the series and thought, “Well… That’s nice, but it doesn’t really help me create a Struts2-based web-app.” If you were hoping to read that post and then go and create the next flickr.com, then I apologize. In case you have not figured it out yet, Struts2 is a complex framework. On the Strut2 mailing list, I constantly here people asking, “Where do I start?” My hope is that this series will give people an answer to that question. But, getting started is tougher than it sounds. Read the rest of this entry »

Category: Java, Struts 2 | 4 Comments »

Getting Started with Struts2 (Part 1)

July 1st, 2007 by Wes Wannemacher

To start a Struts2-based project, it is as easy as downloading the appropriate WAR file from the Struts website (http://struts.apache.org) and importing it into the chosen development environment. The choice of developer platform is strictly a matter of preference. Personally, I enjoy using Eclipse Webtools combined with the Websphere AppServer Community Edition. Eclipse Webtools has a nifty ‘Import WAR’ utility that will setup the Struts2 template WAR files rather nicely. Read the rest of this entry »

Category: Java, Struts 2 | 19 Comments »

Struts2 and Model 2

July 1st, 2007 by Wes Wannemacher

Why Struts?

Any seasoned web application developer will say that every time a new framework is released, there are bound to be zealots touting the merits of said framework. Typically, a language or framework evolves because the core designer becomes frustrated with the state of affairs of the reigning platforms. Web application development is difficult because developers need many unique skills to create an application or site that people want to use. Often times customers or users are attracted by good aesthetics and miss the advanced functionality. Conversely, when users adopt a system that is attractive to the eyes, these same users will eventually complain of the lack of features or the slowness with which some components load. Read the rest of this entry »

Category: Opinion, Struts 2 | 11 Comments »