CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER
620 CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER TOOLS Since the development of modules is very similar to developing a standard Struts application, we ll show you how to set them up, and we ve actually implemented an upload feature that uses them in the struts-resume application. The setup is rather simple, consisting of the following three steps: 1. Prepare a config file for your module. 2. Inform the controller of the module. 3. Use forwards or actions to switch to your new module. We won t detail the first step here, because this is the same as creating a new Struts application. You could probably use XDoclet to create your configuration files for the different modules, but you would have to coax your Ant webdoclet task to output struts-config.xml to different directories. Of course, the purpose of submodules is to make development and configuration easier, and XDoclet already does this for you! The second step involves adding a new init parameter to the ActionServlet s definition in the application s deployment descriptor, web.xml. In the struts-resume application, this configuration is located at metadata/web/servlets.xml:
config
/WEB-INF/struts-config.xml
config/upload
/WEB-INF/struts-upload.xml
debug
2
detail
2
Note: If you are looking for good and high quality web space to host and run your jsp application check Lunarwebhost jsp web hosting services