• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creation of a war file

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Is there a way to create a .war file as a directory as opposed to a simple file. For ex,
I like to have the war file as a directory the following way.
mywar.war
- images
- META-INF
- WEB-INF
- abc.jsp
so that I can traverse to each directory beneath it.
I know that simply creating a war by:
jar -cvf mywar.war *
will only create a file.
Thanks.
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what you are trying to say...
A war file is not a directory, but simply is a file. If you are trying to include contents under different directories into the warfile, you will have to explicitly mention directory names in the command -
images/* META-INF/* WEB-INF/* and so on.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Servlets forum...
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends on the WebServer that you are using.
Apache TomCat for example allows you to create a new directory in it's 'webapps' directory that contains all of the files for the application in a directory structure that mimics the structure of the WAR file.
This is great for testing as you can modify the JSPs etc and retest without the need to package and redeploy the WAR file. However building and generating the WAR file is the best way and shouldn't be too hard a task especially if you create a build script using ANT.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic