Making JSP / JSF pages compatible for linux and windows

Hi,

is there an easy way to make a JSP / JSF page compatible to be deployed on both linux and windows app servers?

Right now, I'm running into problems when using relativ path names like in "url=/jsp/images/test.png" because of the file seperator.

Any ideas?

Cheers,

Chris

[311 byte] By [yesaiaa] at [2007-11-27 9:23:57]
# 1
The file separator "/" shoud just work on Windows as well as UNIX machines. The file separator "\" indeed only works on Windows machines and should be avoided all the time.
BalusCa at 2007-7-12 22:19:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

BalusC is correct about the file separators. I would add that for URLs, the separator is always /

Also, Java provides a number of ways get at OS specific things like this in a portable manner. The file separator is stored in java.io.File.separator. The path separator is stored in java.io.File.pathSeparator. There are many useful properties accessible by java.lang.System.getProperties(); for example the line separator.

RaymondDeCampoa at 2007-7-12 22:19:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...