Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

directory listing  RSS feed

 
Manisha reddy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want develop a JSP page which will list the directories and files.
Could anyone help me in writing the code for the same?

Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66199
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manisha reddy:
I want develop a JSP page which will list the directories and files.


Which directories and files?
 
Manisha reddy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is the input which is taken at run time. It can be any say "X"
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Directories on the webserver or on the client's machine?
 
Manisha reddy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
directories will be on the web server
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the java.io.File class to grab the names of all the files and subdirectories you need and store them in some sort of a Collection object. Then display those using JSTL on the JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!