JavaServer Page

October 23, 2006

CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER

Filed under: JavaServer Page — webmaster @ 9:42 pm

CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER TOOLS 615 In tiles-config.xml, the “.resumeList” definition is a simple definition that defines a title, header, and content page.
In struts-resume, the BaseAction class extends LookupDispatchAction, and Tiles definitions are used extensively for assembling pages. The logic flow from a JSP s URL to an action s method to a Tiles definition can be somewhat confusing, especially when you bring XDoclet into the mix to define the action s mapping and local forwards. Figure 15-13 illustrates the logical flow of it all. MainMenu (JSP) The link is associated with the global-forward , which in turn is associated with the path Therefore, flow goes through to path View My Resumes viewResumes /viewResumes.do?action=search. ActionServlet(*.do) */viewResumes.do. ResumeAction (Action) Xdoclet tags in JavaDoc of define a parameter named . The path defined earlier specified that , so flow passes to the method. ResumeAction.java action action=search search() search() Method Method contains the line ; This list forward is defined using Xdoclet: * * * return mapping.findForward( list ) @struts.action-forward name= list path= .resumeList .resumeList tiles-config.xml Definition from Figure 15-13. The logical flow of control from JSP to Tiles In the previous diagram, the ResumeAction class extends LookupDispatchAction. Basically, it allows you to use a parameter (action) to specify which method to call in your Action class. The figure shows the XDoclet tags used to create the ResumeAction s mapping in the Struts configuration file as well its local forward. All of these tags are written in the class s header Javadoc comments.

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