Java Struts Tutorial
Java Tutorials
    Site written by
Dave Kellman

Page Index A to Z

Main Pages
Free Tutorials
Calendar Code Tutorial
Java GUI
Video Tutorials
Sun Java
Applet Tutorial
Struts Tutorial
Java Tetris
Free Servlet Tutorial
Visual Age Tutorial
Drop Down Java Script
Java Script Tutorial

Contact us

Java TutorialsJava Tutorials - Java tutorials for mostly Java, but also JavaScript. We try and help you find free Java tutorials, help you create a calendar code, give you a Java GUI tutorial as well as video tutorials, Sun Java, Applet and more tuts.

This section has information on java struts tutorials. Struts perform the critical role of glue that joins the various elements of the standard Java platform into a coherent whole.

Struts (Click to enlarge)

Struts, an open-source MVC implementation
Manage complexity in large Web sites with this servlets and JSP framework


Kids in grade school put HTML pages on the Internet. However, there is a monumental difference between a grade school page and a professionally developed Web site. The page designer (or HTML developer) must understand colors, the customer, product flow, page layout, browser compatibility, image creation, JavaScript, and more. Putting a great looking site together takes a lot of work, and most Java developers are more interested in creating a great looking object interface than a user interface. JavaServer Pages (JSP) technology provides the glue between the page designer and the Java developer.

If you have worked on a large-scale Web application, you understand the term change. Model-View-Controller (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data. Struts is an MVC implementation that uses Servlets 2.2 and JSP 1.1 tags, from the J2EE specifications, as part of the implementation. You may never implement a system with Struts, but looking at Struts may give you some ideas on your future Servlets and JSP implementations.

In this article, I will begin with a JSP file that uses elements you may be familiar with and discuss the pros and cons of such a page. I will then cover Struts and how it can control change in your Web project and promote specialization. Finally, I will re-develop the simple JSP file with the page designer and change in mind.

A JSP file is a Java servlet

A JavaServer Page (JSP) file is nothing more than another way to view a servlet. The concept of a JSP file is to allow us to see a Java servlet as an HTML page. This view eliminates all of the ugly print() statements that normally show up in Java code. The JSP file is pre-processed into a .java file, then compiled into a .class. If you are using Tomcat, you can view your pre-processed .java files in the work directory. Other containers may store the .java and .class files elsewhere; the location is container specific. Figure 1 demonstrates the JSP file-to-servlet flow.

Figure 1. JSP file-to-servlet flow JSP to servlet flow

Jsp to servlet (Click to enlarge)
JSP file-to-servlet flow

(This is significantly different from a Microsoft Active Server Page (ASP). An ASP is compiled into memory, not into a separate file.)

The simple self-contained JSP file
In a small JSP application, it is common to see the data, business logic, and the user interface combined into one module of code. In addition, the application generally contains the logic that controls the flow of the application.

The most relevant links we could find, placed here free

Struts Framework - Struts provides the glue that joins the various elements of the standard Java platform into a coherent whole.

Java World - Multiple options are available for solving problems with Struts. When deciding among these alternatives, the choice must be based on parameters.

First Steps - Curious about Java's Jakarta Struts, but afraid to take the plunge? Wait no longer! In this tutorial, John guides you through setup etc.

Java(TM) Boutique - Struts, from the Jakarta Project, is a development framework for Java servlet applications based upon the Model-View-Controller (MVC) design paradigm.

Introduction to Struts - Controller components in Struts are Java classes and must be built using specific rules. They are usually referred to as "Action classes.".

Struts Guide - this is one of the best tutorial for struts learners. ... Please write me SUN CERTIFIED JAVA PROGRAMMER (SCJP)notes for exam and knowledge point of view.

Site structure created by Neil Villette Site written by Dave Kellman