JavaServer Page

October 25, 2006

CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER

Filed under: JavaServer Page — webmaster @ 5:17 pm

CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER TOOLS 619 that it s easier to do our job with this knowledge. If editing XML files by hand, we recommend XMLSpy (http://www.xmlspy.com). This is a great tool for any XML-related development because it validates your XML against a DTD or XML Schema and also performs auto-completion as you type. Another reason to learn the DTDs or Xml Schema is because tools like XDoclet assemble the struts-config.xmlfile from a number of XML fragments, and most IDE tools only support editing fully assembled struts-config.xml files. There are also applications that have been created simply to provide a development environment for Struts s application development. Let s take a look at a couple of these now. Struts Console Struts Console (found at http://www.jamesholmes.com/struts/) is a free application for managing Struts-based applications. Struts Console is a visual editor for JSP Tag Library, Struts, Tiles, and Validator configuration files. It can be used as a stand-alone Swing application or as a plug-in for your favorite IDE. Supported IDEs are JBuilder (v4.0+), Eclipse (v1.0+), IBM WebSphere Appl. Dev. (v4.0.3+), IDEA (v3.0, build 668+), NetBeans (v3.2), Sun ONE/Forte (v3.0+), and JDeveloper (v9i+). It has support for managing all your Struts-related XML files, such as struts-config.xml, tiles-config.xml, and validation.xml. When using this tool, as with many others, you ll lose any formatting you ve applied to the document. However, it does allow formatting within the tool to pretty up your XML. It also has a wizard for converting JSP and HTML pages into Struts JSP pages a very handy feature if you re converting an existing application to Struts. Easy Struts The Easy Struts project (see http://easystruts.sourceforge.net/) provides a set of tools for Struts development, including a struts-config.xmleditor, XSLT generation, tooltips from the Struts DTD, support for modules, and an input helper. Easy Struts is only available as an IDE plug-in; no stand-alone application is available. Supported IDEs are Eclipse (v2.0+) and JBuilder (v5.0+). Using Modules in Team Development Environments Have you ever worked on a project where many developers were working on the same codebase? Many development teams work in this type of environment, while others allocate development roles to single individuals. Let s imagine two types of teams; the first has fifteen developers and the second has three individuals. We ll pretend that both teams are developing similar applications that use Struts and EJBs for handling credit card payments for a large bank. The large team will probably divide the work among tiers, where five people work on each tier EJBs, ActionServlets, and business layer, and the web tier comprising JSP pages or Velocity templates. The second (smaller) team will simply assign one person to each tier. In a team environment where many people are configuring and manipulating deployment descriptors, it can be difficult to keep your web.xml and struts-config.xml in sync. The simplest solution we ve found is to use XDoclet to generate these configuration files, but there is another option modules. When initially developed by the Struts development team, they were called subapplications, which is a more descriptive name. Modules allow you to separate different areas of an application out into different modules. Modules are a core feature of Struts 1.1 and can be very helpful for large projects as well as for creating pluggable features.

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

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Powered by Java Web Hosting