Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number of files in a web server using JSP?

Status
Not open for further replies.

tommyc7

Programmer
Feb 3, 2007
33
US
Hi. I need to know the number of files in a directory in my web server for use in a JSP web application. I know the Java File class and File I/O part. The only thing that I am having a problem with is how to reference the name of the directory. In other words, how do I tell Java to open the directory <WEB SERVER HOME>/myapp/testdir. Do I need to fully qualify what <WEB SERVER HOME> is (which will change depending if I'm running this is test or production), or is there a way to reference it with a relative pathname?

 
Maybe you can make it relative to the app root directory.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top