6 Replies Latest reply on May 27, 2014 5:19 AM by thorstenmueller

    .jar Files are not downloadable in WildFly 8

    thorstenmueller

      Hello,

       

      because this is my first post in this community let me introduce myself.

      My name is Thorsten Müller, living in Frankfurt germany and i'm new to java technology.

       

      I installed a wildfly 8 server on windows 2012 and deployed a "p2" repository (structure containing many .jar and .gz files) via .war file which was successful. I can download .gz files without any problems but when i try to download a .jar file i just receive "not found" error message even if they are within the same directory as the .gz file.

       

      Is downloading .jar files denied by security reasons? And if it's so - can i configure this security setting?

       

      Greetings

      Thorsten Müller

        • 1. Re: .jar Files are not downloadable in WildFly 8
          wdfink

          Hello Thorsten,

          welcome to the forums

           

          I don't understand what you try to achieve.

          What you have deployed to the server and why you try to download a jar?

          Did you see any server side errors in the logfile?

          • 2. Re: .jar Files are not downloadable in WildFly 8
            thorstenmueller

            Hello Wolf-Dieter,

             

            thanks for your reply.

             

            I could solve the problem by using a Microsoft IIS for providing the repository files.

            This p2 repository is nothing more that a simple file based structure (containing .zip, .gz, .jar) which needs to accessable by the client without interpreting, etc. - Uploading this filestructure to a ftp server would work ether.

             

            Regards

            Thorsten Müller

            • 3. Re: .jar Files are not downloadable in WildFly 8
              ctomc

              I only now saw this thread.

               

              Yeah it is security setting that prevents jar files to be served by default.

              you can change that by adding web.xml and allowing it.

               

              or even better if this files are statically on disk so you can serve them via IIS, you can just configure file-handler in undertow subsystem to serve specific paths directly from filesystem bypasing servlet container all together.

               

              example:

              under host

               

              <location name="/p2-path" handler="p2-content" />

               

              and under handlers:

               

              <handlers>

                      <file name="p2-content" path="c:/path/to/p2/repo" directory-listing="true|false"/>

                  </handlers>

              • 4. Re: .jar Files are not downloadable in WildFly 8
                thorstenmueller

                Hello Tomaz,

                 

                thanks for your feedback. That solved my problem :-).

                The next step is to add an additional http socket for my repository, because my wildfly serves already on ports 80 and 443 and our repository has to be served on port 8090 (for compatibility reasons). But i think i will achieve this on my own with some try'n error ;-).

                 

                Thanks so far.

                 

                Thorsten

                • 5. Re: .jar Files are not downloadable in WildFly 8
                  ctomc

                  That should be simple enough.

                   

                  you create another <server> and add new http-listener, add new socket binding and tell newly created http-listener to use it.

                   

                  something along the lines:

                   

                  <server name="p2-server" >

                          <http-listener name="default" socket-binding="http-p2" />

                          <host name="default-host" >

                                      <location name="/" handler="p2-content"   />                   

                                  </host>

                      </server>

                  1 of 1 people found this helpful
                  • 6. Re: .jar Files are not downloadable in WildFly 8
                    thorstenmueller

                    Hello Tomaz,

                     

                    thanks again - you just made my day :-).