开发者

Glassfish directory mappings: resources are cached by glassfish

I use the external resources mapping by glassfish for storing user uploaded ima开发者_开发百科ges (sun-web.xml):

<property name="downloadroot" value="from=/downloaded dir=c:\glassfishv3\downloads"/>

I store uploaded images to this directory. The first download is ok, the image is shown at the address server:8080/downloaded/image_13.png. But when the users uploads another file and replaces the image (it is really replaced in file system) the GF doesn't show new image, but the old one. Event restart and osgi-cache/generated clean doesn't help! That's very misleading and hope anyone could help me with this issue..


Ok, the issue was in JRebel! I spent the whole day, and finally found the issue! So, if anyone meets with it, the reciept to fix is to include the gf virtual path to rebel.xml like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<application>
    <classpath>     
        <dir name="${myproject.root}\target\classes" />
    </classpath>
    <web>
        <link target="">
            <dir name="${myproject.root}\src\main\webapp" />
        </link>
        <link target="">
            <dir name="C:\glassfish3.1" />
        </link>
    </web>
</application>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜