Hi Paul,
On Nov 6, 2007 5:38 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> Hi,
>
> We are being a little inconsistent over the documented use of
> ResourceConfig.PROPERTY_RESOURCE_PATHS.
>
> The property value is String[] for the initialization property bag
> passed to the DynamicResourceConfig constructor.
>
> The property value is String for the servler init-param.
>
> I am wondering if there is a way to unify this and just use the String
> type with paths/jars separated using path separators? It is certainly
> possible to support String and String[] but in the latter case every
> entry may have one or more separated paths.
>
> It might be tricky since the path separator is different on different
> OSes. Is using the separator ';' for the servlet init-param a
> restriction when deploying on the Windows platform?
>
There is no problem with the current implementation of
ServletContainer because of:
String[] rels = resourcePathsParam.split(";");
> Perhaps we can learn from Ant [1]:
>
> "You can specify PATH- and CLASSPATH-type references using both ":" and
> ";" as separator characters. Ant will convert the separator to the
> correct character of the current operating system."
>
> Should we use this approach?
>
> Paul.
>
What happen in this case: C:\xxxx:d:\yyy ?
The expected behavior is to split into C:\xxxx and d:\yyy but there is
a conflict with ':' separator.
Maybe we can use always ';' separator. I works as well in Linux as in
Windows because the split is done in our code. Not by the OS.
--
Frank D. Martínez M.
Asimov Technologies Ltda.
Blog: http://www.ibstaff.net/fmartinez/