You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Simon Kelly <ke...@ipe.fzk.de> on 2003/06/30 15:22:01 UTC

Using URLConnection to get a list of files in a directory.

Hi all,

I am trying to make my webapp, path safe, by only using the URLs to get at
all the resources, so that I can get at the files even if the war has not
been unpacked. However, I need to get a list of files contained within a
directory within the WEB-INF/ and record their names in a String[], and
cannot see any way of doing this with the URLConnection class or the URL
class.

Does any one know how I could acheive this?

Cheers

Simon


"I have often wondered how it is that every man loves himself more than all
the rest of men, but yet sets less value on his own opinion of himself than
on the opinion of others." -- Georg Christoph Lichtenberg

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : kelly@ipe.fzk.de


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org