|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.zip.ZipFile
java.util.jar.JarFile
org.apache.maven.j2ee.WarFile
Represents a J2EE War File
| Field Summary | |
static String |
LIB
lib entry in the war for jar files |
static String |
WEB_XML
web.xml entry in the war |
| Fields inherited from class java.util.jar.JarFile |
MANIFEST_NAME |
| Fields inherited from class java.util.zip.ZipFile |
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER, OPEN_DELETE, OPEN_READ |
| Constructor Summary | |
WarFile(File warFile)
Creates a new instance of WarFile |
|
WarFile(File warFile,
boolean verify)
Creates a new instance of WarFile |
|
WarFile(File warFile,
boolean verify,
int mode)
Creates a new instance of WarFile |
|
WarFile(String name)
Creates a new instance of WarFile |
|
WarFile(String name,
boolean verify)
Creates a new instance of WarFile |
|
| Method Summary | |
File |
extract(JarEntry entry)
Extract the given entry to a temporary file |
Map |
getErrorPages()
Get a map of error pages to error locations. |
FormLoginConfig |
getFormLoginConfig()
Get the <form-login-config> details specified in the
war file, or null if the element is not present |
Map |
getJSPs()
Get a map of servlet name -> jsp file. |
Set |
getLibEntries()
Provide a set of jar files as found in WEB-INF/lib |
Map |
getServletMappings()
Get a map of servlet name -> url pattern for all defined servlets |
Map |
getServlets()
Get a map of servlet name -> servlet class. |
Map |
getTaglibs()
Get a map of taglib-uri -> taglib-location. |
protected org.dom4j.Document |
getWebXml()
Get the web.xml back as a dom4j Document, for easier processing |
JarEntry |
getWebXmlEntry()
Retrieves the WEB-INF/web.xml entry if it exists. |
boolean |
hasFile(String fileName)
Tests whether a 'file' exists in the war. |
| Methods inherited from class java.util.jar.JarFile |
entries, getEntry, getInputStream, getJarEntry, getManifest |
| Methods inherited from class java.util.zip.ZipFile |
close, finalize, getName, size |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String WEB_XML
public static final String LIB
| Constructor Detail |
public WarFile(String name)
throws IOException
name - the file name of a war file
IOException - when an I/O error occurs
public WarFile(String name,
boolean verify)
throws IOException
name - the file name of a war fileverify - whether or not to verify the war file if it is signed
IOException - when an I/O error occurs
public WarFile(File warFile)
throws IOException
warFile - a J2EE .war file
IOException - when an I/O error occurs
public WarFile(File warFile,
boolean verify)
throws IOException
warFile - a J2EE .war fileverify - whether or not to verify the war file if it is signed
IOException - when an I/O error occurs
public WarFile(File warFile,
boolean verify,
int mode)
throws IOException
warFile - a J2EE .war fileverify - whether or not to verify the war file if it is signedmode - the mode in which the file is to be opened
IOException - when an I/O error occurs| Method Detail |
public JarEntry getWebXmlEntry()
JarEntry for web.xml
public Map getServlets()
throws IOException
IOException - if there are problems reading from the war
public Map getJSPs()
throws IOException
<servlet> tag
held in the war.
IOException - if there are problems reading from the war
public Map getTaglibs()
throws IOException
IOException - when an I/O error occurs reading the war
protected org.dom4j.Document getWebXml()
throws IOException
Document representing the web.xml
IOException - if there are any issues reading the web.xml
or producing the xml documentpublic Set getLibEntries()
entries from WEB-INF/lib
public File extract(JarEntry entry)
throws IOException
entry to a temporary file
entry - a previously retrieved entry from the jar file
File created
IOException - when an I/O error occurs reading the warpublic boolean hasFile(String fileName)
fileName - an entry in the war to be searched for
public Map getErrorPages()
throws IOException
<error-code> or <
exception-type>, the value is <location>.
IOException - if there are problems reading from the war
public FormLoginConfig getFormLoginConfig()
throws IOException
<form-login-config> details specified in the
war file, or null if the element is not present
FormLoginConfig with the login and error pages
IOException - if there are problems reading from the war
public Map getServletMappings()
throws IOException
IOException - if there are problems reading from the war
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||