3 Replies Latest reply on Jun 5, 2014 4:48 PM by ctomc

    Wildfly 8.1.0 doesn't allow to access jar files from war context

    fuzao

      Hello,

       

      I'm facing a problem when trying to get some jar files from JNLP with Wildfly-8.1.0.Final. I'm always getting Unable to load resource.

      I've downloaded Wildfly-8.0.0.Final and, exactly with the same configurations, I'm able to access the jar file.

       

      http://localhost:8080/app/gui.jar (for instance) fails with Wildfly 8.1 and succeeds with Wildfly 8.0.

       

      Is there any configuration thate we have to make, some security issue?

       

      I have my firewall turned off. No proxy settings.

       

      Any help please?

       

      Thanx

        • 1. Re: Wildfly 8.1.0 doesn't allow to access jar files from war context
          ctomc

          Just add this config to your web.xml

           

          <servlet>
                <servlet-name>default</servlet-name>
                <servlet-class>io.undertow.servlet.handlers.DefaultServlet</servlet-class>
                 <init-param>
                    <param-name>allowed-extensions</param-name>
                    <param-value>js, css, png, jpg, gif, html, htm, txt, pdf, jpeg, xml, zip</param-value>
                </init-param>
                 <init-param>
                    <param-name>disallowed-extensions</param-name>
                    <param-value>class, jar, war</param-value>
                </init-param>     
          </servlet>

          and modify allowed / disallowed extensions anyway you want

          • 2. Re: Wildfly 8.1.0 doesn't allow to access jar files from war context
            fuzao

            That works for me for thanx.

             

            Nevertheless I have to say that's not a good solution, since it hooks applications with undertow project. If one wants to change application change, web.xml needs to me modified.

            Is there any possibility to configure this in standalone.xml into undertow subsystem?

            • 3. Re: Wildfly 8.1.0 doesn't allow to access jar files from war context
              ctomc

              we are working on expose this configuration in subsystem config, and also change what current defaults are.

               

              if you are up for it, can you create jira for it, so we can track it.