Web App or Services (.war)
When you select an application type of Web in the Wizard, it will ask you for the location and name of the
.war file, as well as the location of the JDK that PreEmptive Protection™ DashO™ should use to resolve Java runtime classes (See Include JDK).
The wizard will examine the
.war file for classes and jars that are included.
These items include the special locations in
WEB-INF that are used by the web container as well as jars that may be referenced by JNLP files.
In addition to the jar files that are stored in the
.war file, DashO needs the classes that are part of the Servlet and JSP APIs.
The wizard will look for references to these jars in well-known locations and add them to the list of support jars.
If your application expects the web container to provide any other classes shared amongst web applications, such as the logging service log4j, you need to add it to the list of support jars.
Java modules (
.jmod) can also be added to the list of support libraries.
The wizard will ask about annotations used to decorate classes, methods, and fields in input code and will suggest potential annotation-based Entry Point rules that you could enable. Enable an annotation entry point if you are familiar with the annotation and believe that code elements that are decorated with these annotations should be preserved.
Additionally, the wizard will present a checkbox that enables automatic generation of Entry Point rules based on annotations used for Hibernate. Checking the box will set the following rules:
- Prevent any classes annotated with
javax.persistence.Entityfrom being renamed or removed.
- Prevent any of the following members of classes annotated with
javax.persistence.Embeddedfrom being removed:
- Getters (0-parameter methods with names beginning with
- Setters (1-parameter methods with names that begin with
Finally, the wizard asks for the directory where you want to save the wizard's output. The wizard will create several files in addition to a project file:
obfuscate.xml: An Ant script that opens the
.warfile, runs the DashO project file, and then reassembles the
obfuscate.properties: A Java properties file read by
obfuscate.xml. Use this file to change location defaults.
obfuscate.xml file can be executed by running Ant:
ant -f obfuscate.xml
or by calling it from another Ant file:
It performs three tasks:
It extracts the
.warfile into a directory. The default directory is
It runs the Wizard generated project file against the contents of the
.unwardirectory. Results are temporarily stored in the
It reassembles the
.warfile with obfuscated code in a new file with
_dashoedappended to the name.
If the directory you specified contains project files that will be overwritten, DashO will ask if you want to replace the project.
If you choose to save over the existing project, your new settings will be saved, and a backup will be created of the old project.
You will need to install DashO's Ant tasks to perform the obfuscation. See DashO's Ant Task documentation for additional details.