Quantcast

Ben McCann

Co-founder at Connectifier.
ex-Googler. CMU alum.

Ben McCann on LinkedIn Ben McCann on AngelList Ben McCann on Twitter

Struts 2

Using the Guice Struts 2 plugin

03/29/2011

Guice 3.0 was released a few days ago!  One of the easiest ways to use it in your web server is to use Struts 2 with the Struts 2 plugin, which is available in the central Maven repository. This tutorial assumes familiarity with Guice and Struts 2. In order to use it the plugin, your Read More

Google GXP Struts 2 Plugin

02/02/2011

Google GXP is a replacement for JSP that provides compile-time type safety.  This article is a quick introduction on how to use GXP with Struts 2.   1. Download the jar.  It’s not in Maven yet because it’s still unreleased.   2. Install the jar in Maven or otherwise put it on your classpath.  You’ll Read More

Embedded Jetty

01/19/2011

One of the coolest things about Jetty is the ability to run it in embedded mode.  This means that you can write a Java app with a main method that will launch a Jetty server.  This has some really nice benefits.  For example, it makes it really easy to deploy a server to EC2 because Read More

Using Struts 2 on Google App Engine

12/20/2009

Google App Engine (GAE) has some great benefits such as scalability and the fact that it’s free to start.  When using Struts 2 with Google App Engine there a few things to keep in mind. The first is that it runs inside a security sandbox that is more restrictive than your typical Java environment.  This Read More

Struts 2 Tutorial – Struts Configuration

09/20/2008

The struts.xml file defines the relationship between actions and .jsp views, the inclusion of interceptors, and possible result types.  It’s essential that you be able to handle at least basic configuration changes, so we’ll demonstrate the most important and frequently used below. Packages: Extension, Namespaces, and More For more complex applications, you will likely want Read More

Struts 2 Tutorial – Interceptors

09/19/2008

Interceptors are my favorite aspect of Struts 2. They inspect and/or act on a user’s request. There are three main uses cases that I’ll discuss here: intercepting before the action, between the action and view, and after the view. At the end, I’ll show you how to add your brand spankin’ new interceptor to your Read More

Struts 2 Tutorial – Creating Views

09/09/2008

One of the first things you’ll want to do after getting started with Struts 2 is create more complex user interfaces. We call the UI a view because Struts2 makes use of the Model-View-Controller (MVC) design pattern.  For this example, let’s assume we have an action that returns a list of all the employees at Read More

Struts 2 Tutorial – Getting Started

09/08/2008

Struts 2 is an MVC web development framework.  It is based off of Web Work and has far less configuration than the original Struts.  I would strongly recommend Struts 2 over Struts for new development due to the faster development times it allows.  This is a very simple example and follow up posts will be Read More