tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Option to allow "\" in hardcoded file paths
Date Tue, 06 Aug 2013 16:01:22 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jeffrey,

On 8/6/13 11:05 AM, Jeffrey Janner wrote:
> Had a programmer build a filepath using "\" instead of "/" ,
> because he's windows centric (duh).
> 
> Works great on my mostly windows deployments, but fails
> spectacularly on Unix/Linux boxes.
> 
> Is there a Java option that can force the Linux boxes to treat the 
> backslash as a forward slash?
> 
> Fixing the code for future releases, but need to get something
> working now with existing code.

Usually, the procedure is to always use / and let the Windows JVM
"convert" the file path appropriately. The reason to favor "/" instead
of "\" is because "\" has another meaning as a general-purpose escape
character.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSAR3PAAoJEBzwKT+lPKRYGtkP/0oKxhT+u1T0crLzsi37E+++
gIibqqIUtAcrWNU9NeAACc39dMT+avATR1P+2G5OnxG0doqrXjvVqYiX9F+hgv2g
cWXNH5GJUCRpJKH5LPWcdcxGziqselHiWy2aKnLYoEY598JtvcjRE2sBKApjPvNA
VQmcCBeBbbJlo1hgdMzOM85MZyYoPke0PVPAz53jsr06yrtPmzyyup67tAbdQaZ4
lgYlxpXn+9N6QTJLf6zQq9ByClgEBGDuiAdZIklM1dVm/LCqDzLsHLngs7XfvQxF
k/Fw8Ej5qyvNE2J8zSADmsjGazszjdJF/w167dTLPbZtpg1/HaRLLZ6ywK5i1oZP
QdmDTaLhp1BzLlx500K2uzpDJlP9/41oP19yN+/+YJP0uf/Bq6sLwnh9uCrdbKsm
pKQtVNtB0u1xXoyui0gF8VyCQnTiIVIfHFXIXFvGOm9nDqUJva2eViJimI5eKPG5
LxNFRBu7wtOFt5QpMgoFoSwEKt0E24FHNYP5qa+uW3jHVv5UW8xECpPv9uishmkO
XjQfej1SOhgzvxm8yGkTB+twt51zfx7joUHZMyZ/OowPgBe5sbqBe3q7W71MDj09
M6DiRjuPEewIs12Hh7QkKQURt9Y4Khae01+ShegTFwsi74QHbMc9Eer0KCie8+/d
q5R6LY1mGn99imKc0B/4
=YxII
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message