0 Replies Latest reply on Dec 23, 2015 3:02 PM by Dan Miller

    display xhtml files that users uploaded in zip file

    Dan Miller Newbie



      I'd like my users to be able to upload a zip containing .xhtml files and then see and browse them.


      I set up a folder where I save the uploaded zips and another folder that contain the unzipped files.


      I changed the standard.xml like this:


                  <server name="default-server">

                      <http-listener name="default" socket-binding="http" max-post-size="974247881"/>

                      <host name="default-host" alias="localhost">

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

        <location name="/content" handler="upload"/>

                          <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>



                  <servlet-container name="default">





                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

        <file name="upload" path="${jboss.home.dir}/standalone/data/unzipped" directory-listing="true"/>


      When I put a link to the folder inside my JSF view:


      <h:outputLink value="http://localhost:8181/content">KLICK</h:outputLink>


      the files are listed because of the directory listing. When I remove the attribute directory-listing, I get a 403 error.


      In the folder called "unzipped" there is an index.xhtml and another folder containing more .xhtml files. In the index.xhtml, those files are linked to with relative links.


      How can I make it so that those files are displayed and the links between them work correctly?


      How come that the content in the welcome-content of Wildfly is displayed but my content isnt?


      I am using Wildfly 9.