Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3870536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:44:13+00:00 2026-05-19T21:44:13+00:00

I’m using ant to build my web-app. I’m sure this is simple but I

  • 0

I’m using ant to build my web-app. I’m sure this is simple but I can’t figure out how to tell ant to create a specific folder in the WEB-INF directory and copy files to it.

My ant war task looks like this:

<target name="warItUp" depends="compile">
    <war destfile="MyApp.war" webxml="${home.dir}\WEB-INF\web.xml">

        <classes dir="${classes.dir}"/>
        <classes file="${src.dir}/hibernate.cfg.xml"/>
        <classes dir="${src.dir}" includes="**/*.hbm.xml"/>

        <!-- Include the PDF files -->
        <fileset dir="${home.dir}/PDFs">
            <include name="**/*.pdf"/>
        </fileset>

        <!-- Include the JSP files -->
        <fileset dir="${home.dir}/JSPs">
            <include name="**/*.jsp"/>
        </fileset>

        <!-- Include the images -->
        <fileset dir="${home.dir}/images">
            <include name="**/*"/>
        </fileset>          
    </war>

All the fileset elements work i.e. they include the pdf, jsp and image files in the root directory of the war file.

But if I want to create a sub-directory in the WEB-INF directory of the war file and include files in it how do I specify that? e.g. say I wanted to include WEB-INF/TagLibraryDescriptors/MyTagLib.tld in the war file or if I wanted to create a WEB-INF/JSP folder in my war file and copy all JSP files to it.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T21:44:14+00:00Added an answer on May 19, 2026 at 9:44 pm

    OP here, thanks for all the responses. I found another solution – there is a webinf element that can be included in the war task.

    This will copy files from the source JSPs folder into the WEB-INF folder in the war file:

    <webinf dir="${home.dir}/JSPs" 
    includes="**/*.jsp">
    </webinf>
    

    whereas this will copy files from the source JSPs folder into the WEB-INF/JSPs folder (my preferred choice):

    <webinf dir="${home.dir}" 
    includes="/JSPs/**/*.jsp">
    </webinf>
    

    I think I’ll stick with this solution but thanks for the responses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
We're building an app, our first using Rails 3, and we're having to build
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm making a simple page using Google Maps API 3. My first. One marker

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.