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 8459407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:19:21+00:00 2026-06-10T13:19:21+00:00

I have, build/classes – compiled java codes libs – some jar files src –

  • 0

I have,

   build/classes - compiled java codes

   libs - some jar files

   src - java codes

   WebContent - all the .jsp files, WEB-INF/lib and META-INF

i create some build files but they did not work. How to create a build.xml file for this folder structure.

  • 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-06-10T13:19:22+00:00Added an answer on June 10, 2026 at 1:19 pm

    Detailed Example of Ant for War File

    All the classes inside the src directory should be compiled and placed in a separate build/classes directory. The created war file will be placed inside the dist directory.

    1. So first we create the build/classes and the dist directory. The init target does this job.

    2. The next step is to compile all the classes in the src directory and
      place them in the build/classes directory. To do this first you need
      to add all the lib files inside the “WebContent/WEB-INF/lib”
      directory to the classpath.

    3. The target compile uses the javac task to compile the java classes
      and it depends on the target init, because only when you have the
      directory ready you can place the classes inside them.The path we created earlier will be refered here using the element.

    4. Now we can create the war file using the war task. To create the war
      file you need to specify the web directory, lib directory and the
      classes directory. The destfile attribute specifies the war file
      location and the webxml attribute specifies the web.xml file
      location

    5. You can use the clean target to clean the project. The clean target
      deletes the build and the dist directory.

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

Sidebar

Related Questions

I have a trivial question for all of you. I have several build.xml files
I have a project set up like this; Project -src -com -top -classes Class_3.java
I have used the folllowing steps to add classes to my build path still
I have the following in my build.xml: <target name=compile.baz depends=init> <javac destdir=${build.dir}/classes debug=on> <compilerarg
Currently, I build two classes for each database table. For instance, if I have
I have the next directory structure for my personal project: mines/ build.xml build/ build/classes/
I have build a jar file and trying to use it in j2me application.
I have a text file which contains some locations of the files which I
I have a codebase that I want to produce several deliverable jar files, each
I have a Java project that reads UTF-8 encoded .txt files in order to

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.