Neeme Praks wrote:
> 
> When trying to solve the issue of Tomcat's filename mapping from virtual
> to filesystem. I came to the conlusion that the best solution to this
> problem is to allow JetspeedDiskCache to call the request.getRealPath()
> method. Or is there some similar but static method in the servlet API
> that isn't tied to a specific request object?

I checked the code JetspeedDiskCache has definitely a buggy handling
of local URLs, thanks for the report.

I believe request.getRealPath() is deprecated and replaced by 
ServletContext.getRealPath() in servlet2.2.
The issue though is that the cache must be able to work stand-alone
so can't access any request or Servlet specific information.

> However, as I don't understand Jetspeed very well (and just starting out
> in the servlet environment), maybe someone else can comment on this?
> 
> I see this possible by storing the request object in the EngineContext
> and creating a getRealPath() method on EngineContext (that would wrap
> the request.getRealPath() method). However, I'm not sure about storing
> request in the EngineContext, are there some issues with multithreading,
> etc?
> 
> Neeme
> 

See above for my comments. As an addition I'd say that storing request 
information is definitely *not* an option for a lot of reasons.

If you want to fix this issue, use the following patch which disable
the specific process of local URLs (until someone can think of
a better way to do it) :

D:\cvs\java.apache.org\jetspeed\src\java\org\apache\jetspeed\cache\disk\)
Index: JetspeedDiskCache.java
===================================================================
RCS file:
/products/cvs/jetspeed/jetspeed/src/java/org/apache/jetspeed/cache/disk/JetspeedDiskCache.java,v
retrieving revision 1.16
diff -r1.16 JetspeedDiskCache.java
284a285,287
>         //FIXME: disable local URL detection because of virtual mapping bug
>         return null;
> 

Note: I won't commit this patch to the CVS so you'll have to apply it yourself.

I'll put the bug in the TODO list.

--
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]

Reply via email to