war-files

Appending files to a zip file with Java

I am currently extracting the contents of a war file and then adding some new files to the directory structure and then creating a new war file. This is all done programatically from Java - but I am wondering if it wouldn't be more efficient to copy the war file and then just append the files - then I wouldn't have to wait so long as th...

Best way to deploy large *.war to tomcat

During development I frequently have to deploy a large war-file (~45 MB) to a remote test server, normally I copy the file with scp to the server. The WEB-INF/lib folder makes up the largest part of the war file, which includes all the required libraries (spring, apache-cxf, hibernate,...). Now I'm searching for an fast and easy a way ...

Files inside WAR appear double

I'm using ANT to build the WAR file for my Java web app. However, when I look inside the WAR file I see every file appear twice (not the folders, just the files). When I extract the WAR file there are no errors and the file structure appears to be correct, no double files. If I then compess the extracted file back into a ZIP file the arc...

Get relative path to XML file from a non-servlet class in a WAR

Hello, I have an XML file which I need to read and load the data in memory every time the app launches. So, while the project was in Eclipse, i hardcoded the path: "/path/to/xml" but when I create the WAR, how can I specify the relative path to the XML file. I can do it using URL url = getServletContext().getResource(fileName); But, I...

Why no option to import a WAR file into Eclipse?

I have a WAR file for a Java project but when I try to import it into Eclipse, the only option is for archive files such as tar, zip, jar - nothing for war. Is this only an option in certain editions of Eclipse because I have a copy of SpringSource (also Eclipse-base) that allows me to import WAR files? Would it be possible to add this...

Some necessary libraries are missing in WAR-File after export from Eclipse - why?

Hey altogether, I took over a project of a college which contains some web services and by exporting the project as WAR-file some libraries are contained in the file (e.g. Axis2) and some aren’t (hibernate, JDBC driver). Also a jar which is added to the class path has not been exported. All libraries are located in folders on the hard d...

Advantages/Disadvantages to exploded wars

An answer to a question I read today suggested deploying an application as an exploded WAR. It got me thinking. Every deployment I've ever done to a JBoss/Tomcat has been with a a WAR/EAR file. At least as far as I can remember. Have I been making a mistake all these years? Are there advantages to deploying an app in its expanded form...