[jcifs] Web interface around JCIFS?

Michael B. Allen mballen at erols.com
Sat Sep 1 04:32:12 EST 2001


On Fri, Aug 31, 2001 at 10:55:15AM -0400, Chris Shenton wrote:
> I'm working a project requiring read/write Web access to internal NT
> shares.  I looked at SMB2WWW and it's a great start.  But JCIFS looks
> like it provides a much more rich set of features.
> 
> I was thinking of writing some Java servlets around JCIFS, effectively
> allowing it to do what SMB2WWW does, and much more.

Yeah, sure. I think it would work pretty well.

> Is anyone aware of similar work, projects, or even commercial
> products which do this? 

I'm not aware of any project that does this but I'm sure someone probably
has. I had never heard of SMB2WWW until now. It looks like just a cgi
wrapper for smbclient. Using jCIFS for this sort of thing would probably
work a lot better. I actually have a cgi script at work that allows me
to make a link for any file on the network. If you send the appropriate
headers based on mime-type it will launch the appropriate app etc. Works
great but the Exception handling for 0.6 will really be necessary
here because as it is the script will put any Exceptions that occur
_inside_ the doc that you download (oops).

If you do it correctly, I bet it would be pretty popular because people
could access their CIFS shares over the web through the firewall. And
it would be comparitivly safe because there's no such thing as a buffer
overrun in Java of course you still need a decent secure authentication
mechanism!

> If not, I may go ahead and start working on something like this.  I'm
> a long-time coder-boy but not real strong on java servlets yet, but it
> seems a nifty project.

Servlets are pretty trivial especially if you know the http protocol
and about headers and such. One interesting thing about servlet
engines though, is I think they use separate class loaders for each
servlet instance. If so, this will create a separate jCIFS client
instance for each which is a terrible waste of it's multiplexing IO
capabilities. Something to be aware of.


Feel free to ask if you have any questions.

Mike

-- 
Wow a memory-mapped fork bomb! Now what on earth did you expect? - lkml




More information about the jcifs mailing list