Use Apache Struts skills to underpin Java web careers

Hot skills: Versatile framework is used in many environments

What is it?

Apache Struts is a free open source framework for creating J2EE (Java 2 Enterprise Edition) web applications, which uses and extends the Java Servlet application programming interface. It is probably the most widely used application framework for Java.

According to the Apache Foundation, it is called Struts because, "The framework is meant to furnish the invisible underpinnings that support professional application development the missing pieces we need to create enterprise-grade applications that are easy to maintain over time."

Like other frameworks, Struts imposes a consistent approach to web application development, but this involves a longer learning curve for the development team - which is more than made up for by the savings in maintenance.

Struts has also been criticised for being inflexible and discouraging other approaches, but its developers are addressing this with each release.

Struts can be used in conjunction with development technologies such as Soap and Ajax, and with most Java integrated development environments.

Where did it originate?

Struts was created as an open source project by Craig McClanahan, who was working for Sun Microsystems when he donated it to the Apache Foundation. It was formerly known as Jakarta Struts.

What's it for?

Web applications based on Java Server Pages (JSP) sometimes mix database code, page design code and control flow code, which can make large applications difficult to maintain. Struts separates them by using the Model-View-Controller (MVC) architecture, originally developed for the Smalltalk language.

The Model represents the business or database code, the View represents the page design code (HTML), and the Controller represents the navigational code. Templates for the view layer are usually done with JSP, but XML/XSLT is also supported.

The web application programmer writes the Model code, and creates a central configuration file, which binds together Model, View and Controller.

What makes it special?

Struts can be used with any development environment, including Idea, Eclipse, and Netbeans.

How difficult is it to master?

Struts can be used by experienced developers and newcomers to web and Java development.

You will need at least a conceptual grasp of HTTP, HTML, Java, Javascript, Javabeans and JSP, XML, Ajax and Soap.

Where is it used?

IBM has adopted Struts as the primary framework for building web applications, and Websphere Development Studio provides wizards that generate Struts code.

Many other suppliers have incorporated Struts into their application servers and development products. Sun and BEA use and support it, despite having their own rival projects and technologies: Java Server Faces, which addresses the view layer and can be integrated with Struts development, and BEA Webflow.

What's coming up?

Two major versions of the Struts framework. Struts 1 is the mature version, recommended for development teams "looking for proven solutions to common problems". Struts 2, which was originally a rival development called Webwork, is recommended for "teams who value elegant solutions to difficult problems".


Struts downloads, FAQs and tutorials, details of Struts books and links to other resources can be found on the Apache Software Foundation website.

IBM Developerworks has material on Struts it is also worth looking at the Sun Developer Network. There are many free independent online tutorials.

Apache Software Foundation

Java Sun Developer

Rates of pay

Junior Java developers with Struts can earn from £24,000, rising to £35,000 and above with two years' experience. Contractors can earn up to £350 a day.

Computer Weekly/SSL salary survey

Catch up on training advice with Hot Skills


Read more on IT for small and medium-sized enterprises (SME)