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

      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?