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

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

    zhihong liu Newbie

      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:


      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 :


      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 :




      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