Editing Struts Configuration Files with Struts Console


Metadata Tags

Several of the tags for the Struts configuration file give you the option to nest metadata tags. The metadata tags exist solely for adding extra information to the configuration file that will show up in GUI tools and the like; Struts itself ignores the metadata tags. None of the metadata tags has any attributes; thus, you just add text between opening and closing tags to specify their value, as shown here:

<action path="/search"         type="com.xyzcorp.app.SearchAction">   <icon>     <small-icon>small.gif</small-icon>     <large-icon>large.gif</large-icon>   </icon>   <display-name>Search Action</display-name>   <description>Search Action searches for employees.</description> </action>

The following table lists and describes each of the metadata tags.

Tag

Description

description

Defines descriptive text for the enclosing tag.

display-name

Defines a short description (or name) for the enclosing tag.

icon

Encapsulates an instance of the large-icon and the small-icon tags.

large-icon

Defines the location for a large (32×32 pixel) icon to associate to the enclosing tag.

small-icon

Defines the location for a small (16×16 pixel) icon to associate to the enclosing tag.



Struts. The Complete Reference
Struts: The Complete Reference, 2nd Edition
ISBN: 0072263865
EAN: 2147483647
Year: 2004
Pages: 165
Authors: James Holmes

Similar book on Amazon
Struts 2 in Action
Struts 2 in Action
Murach's Java Servlets and JSP, 2nd Edition
Murach's Java Servlets and JSP, 2nd Edition
Jakarta Struts For Dummies
Jakarta Struts For Dummies
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net