Skip to content

Latest commit

 

History

History
87 lines (67 loc) · 4.07 KB

README.md

File metadata and controls

87 lines (67 loc) · 4.07 KB

pstExtractor

A JSF-based server for uploading all parts of a PST file except the messages (you can see contacts, tasks, and calendar entries). Note that, as it uses CDI, it needs an EE-capable servlet to run. Tomcat is no longer supported, but Tomcat EE is.

Variants

Basic

The basic version of this application does not include an implementation of Java Server Faces; it needs to be deployed to a full-fledged Java EE server like TomEE.

MyFaces

This application can be built to provide Java Server Faces support using Apache MyFaces using the myfaces profile. This will create a war file with the classifier "myfaces". mvn clean install package -P myfaces

Mojarra

This application can be built to provide Java Server Faces support using Eclipse Mojarra using the mojarra profile. This will create a war file with the classifier "mojarra". mvn clean install package -P mojarra

Mojarra, Weld, and Jetty

The Eclipse Foundation's recommendation for Mojarra is to include the weld-servlet-shaded library. This triggers warnings about classes being imported from multiple places when running Jetty via the jetty-maven-plugin. To eliminate these warnings, you can use a subset of weld servlet libraries with -Dweld.library=jetty.

Details of execution under various containers

TomEE - standalone server

This has been tested on Tomcat EE 8. To deploy this on a locally running version of Tomcat, ensure that there is a user with the role manager-script configured in your tomcat-users.xml file. In my case, the user with this role is script, and the password is admin:

    <tomcat-users>
	<role rolename="manager-script"/>
	<user username="script" password="admin" roles="manager-script"/>
    </tomcat-users>

Add the following section to the element of your maven settings.xml:

    <!-- Local Tomcat server -->
    <server>
      <id>LocalTomcatServer</id>
      <username>script</username>
      <password>admin</password>
    </server>

You may now deploy/undeploy/redeploy the app via

  • mvn tomcat7:deploy
  • mvn tomcat7:undeploy
  • mvn tomcat7:redeploy

The application will be available at http://localhost:8080/pstExtractor-<version>

TomEE via Codehaus Cargo plug-in

It is also possible to run the application via a TomEE instance running in a Codehaus Cargo container: mvn clean package cargo:run -P tomee-local

The application will be available at http://localhost:8080/pstExtractor

Tomcat - standalone server

The Tomcat admin user and server settings must be configured as for [TomEE - standalone server](#TomeEE - standalone server) This has been tested on Tomcat 9. To run on Tomcat 9 using Mojarra: mvn tomcat7:deploy -P mojarra The application will be available at http://localhost:8080/pstExtractor-<version>

To run on Tomcat 9 using MyFaces, pull in an extra required library using the environment variable: mvn tomcat7:deploy -P mojarra -D environment=myfaces-tomcat

The application will be available at http://localhost:8080/pstExtractor-<version>

If you want to have both the mojarra and myfaces versions available under the same Tomcat instance, copy the respective war files with the mojarra or myfaces classifier into the Tomcat webapps directory.

Tomcat via Codehaus Cargo plug-in

To run the application via a Tomcat instance running in a Codehaus Cargo container: mvn clean package cargo:run -P tomcat-local -P myfaces -D environment=myfaces-tomcat or mvn clean package cargo:run -P tomcat-local -P mojarra

The application will be available at http://localhost:8080/pstExtractor

Jetty

This has been tested on Jetty 9 using the jetty-maven-plugin. To run on Jetty using Mojarra: mvn jetty:run -P mojarra To run on Jetty using MyFaces: mvn jetty:run -P myfaces

You can then load the app by browsing to http://localhost:8080

Troubleshooting

If you find the server is low on memory, add the following line to the file /bin/catalina.sh

    # Required for pst file processing
    JAVA_OPTS="$JAVA_OPTS -Xmx1024m"