struts(struts.xml.jet) - Add action to struts

Introduce

Add action to struts

Related knowledge:

Task

Tag


Task And Model

The model group of the current task is shop, 
which contain a Java entity model book, 
and the relation value of book is one;

More about the model structure of this demo, please click: Demo model structure 

There are 2 ways to select the model:

Note: this is a merge task.

Before merger

In merged file the annotation symbols which id is equal to action, is the insert position.

We use the insert tag to insert the merged content at the same id position, you only need to write the merged content in the template.

Class and class can be used to a part of class name

Result: Add action to struts config file.