burtonator wrote:
>
> Scott Fraser wrote:
> <snip>
> > However it appears in JetspeedDiskCache.java, at line 210, that if the
> > URL appears to belong to the current server, a file URL is substituted
> > using JetspeedDiskCache.getLocalWebURL().
> >
> > So I guess our question is "why does it work like this", and what (if
> > anything) would be recommended for someone in our situation. For
> > instance, we may have servlets running under tomcat on the same host,
> > and we would want to hit them directly to fetch some XML. Is there a
> > better way to deal with this? By bypassing the FileServer/DiskCache
> > stuff are we creating problems for ourselves?
>
> Oh... yes. This is something I didn't consider (am I am moron or what?
> :)...
>
> This was done for performance reasons. It is much cheaper to fetch this
> URL from the filesystem instead of the HTTP server. There needs to be
> some detection code here.
>
> - if file exists
> - use local file
> - if file does not exist
> - assume URL is some type of CGI/dynamic content.
> - if url does not exist allow the webserver to report an error.
>
> I would be +1 for a patch to this. I will put this in TODO as a bug.
>
That's wrong too Kevin.
We should *never* try to bypass the server even when it's localhost. Why ?
Imagine the file is a jsp, cfm, php,... If you don't use the URL, these won't
be used correctly.
Let's assume that the administrator knows what he wants, if he uses an http URL,
use HTTP. If he usesa file URL, access directly to the file.
Note: this was disabled for security reasons. I don't think it's relevant because
URLs can only happen in the registry which should be maintained by an administrator.
--
Rapha�l Luta - [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]