• Post Reply Bookmark Topic Watch Topic
  • New Topic

Use http to get a directory list

 
Steve Dyke
Ranch Hand
Posts: 1716
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a need to use http to get a list of files within a particular directory. The directory already serves up http but some times I will not know the exact file name so I need a list to choose from.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try writing your post again. I really have no idea what you are asking for.

Files on the client or server? What kind of list? For what purpose? Etc...
 
Steve Dyke
Ranch Hand
Posts: 1716
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the client jsp page I have a textbox that is auto populated from parts inventory database. Beside it is a link to view the associated drawing of the part. The drawings reside on a network server. The drawing are accessible using http url path. Alot of times the inventory part numbers may vary from the drawing number such as inventory part number may be MC32-23 and the drawing number will be MC32-XX.pdf. In the cases where I do a search for the drawing(and I can find most of them with my code) I don't find a match, I need the user to be able to see all of the drawings in a particular folder and view the correct one.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you have a java process or server running on the machine where the files are?

Or is the file system of that server mounted such that your web server can see it?
 
Steve Dyke
Ranch Hand
Posts: 1716
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't reay know the answer to the fist question.

As far as the second, there is supposed to be a link from the iSeries where my web app runs and our windows server called QNTC. However, it is not reliable.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you either need a reliable mount so you can inspect the file system using Java file I/O, or you need to be able to run something on the remote system that can report the information to your server (via a web service, or RMI, or any of the other Java network technologies).
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try JCIFS to go directly to the Windows shares from Java, rather than via QNTC.

You might see if you can get WebDAV enabled on the Windows HTTP server, and use Commons VFS or do the PROPFIND yourself to list directories. Finally, you could just make sure directory listings are enabled and parse the returned HTML for links.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!