4 Replies Latest reply on Jun 20, 2005 1:13 PM by Antonio Dias

    External files in Jboss

    Antonio Dias Newbie

      Hello, I am doing a Web Application. And in JSP files I have images. this images are in "C:\images" directory. What could I do in Jboss to have acess to this images and show them when I start the web Application?


      Thank you

        • 1. Re: External files in Jboss
          Peter Johnson Master

          This cannot be done. A web browser only has access to the files in your war file (or war directory), and then not even to all of those. In fact, you should be glad it cannot be done because if someone could access c:\images remotely, they could just as easily access, for example c:\documents and settings\acardeiradias\passwords.txt.

          The best thing to do is have the ant script that buidls the war file copy the images from the c:\images directory to a location within the war file. Typically, is a simple web application, the jsp files go in the base directory and the image files into an images directory.

          • 2. Re: External files in Jboss
            Antonio Dias Newbie

            You don´t understand my question. Jboss could acess to local folders outside a .war file. I only want to know how could i do that. When you acess to a web appp in Jboss, the Container could acess to local folders.

            I don´t want a web browser acess to remote folders, this is what i do with html pages.

            "PeterJ" wrote:
            This cannot be done. A web browser only has access to the files in your war file (or war directory), and then not even to all of those. In fact, you should be glad it cannot be done because if someone could access c:\images remotely, they could just as easily access, for example c:\documents and settings\acardeiradias\passwords.txt.

            The best thing to do is have the ant script that buidls the war file copy the images from the c:\images directory to a location within the war file. Typically, is a simple web application, the jsp files go in the base directory and the image files into an images directory.


            • 3. Re: External files in Jboss
              Darran Lofthouse Master

              You don't say which version of JBoss you are using.

              However I think this is what you are looking for: -

              http://wiki.jboss.org/wiki/Wiki.jsp?page=ExternalDirectories

              • 4. Re: External files in Jboss
                Antonio Dias Newbie

                I use Jboss 4.0.2. I see that document and try to do what says there. But i do something wrong because that don't work. Someone have one file "jboss-service.xml" that is working with external directories?

                "darranl" wrote:
                You don't say which version of JBoss you are using.

                However I think this is what you are looking for: -

                http://wiki.jboss.org/wiki/Wiki.jsp?page=ExternalDirectories