Introduction to Struts plugin

Struts introduce a new feature plugin. Plug-ins are custom extensions to Struts.

The plug-in element in struts-config.xml tells Struts which plug-in to initialize and what data they require, the data usually are paths to various xml configuration files required by the plug-in. A plug-in example:

Struts 1 and Hibernate 3 Integration

Struts 1 may be little old now and the newest release of Hibernate is 4.2. This post is for education.

Hibernate is an ORM tool that provide a session based interface to application to deal with database. The Hibernate framework will deal with connection pool and database access for you. Application can use all the services provided by Hibernate through the SessionFactory instance. So to integrate Hibernate with Struts, you only need a way to easily access a SessionFactory instance in the Action class and do all the persistent operation with that instance.

Hibernate is an ORM tool that provide a session based interface to application to deal with database. The Hibernate framework will deal with connection pool and database access for you. Application can use all the services provided by Hibernate .

Install HSQL database system

HSQLDB is a relational database engine written in Java, with a JDBC driver, conforming to ANSI SQL:2008. A small, fast, multithreaded engine and server with memory and disk tables, LOBs, transaction isolation, multiversion concurrency and ACID.

Get the package here

Hibernate 3.0 Hello World example with MySQL tutorial

Hibernate is a Java based full featured object-relation mapping tool that provide a number of advantages for database application development. The ORM itself is a big topic, in this post I will illustrate the basic Hello World application of Hibernate.

First download the package here

How to config Message Resources in Struts

The MessageResources located under org.apache.struts.util.MessageResources package. It's a general purpose abstract class that describes an API for retrieving Locale-related messages from underlying resource locations. Sometimes it's also called message bundles.

MessageResources allow developers easily support multi-language and internationalization, include date time and number format. Using MessageResources to store various strings in a single location and reference it with Struts tags. When the string needs to be changed, just change one place and all the references will be changed at the same time.

MessageResources allow developers easily support multi-language and internationalization, include date time and number format. Using MessageResources to store various strings in a single location and reference .

Overview of Struts Custom Tag Libraries: The nested tag library

The introduce of nested tags makes the tags can relate to each other . The nested structure sometimes adhere into the domain model. The nested tags will greatly simply the presentation code in that situation.

Nested means that one Bean can hold a reference to another Bean, in certain situation , the Beans are connected as network. The Bean hold the reference is the parent and the referenced Bean is the child.

Nested means that one Bean can hold a reference to another Bean, in certain situation , the Beans are connected as network. The Bean hold the reference .

Overview of Struts Custom Tag Libraries: The logic tag library

The logic tag library used to perform conditions, looping, and anything that requires iteration.

The comparison tags are equeal, notEqual, greaterEqual, lessEqual, greaterThan, lessThan, present and notPresent. Tags need a value to compare and the object being used. The object can be cookie, header, parameter, property or name.

JSP scopes explained

Scope is a very important concept in JSP , every Java developer should have a good understanding about this concept.

The scope of an object defines where its available and who can access it. Scope comes into play when dealing with various objects, also called Java Bean. The whole architecture of JSP is based on Java Beans. Java Beans are nothing but Java objects that follow a special pattern and naming rule.

The scope of an object defines where its available and who can access it. Scope comes into play when dealing with various objects, also called Java Bean. The whole architecture of JSP is based on Java Beans. Java Beans are nothing .

Overview of Struts Custom Tag Libraries: The bean tag library

The bean tag library is used to manipulate Java Beans includes Bean creation and rendering tags for specific Bean properties.

The JSP already provided jsp:useBean tag to manipulate the Beans. But Struts bean tag library provide a number of enhancements to the JSP tag. First, Struts bean tag defined an extended syntax available for Bean properties. Second, its easy to automatically create new Beans in all scopes from various objects. Third, it's possible to render textual output from a Bean that can be included in the JSP response.

The JSP already provided jsp:useBean tag to manipulate the Beans. But Struts bean tag library provide a number of enhancements to the JSP tag. First, Struts bean tag defined an extended syntax available for Bean properties. Second, its easy to .

Overview of Struts Custom Tag Libraries : html tag library

The Struts Custom Tag Libraries is heavily used in JSP when working with Struts framework. This post will give you an overview of these tags.

This tag library mainly used to generate user interface related HTML element like forms, buttons, selection box, input field...

Previous Page 1 ... 61 62 63 ... 69 Next Page