Filters are the winner! Man, if I had only explored this avenue prior to your suggestion, I could have said myself a lot of time. Thanks Peter.
What I ended up doing was creating a filter that intercepted all requests for the webdav servlet. The filter determined what it needed to do in terms of renaming the URI. Created an HTTPRequestWrapper class and passed in the new URI and ServletPath. Easy as pie. This approach will allow me to continue to update Slide to newer versions and not have to worry about modifying my code, ever. Best, Ben -----Original Message----- From: Nevermann, Dr., Peter [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 9:41 AM To: 'Slide Users Mailing List' Subject: RE: Intercepts Ben, I would like to drive your attention also to servlet filters, which allow you to almost freely manipulate HTTP servler requests and responses. See src/webdav/server/org/apache/slide/webdav/filter for sample code. Regards, Peter > -----Original Message----- > From: Ben Switzer [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 23, 2003 14:12 > To: 'Slide Users Mailing List' > Subject: RE: Intercepts > > > Hmm... that makes sense. > > I'll give it a try and let you know. > > Thanks, > Ben > > -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Martin Holz > Sent: Thursday, October 23, 2003 3:50 AM > To: [EMAIL PROTECTED] > Subject: Re: Intercepts > > > Hello Ben, > > "Ben Switzer" <[EMAIL PROTECTED]> writes: > > > Good day. > > > > I'm trying to create an intercept that will change the name of the > > file that is being 'PUT' into my slide repository. > > > > I have implemented the intercept fine. The problem arises > when I try > > to list the contents of the directory it's placed in. > > > > I'm changing the name in revisiondescriptor and also > changing the uri > > to reflect the new name in revisiondescriptors with the > > precontentstore method in my intercept. > > I think, you can't do this, since Slide doing a lot of work with the > original uri before it calls the ContentInterceptor.Look into > org.apache.slide.content.ContentImpl.java. You are pushing the concept > of a > ContentInterceptor beyond its limits.Its about content, not about > structure. > > You may also have problems with the client. He will be > surprised not to > find the new resource, where he put it. It might be possible > to address > your problem at a different place. Extend WebdavServlet, so that it > sends a redirect to the new url. I never tried > HTTP redirects with PUT, but it might work. > > -- > Martin Holz <[EMAIL PROTECTED]> > > Softwareentwicklung / Vernetztes Studium - Chemie > FIZ CHEMIE Berlin > Franklinstrasse 11 > D-10587 Berlin > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
