1 2 Previous Next 22 Replies Latest reply on Feb 17, 2014 8:47 PM by kobe_fans

    Why the deployment of application in Wildfly can't access the web root directory?

    kobe_fans

      hi , everybody ~I met a problem ,  The description is as following:

       

      os: win7

      server version : Wildfly-8.0.0.Ahpla4

       

      Error occurred in this code:

      $38CD5CDAFBC50D3B.bmp(dir:"config-data/TESTDEV")

      My project is deployed in wildfly 8.0.0.Alpha4 , when i start up the server , there was an error message:

       

       

       

          Caused by: java.io.FileNotFoundException: ServletContext resource [/config-data/TESTDEV] cannot be resolved to absolute file path - web application archive not expanded?

           at org.springframework.web.util.WebUtils.getRealPath(WebUtils.java:236) ~[spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE]

       

      In short , Servlet container can't help Analyticing the root directory of the web application, but If parse "/" separately is ok , like this :

      d3.bmp

      That is to say , if another string behind "/" , it can not work .

      but I tested on tomcat is ok , I can use the api , using the method of Webutils.getRealpath() is right :

      5555.bmp

       

      84E.bmp

      So I'm confused , Why i can't get the web root directory in wildfly .

       

      I will appreciate any solution to my questions , Thanks for your help !

       

      消息编辑者为:zhihong liu

        1 2 Previous Next