Minimal directory structure and ant assembly file contents for Java web application

What is the minimum standard directory structure for a Java web application? What do I need to add to a file build.xmlto get ant to create it and create a WAR file?

My goal is to deploy the Wicket app for Tomcat without using an IDE. I want to do this only with ant and my favorite text editor.

+5
source share
3 answers

Perhaps not the most minimalist, but the Tomcat project has an Application Developer's Guide with a section on the original layout and sample build.xml

, , Maven. Maven, , , -, Maven . , . .

+5

:

web/
web/WEB-INF/   (sometimes we use a conf/ dir at the top level but this is minimal)
src/
lib/

build.xml :

  • jsp: / tomcat webapp lib/ WEB-INF/lib
  • compile: src/ WEB-INF/ webapp
  • war: , jsp, tomcat webapp warfile

, , warfile / .. webapp , . - , .

+2

You should check maven. It is really complicated, but to create a war file it is simple, and there are plugins that will use war for tomcat.

0
source

All Articles