Ant tutorial build war file


















Ask Question. Asked 6 years, 9 months ago. Active 5 months ago. Viewed 65k times. Edit: So jar is the way to go to create a war file. Edit2: jar -cvf my-app. Add a comment. Active Oldest Votes.

If you want to stick with the console only and dont use any build helpers beside the ones delivered by the JDK you can create your war with something like this: jar cvf my-app.

Community Bot 1 1 1 silver badge. Interesting, so you're that using "jar cvf my-app. Let me try that. SomeGuyOnAComputer well i havent tested the jar tool to be honest. But yes if you follow the WAR-directory layout and have a working webapplication inside that structure could be a single index.

I tried the zip method and unfortunately that didn't work. Web component follows the standard directory structure defined in the J2EE specification. Root directory of the web archive '. In the root directory there is a special directory 'Web-inf' which contains the web deployment descriptor web.

After understanding the structure of. In this lesson we creating HelloWorld. You can download all the file of this tutorial from here. Since in this lesson we are developing one servlet and one jsp files so our deployment descriptor is very simple. Above application. Pushpendu Mondal.

Ridhi Arora. Manish Gupta. Previous Page. Next Page. Useful Video Courses. More Detail. For this example, there is only one web module. Finally, we have a deployment task. Most application servers can be configured to monitor a deployment directory and automatically install EAR files copied into that directory. For this example, our server is on the same machine, so we can do a simple copy:.

So our final build. Notice the project root element where we specify the project name as well as the default task to run.

We now have a complete project that can be built and deployed using a simple ant command. Once it is configured, preforming a build within Eclipse will launch an external delegate to run the build. Here is the output from running the deploy task. Finally, we can open a web browser, open the appropriate URL to our servlet as determined by both the application.

Creating a web application with an ant build file is just the beginning. The build.



0コメント

  • 1000 / 1000