WebKit doesn't really have a good solution for this -- 
yet.  There is a setting "ExtraPathInfo" which is 
supposed to do what you're asking for here.  But last 
time I checked, the setting wasn't working :-( and it 
hasn't been fixed in the meantime.  I suppose that means 
nobody is using it.  Also, ExtraPathInfo is a global 
setting, but it really ought to be configurable on a 
servlet by servlet basis.

It also isn't easy to add new "servlet factories".  That 
is the way PSP works -- it registers its own servlet 
factory for all files with a .psp extension.  If this 
were easy to do, you could use this approach.

Your best bet at the moment is probably to use Apache's 
mod_rewrite to transform the URL.  There are some 
examples in the Webware Wiki that might help, but the 
basic idea is to transform URL's like /foo/bar/qux.xml 
into /XMLHandler?url=/foo/bar/qux.xml or something like 
that, so that you can write a servlet called XMLHandler 
that simply looks in the url query field for the "real" 
url.

- Geoff
> I just recently starting experimenting with WebKit, and I'm quite 
> impressed.  I'm hoping to port an app that currently runs on mod_python, 
> but I'm running into a stumbling block.  I need to be able to write a 
> servlet (or some other type of object that can be executed by WebKit and 
> persist in memory) that can be invoked indirectly by the webserver when 
> files ending with a specific extension are requested.
> Specifically I'd like to be able to hit .xml files at any url on the 
> server and have the request handled by this hypothetical servlet.
> 
> The way I do this with mod_python is by using AddHandler to associate .xml 
> files with the URL to my mod_python handler.  My mod_python handler can 
> then look at the PATH_TRANSLATED variable to figure out the real path to 
> the requested .xml file and then handle the request from there (applying 
> XSL stylesheets and such).
> 
> I created a subclass of HTTPServlet that I can hit directly at
> /WK/Sam/Test.  However, if I pass additional path information (by hitting
> something like /WK/Sam/Test/foo.xml, which is I think essentially what
> AddHandler does if /foo.xml is requested) I get a 404 from WebKit. I'm
> guessing it's not possible to pass extra path info to a WebKit servlet.  
> I get 404s whether I try to hit /WK/Sam/Test/foo.xml or /foo.xml, although
> in the first case the error message says that /WK/Sam/Test/foo.xml was not
> found and the second case says that /foo.xml was not found... but both
> messages are coming from WebKit instead of Apache, leading me to believe
> that Apache is actually routing the request the way I expect.
> 
> Although I haven't tried to use PSP, it must do some request handling 
> similar to what I want.  I could look into that further to see if I could 
> do something similar, but it looks like that would involve customizing 
> Webware which I don't want to do;  I'd much rather be able to write 
> something that runs on top of a standard Webware installation.
> 
> Any advice or pointers would be much appreciated.
> 
> Thanks,
> Sam
> 
> -- 
> Sam Brauer
> Systems Programmer
> [EMAIL PROTECTED]
> 
> 
> _______________________________________________________________
> 
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to