edit-icon download-icon

Convert JAR to WAR

Last Updated: Jan 16, 2018

Currently, EDAS supports web projects in WAR format only. Therefore, if your project was released as a JAR package, you must convert it to WAR first. This document uses a Maven-based project as an example.

The process is as follows:

  1. Convert the POM file from JAR to WAR.

    jar-war

  2. Add a web.xml file configuration, if not available.

    add-webxml

  3. Configure the web.xml to load the configuration file.

    <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:hsf-provider-beans.xml</param-value>
    </context-param>
    
    <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener
      </listener-class>
    </listener>
    <listener>
      <listener-class>
         org.springframework.web.context.request.RequestContextListener
      </listener-class>
    </listener>
    
Thank you! We've received your feedback.