tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Algesten <>
Subject, form based login and files from other contexts
Date Thu, 03 Jul 2003 09:35:24 GMT
In a recent client project I used the WebdavServlet for the first time 
and encountered some configuration issues which lead me down the path 
of doing some patches to it.

Our client's site uses form based login which doesn't play well with 
WebDAV. All clients I've ever seen only do basic authentication. The 
problem is really that one web app can only have one type of login (I 
would like to be able to set different login types for different 
security-constraints in the same app). Changing to basic login is not 
really an option since that makes the site less slick, and part of the 
project was explicitly to do form based login.

The only way I can see to solve the problem was to add another 
parameter into the WebdavServlet so that it can server files of another 
context, in my configuration a "/webdav" webapp serves files off the 
ROOT ("/") context.

The changes to the WebdavServlet to do this are very trivial, add 
another parameter "fileContext" and override the getResources() method 
in the DefaultServlet with an exact copy except that rather than 
grabbing the local context, the method can now grab a foreign one if 
"fileContext" is set.

The added bonus with this solution is that .jsp files can be served 
from the the ROOT context through jasper, while the source code can be 
served in my /webdav context.

Is this an okay solution? Is it the right way of doing it? ... 
Shouldn't really the WebdavServlet be able to serve an arbitrary path 
of the file system? Have anyone else had the same problem, should the 
WebdavServlet be possible to configure along these lines?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message