0 Replies Latest reply on Sep 12, 2014 11:33 AM by Sam Jones

    Wildfly - Cannot get root web context using ServletContext.getContext("/")

    Sam Jones Newbie

      I am using Wildfly 8.1.0.Final. I need to get a file from the root web context within a servlet. When I try the following line of code:

       

      ServletContext servletContext = this.getServletContext().getContext("/");
      

      The variable servletContext is null.

       

      This worked fine in JBoss AS 7.

       

      Is this a bug or by design? Is there something I can put in standalone.xml?