|
From: Leif M. <le...@ta...> - 2003-07-25 01:42:11
|
I have been looking into the options for how to make it possible to include # characters in a property value. The problem is that property declarations like the following do not work because The Wrapper clips everything from the # as a comment. wrapper.java.additional.1=-Dtest=my#test The Wrapper sees the above as: wrapper.java.additional.1=-Dtest=my 1) One option is to ignore # characters inside of quotes, but this causes problems on *NIX platforms. It is not possible to strip the quotes because changing that would cause compatibility problems with users who are already using quotes and expecting them to remain unmodified by the Wrapper. So this is pretty much a no-go. 2) Introduce an escape character to make it possible to escape the # when it should be included. The obvious escape character would be the backslash. But I unfortunately can not use it because users have been using unescaped backslash characters in their wrapper.conf files throughout the life of the Wrapper. The option I am looking at right now for the escape character is another # character. So 2 # characters would resolve into 1 in the actual property value. It seems a little hackish and would not be usable in other contexts if other characters ever need to be escaped in the future. Currently, the ## option is the only one that is viable. Does anyone have any other ideas. Using the above example, wrapper.java.additional.1=-Dtest=my##test#Comment Would resolve to: wrapper.java.additional.1=-Dtest=my#test Cheers, Leif Leif Mortenson wrote: > Sebastian, > Sorry, this is currently not possible to do within the wrapper.conf > file. An > oversight on my part. I did find a workaround, but am not sure if it > will work > for you. > > The Wrapper has the ability to accept any property from the command > line. > If you launch the Wrapper using the following command, all on a single > line > then your application should work: > > Wrapper.exe -c ..\conf\wrapper.conf > wrapper.java.additional.11=-Dxenon.service.args=foo#bar > > I opened a bug for this at the following URL. Please monitor it to > track its progress. > https://sourceforge.net/tracker/index.php?func=detail&aid=777303&group_id=39428&atid=425187 > > > I have to play around with my options on the different platforms. > > Cheers, > Leif > > Sebastian Hauer wrote: > >> Hi, >> >> I am new to the java service wrapper so far it seems very promising. >> But I am having a problem setting a system property on windows. The >> value of this system property unfortunately has a # character, like >> this: >> >> wrapper.java.additional.11=-Dxenon.service.args=foo#bar >> >> Unfortunately our application receives only "foo" as the value of >> xenon.service.args. >> I tried escaping # using \# but this would not work and instead got >> "foo\". >> I assume this is a bug in how the wrapper C code parses the properties >> file. >> >> Regards, >> Sebastian >> >> >> ------------------------------------------------------- >> This SF.Net email sponsored by: Free pre-built ASP.NET sites including >> Data Reports, E-commerce, Portals, and Forums are available now. >> Download today and enter to win an XBOX or Visual Studio .NET. >> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >> >> _______________________________________________ >> Wrapper-user mailing list >> Wra...@li... >> https://lists.sourceforge.net/lists/listinfo/wrapper-user >> >> >> > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |