This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

web.xml missing servlet information

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Xdoclet to create web.xml file that will contain servlet information.
Using @web.servlet name and @web.servlet-mapping url tags in the actual servlet. Tags are present after the impoets and before class defn for the servlet.
Tags look as follows in the servlet:
/**
*@web.servlet name = "TMS.actionmain1" display-name = "TMS.actionmain1"
* @web.servlet-mapping url-pattern = "/TMS.actionmain1/*"
*Description of the Class
*
*@author grodriguez
*@created April 22, 2003
*/
public class actionmain1 extends BaseServlet {
Ant script looks as follows in the build.xml file:
<target name="webxml"
description="Generate web.xml">
<echo>Generating web.xml ...</echo>
<mkdir dir="${build.home}"/>
<webdoclet destdir="${build.home}" verbose="true">
<fileset dir="${src.home}/TMS">
<include name="**/actionmain1.java" />
</fileset>
<deploymentdescriptor destdir="${build.home}"
mergedir="${build.home}"
servletspec="2.3"
displayname="Just a test"
acceptAbstractClasses="false"
description="Testing XDoclet web.xml generation"
sessiontimeout="120"
validateXml="false">
</deploymentdescriptor>
</webdoclet>
<echo>${build.home} </echo>
<echo>${src.home}</echo>
</target>

</project>
task def looks as follows in the build.xml file:
<taskdef name="webdoclet"
classname="xdoclet.modules.web.WebDocletTask">
<classpath refid="compile.classpath"/>
</taskdef>
Thank you in advance
 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!