XDoclet: Attribute-Oriented Programming - webspherewebxml
Author: XDoclet Team

##### XDoclet

- Overview
- News and Status
- Download/Installation
- Using XDoclet
- Best Practices
- FAQ
- License

##### Ant Task Reference

- <doclet .. />
- <ejbdoclet .. />
- <hibernatedoclet .. />
- <jdodoclet .. />
- <jmxdoclet .. />
- <mockdoclet .. />
- <portletdoclet .. />
- <springdoclet .. />
- <tapestrydoclet .. />
- <webdoclet .. />
- <wseedoclet .. />

##### Tag Reference

- apache (@soap @struts @axis @tapestry)
- bea (@weblogic)
- borland (@bes)
- caucho (@resin)
- ejb (@ejb @dao)
- exolab (@castor)
- hp (@hpas)
- hibernate (@hibernate)
- ibm (@websphere)
- java (@javabean)
- jboss (@jboss)
- jdo (@jdo)
- jmx (@jmx)
- jsf (@jsf)
- macromedia (@jrun)
- mockobjects (@mock)
- mvcsoft (@mvcsoft)
- mx4j (@mx4j)
- objectweb (@jonas)
- oracle (@oc4j)
- orion (@orion)
- portlet (@portlet)
- pramati (@pramati)
- spring (@spring)
- sun (@sunone)
- sybase (@easerver)
- tjdo (@tjdo)
- web (@web @jsp)
- webwork (@webwork)
- wsee (@wsee)
- xdoclet (@xdoclet @doc @msg)

##### Feature Documentation

- Using Value Objects
- EJB Environment Handling

##### Advanced

- Maven Plug-in
- Merge Points
- IDE Integration
- Migration from EJBDoclet
- Ant 1.5 Troubleshooting

##### Community

- Feedback
- Resources
- Tools

##### Development

- Developer Guide
- Javadoc (API)
- Template Language (*.xdt)
- XJavaDoc Site

##### Search XDoclet

##### Project Documentation

- About XDoclet
- Project Info
- Project Reports
- Development Process

## webspherewebxml

Generates WebSphere specific deployment descriptors for Web modules. The following files are generated: ibm-web-bnd.xmi and ibm-web-ext.xmi.

NOTE: Since the WebSphere specific deployment descriptors depend on that id's are set in the web.xml file you must genererate it with useIds set to true, e.g. `<deploymentdescriptor useIds="true"/>`.

This Ant task defines the following attributes (the rest of the attributes in the list below comes from its baseclass):

- virtualHostName
- reloadInterval
- reloadingEnabled
- defaultErrorPage
- additionalClassPath
- fileServingEnabled
- directoryBrowsingEnabled
- serveServletsByClassnameEnabled
- preCompileJSPs
- autoRequestEncoding
- autoResponseEncoding
- autoLoadFilters

NOTE: All attributes except "virtualHostName" are IBM specific WebSphere extensions to the web.xml file and are the same as the attributes that can be found in the IBM WSAD wizard (v5.1.2) for Web Deployment Descriptors (see tab "Extensions" and section "General")

### Implementing Class

xdoclet.modules.ibm.websphere.web.WebSphereWebXmlSubTask

### Attributes

Attribute | Description | Required
--- | --- | ---
virtualHostName | The virtual host name. "A virtual host is a configuration enabling a single host machine to resemble multiple host machines. This property allows you to bind the application to a virtual host in order to enable execution on that virtual host." | No. Default is "default_host"
reloadInterval | A Reload Interval. Every 'reload interval' seconds, the web application's files are checked and reloaded if they have been modified. Requires that reloadingEnabled is set to true. | No. Default is "3"
reloadingEnabled | Specifies whether reloading is enabled. | No. Default is "true"
defaultErrorPage | Specifies a file name for the default error page. If no other error page is specified in the application, this error page is used. | No. Default is ""
additionalClassPath | Specifies an additional class path that will be used to reference resources outside of those specified in the archive. | No. Default is ""
fileServingEnabled | Specifies whether file serving is enabled. File serving allows the application to serve static file types, such as HTML and GIF. File serving can be disabled if, for example, the application contains only dynamic components. | No. Default is "true"
directoryBrowsingEnabled | Specifies whether directory browsing is enabled. Directory browsing allows the application to browse disk directories. Directory browsing can be disabled if, for example, you want to protect data. | No. Default is "true"
serveServletsByClassnameEnabled | Specifies whether a servlet can be served by requesting its class name. Usually, servlets are served only through a URI reference. The class name is the actual name of the servlet on disk. For example, a file named SnoopServlet.java compiles into SnoopServlet.class. (This is the class name.) SnoopServlet.class is normally invoked by specifying snoop in the URI. However, if Serve Servlets by Classname is enabled, the servlet is invoked by specifying SnoopServlet. | No. Default is "true"
preCompileJSPs | Specifies wheter JSP pages will be precompiled at deploy time or not. | No. Default is "true"
autoRequestEncoding | See IBM WebSphere documentation regarding this attribute. | No. Default is "false"
autoResponseEncoding | See IBM WebSphere documentation regarding this attribute. | No. Default is "false"
autoLoadFilters | See IBM WebSphere documentation regarding this attribute. | No. Default is "false"
useIds | If this attribute is set to true, XDoclet will generate id attributes in the XML document. Note that this is only available in some subtasks. | No. Default is "false"
xmlencoding | The encoding of the produced xml file. If your XML file uses international characters, you might want to set this to "ISO-8859-1". | No, default is "UTF-8"
schema | The XML Schema to which the generated document should conform. | No.
validateXML | If this is set to true, the generated XML will be validated against its DTD or XML Schema. | No, default is false.
acceptInterfaces | Indicates whether or not to generate for interfaces. | No, default is "true"
acceptAbstractClasses | Indicates whether or not to generate for abstract classes. | No, default is "true"
packageSubstitutions | Sets the PackageSubstitutions attribute of the TemplateSubTask object | No.
packageSubstitutionInheritanceSupported | Indicates whether or not package substitution should be inherited | No, default is "true"
prefixWithPackageStructure | Indicates whether or not to prefix with package structure. | No, default is "true"
destinationFile | The destination file name. If a {0} is found it's assumed that a per class output generation is needed, so {0} is substituted with class name; otherwise a single file is generated with the specified name. | No, default is determined by this task.
templateFile | Sets the name of the template file to use for generation | No, default is determined by this task.
havingClassTag | Sets the HavingClassTag attribute of the TemplateSubTask object | No.
ofType |  | No.
subTaskName | Sets an optional name for the subtask that will be seen in XDoclet's debug messages. | No.
destDir | Sets the directory where the generated file(s) will be written. | No.
mergeDir | Specifies the location of the merge directory. This is where XDoclet will look for merge files. | No.

### Nested Elements

Element | Description
--- | ---
configParam | Specifies a configuration parameter for the subtask.
ofType |
packageSubstitution | Substitutes the package of the generated files.