Re: Newbie question: listing files

2004-12-10 Thread Erik Weber
The way to do this is to create a link to an action that reads the bytes in from the file and writes the bytes out to the ServletResponse's OutputStream (unless the files are all, for example, text or HTML files that you can place directly within the server's public document root). So you are n

Re: Newbie question: listing files

2004-12-10 Thread Sunny
Brij Naald wrote: Hi, I want to list all the files in a directory. How do I start this? I assume I have to make an action: The action then creates an array of Strings (so String[]). and puts it in the request (so request.setAttribute("files",stringArray);) Then I have to make t

Re: Newbie question: listing files

2004-12-10 Thread Brij Naald
Thanks for your answer. If the approach i'm trying now doesn't work, I certainly going to try that one. But it almost works. The action gets called, and it puts the right names in the request. What I want to do now is to put in the JSP-page links to a page (viewfile) which shows the file in que

Re: Newbie question: listing files

2004-12-10 Thread Erik Weber
Brij Naald wrote: Hi, I want to list all the files in a directory. How do I start this? I assume I have to make an action: The action then creates an array of Strings (so String[]). and puts it in the request (so request.setAttribute("files",stringArray);) Then I have to make

Newbie question: listing files

2004-12-10 Thread Brij Naald
Hi, I want to list all the files in a directory. How do I start this? I assume I have to make an action: The action then creates an array of Strings (so String[]). and puts it in the request (so request.setAttribute("files",stringArray);) Then I have to make the jsp-page which u