0 Replies Latest reply on Jun 29, 2016 1:49 AM by kavinaesh

    serve external directory outside war dynamically/statically using jboss-web.xml

    kavinaesh

      I am deploying a war with just a html file and javascript file on jboss 7.1.

      I need to access a source file which is not part of war. My html will only have this location d3.json('C:/finite/radial/data/radialOp.json'

      Another process will be updating this json after the war is deployed. The html in my web application should be able to reflect the updated data from the json everytime the json is updated without having to deploy the json again.

      Or if someone can guide at least for static file, that will also be helpful. I tried the below jboss-web.xml. It does not work. Please guide me how I can accomplish this.

       

      I checked the below links. But this did not give me what I need.

       

      https://access.redhat.com/solutions/204213

      JBoss6 serve external file static content docBase vhost - PlaceOweb Dotclear

      Serving static content outside of the WAR using Apache Tomcat

      Configure static resources in JBOSS AS 7

      How to put an external file in the classpath

       

      <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee

                                  http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

        <jboss-web>

        <context-root>C:</context-root>

        </jboss-web>

          <display-name>radial</display-name>

       

       

          <module>

              <ejb>radial.jar</ejb>

          </module>

          <module>

              <web>

                  <web-uri>radial.war</web-uri>

                  <context-root>radial</context-root>

              </web>

          </module>

       

       

       

      </application>