Example
protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws IOException {
FileOutputStream fOS = FileUtility.getFileOutputStream(FileUtility.getFileName());
JarOutputStream jarOS = new JarOutputStream(fOS);
jarOS.putNextEntry(new JarEntry("foo"));
jarOS.putNextEntry(new JarEntry("foo2"));
jarOS.putNextEntry(new JarEntry("foo3"));
jarOS.close();
fOS.close();
}
Solução
Se os artefatos precisarem ficar em JAR, coloque-os em JAR antes de o aplicativo ser iniciado ou off-line em uma tarefa do batch.