Hello!

I'm implementing a wrapper for the slide webdav client api, to better suit an image database which talks webdav. The idea is that the client should seamlessly talk to the server as if the images in the database was on the client computer (or client webserver in this case), and thus be able to create a servlet/JSP homepage which displays images from the database.

My first servlet is called IBServlet. It instantiates a WebdavResource to the root folder of the image database with a password and username for the webdav connection.

When IBServlet  generates a homepage, i add image urls like this:

<img src="IBShowIm?image=/path/to/picture.jpg"/>

IBShowIm is another servlet, that opens a connection to the webdav server by creating an IBFile(HttpURL(imagepath)) object (an extension to WebdavResource which is more suited to my purposes) and then streams picture.jpg to response.getOutputStream(). This works very well when using HttpURLs that don't need authentication.

My question now is, how do I make IBImShow know about the credentials(username and password, or perhaps the session information) that were given to IBServlet?

I figure that there are options like Sessions. I took a look at WebdavSession, but couldn't really figure out how to use it. WebdavSession.getSessionInstance() can return an HttpClient object, but i don't know how to use that later on.. does the HttpClient object know about the credentials I have entered earlier?

Are there other ways? Do you have any other suggestions?

Kind regards,
Erik Ahlner

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to