File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Deployment problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

Deployment problem

Prasad Prabha

Joined: Nov 26, 2008
Posts: 8
hii all,

Some of my application folders are getting deleted while deploying my application inside my Tomcat 5.5. This often happens when I build my application with ant.

My build file is given below...

<?xml version="1.0"?>

<!-- build tool for LiveHelp admin web pages -->

<project name="BANK" default="copywar" basedir=".">

<!-- compiling the code -->
<target name="compilesources">
<javac srcdir="./WEB-INF/src" destdir="./WEB-INF/classes" includes="com/example/web/*.java" />

<!-- creating war file -->
<target name="createwar" depends="compilesources">
<jar jarfile="sample.war" basedir="." includes="WEB-INF/,jsp/" excludes="WEB-INF/src/" />

<!-- copying the ear file to jboss directory -->
<target name="copywar" depends="createwar">
<copy file="sample.war" todir="C:\Tomcat 5.5\webapps" overwrite="true"/>

Could you please help me out in solving this problem..?
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3900

Is your "include" attribute working in the jar task? There is a War task for this here.

Seems you have put the source in the WEB-INF folder? Why do so? You can use the War task. Take a look at the link I gave above and search for the War Task. Hope this helps.
[ November 26, 2008: Message edited by: Vijitha Kumara ]

[How to ask questions] [Twitter]
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Prasad, please check your private messages.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2846

Please do not post the same question multiple times.It only wastes the useful time of other ranchers and reduces the number of responses you get. Read this for more information.

|Asking Good Questions|
subject: Deployment problem
It's not a secret anymore!