Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
is that the components can be configured on a per application basis. Imagine a master
build file per application that calls build files per component passing the build files the
info it needs to configure the component for that particular application.
Step four: define Servlet mappings
The servlet mappings can also be defined with the XDoclet JavaDoc tags as follows:
* @web.servlet mapping url pattern="/Basic/*"
* @web.servlet mapping url pattern="*.Basic"
* @web.servlet mapping url pattern="/BasicServlet"
...
*/
public class BasicServlet extends HttpServlet {
These would generate the following entries in the
web.xml
file:
BasicServlet
/Basic/*
BasicServlet
*.Basic
BasicServlet
/BasicServlet
Three short lines of code versus 12 lines of XML elements and subelements. Are you
starting to feel the power (and joy) of XDoclet? XML was meant to be parsed by
computers and readable by humans, but not written by humans necessarily.
Step five: define J2EE resources
In addition to the above you can define resources reference in the
web.xml
for
resources like the JDBC data sources or even ejb references. The Java file includes
these XDoclet JavaDoc style tags at the class level as follows:
Enhance J2EE component reuse with XDoclets
Page 13 of 49






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

j2ee web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved