JBoss.orgCommunity Documentation
JBoss Tools comes with a code generation feature which can be used to generate stub code for Struts Actions, FormBeans, Forwards and Exceptions.
The code generation that JBoss tooling provides is based on Velocity templates which can be modified for your use. The templates are located at
→ → .There are a number of ways to invoke code generation. One way is to simply right-click the Struts diagram and select
On this screen you can select for which elements to generate code. If you click the
button you will be able to specify more options for each of the categories you selected.Please be careful not to override your existing files.
When generation is complete, a result window will appear letting you know how many classes were generated:
You don't always have to generate code for all elements at once. You can generate code for an individual Struts artifact as well. Right-click an element on the diagram of the Struts configuration file and select
from the context menu.The same can be done from within the Tree viewer for the editor of the Struts configuration file.