An Introduction to Struts

Struts is the premier framework for building Java-based Web applications. Using the Model-View-Controller (MVC) design pattern, Struts solves many of the problems associated with developing high-performance, business-oriented Web applications that use Java servlets and JavaServer Pages. At the outset, it is important to understand that Struts is more than just a programming convenience. Struts has fundamentally reshaped the way that Web programmers think about and
structure a Web application. It is a technology that no Web programmer can afford to ignore.




Using Multiple Threads with Java

The Java language makes it particularly easy to do both multi-threaded programming and socket programming. We will see in the next section that using threads is a basic technique for writing robust socket programs in Java. In this section, we will look at a short example program that creates a new thread class MyThread and creates 10 instances of it.




What is java?

Java was originally developed by Sun Microsystems for programming consumer electronic devices. Java became wildly popular as a client-side programming platform when both Netscape and Microsoft offered runtime support for Java applets in their Web browsers. In this chapter, we will not use Java applets; all sample programs run as standalone Java programs. The real strength of the Java programming language, however, is when it is used to write multi-threaded server applications.




Socket Programming with Java

We saw in the last section how simple it is to use threads in Java programs. Writing programs that use sockets for interprocess communication is also simple if we use separate threads to manage socket connections. Listing 32.6 shows the ExampleSockets class that uses multiple threads to process socket I/O.




Creating Simple 3D Objects Using GLUT

There are several GLUT utility functions for creating both wire frame and solid objects. To create a sphere, use either of the following:

void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);

void glutWireSphere(GLdouble radius, GLint slices, GLint stacks);




Using Multiple Threads with Java

The Java language makes it particularly easy to do both multi-threaded programming andsocket programming. We will see in the next section that using threads is a basic technique for writing robust socket programs in Java. In this section, we will look at a shortexample program that creates a new thread class MyThread and creates 10 instances of it.




Basic Components of Struts

The Struts framework is a rich collection of Java libraries and can be broken down into the following major pieces:
Base framework, JSP tag libraries, Tiles plugin and a Validator plugin. A brief description of each follows.




[1]
Items 1 - 7 of 7 displayed.

Back to Home page