war file and directories structure for struts applications
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Oops_PRz
Posted On:   Tuesday, October 23, 2001 01:13 AM

Could someone give me a sample structure
of a simple application (2 or 3 jsp, 2 or 3
Action classes ...) including:


  • the appropriate directories structure for the jsp,
    sources files and .class files, libs, and build.xml,web.xml, struts-config.xml etc...
  • the corresponding "build.xml" file WITH the correct WAR tag in order to generate the proper .war file to be deployed into some servlet container like Tomcat.

All the sample "build.xml" struts applications i've found don't indeed show how to write this war tag


Thanks,

Re: war file and directories structure for struts applications

Posted By:   Ted_Husted  
Posted On:   Wednesday, October 24, 2001 02:48 AM

The struts-blank application in the distribution provides
the appropriate file structure. You can rename this and then
autodeploy it on your server.


If your source is below a directory named "WEB-INF/src",
here's a generic build.xml that you can put in your
WEB-INF. Along with a WAR it also creates the JavaDoc.
Create the directories "doc/api" and "dist" below
WEB-INF before running it the first time.

























description="Generate JavaDoc API docs">


destdir="./doc/api"
classpath="lib/struts.jar:"
packagenames="myProject.*"
author="true"
private="true"
version="true"
windowtitle="Documentation"
doctitle="

${project.title} Documentation (Version ${project.version})

"
bottom="Copyright © 2001"/>


description="Create binary distribution">


webxml="../WEB-INF/web.xml"
basedir="../"
manifest="./conf/MANIFEST.MF"
excludes="WEB-INF/dist"/>







For more on build files, visit the jGuru Ant forum.


HTH - Ted

About | Sitemap | Contact