0

I have a Glassfish server working on windows and a problem with alternatedocroot. When I use this

<property name="alternatedocroot_1" value="from=/images/9075.png dir=C:\member\"/>

and request server:8080/myapp/images/9075.png the correct file is displayed. However the directory is full of images so I have tried all of these at different times

<property name="alternatedocroot_1" value="from=/images/\*.png dir=C:\member\"/>
<property name="alternatedocroot_1" value="from=/images/*.png dir=C:\member\"/>
<property name="alternatedocroot_1" value="from=/images/\* dir=C:\member\"/>
<property name="alternatedocroot_1" value="from=/images/* dir=C:\member\"/>

but the same request (server:8080/myapp/images/9075.png) produces a 404 error. I am sure I am making a silly error but I can't see it. I hope someone can help.

4

1 回答 1

0

你试过这个吗?

<property name="alternatedocroot_1" value="from=/images/* dir=C:\\member\\"/>

这可能与 windows 反斜杠需要转义有关。

于 2014-03-12T10:49:36.650 回答