Path Question for Linux versus Windows

Tom K <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <000001c34fa1$4df3fb30$6601a8c0@developer>
I have a line of code that looks like this:
out.println("<br>ImageWWW = " + "<img src='" + serverPath2image +
         myUpload.getFiles().getFile(i).getFileName() + "'
alt='Images'>");

It returns a string that looks like the one below, which works on Linux
but not Windows
http:myIPAddress/upload/uploads/UniqueDateId/images/bird.gif

Of course if I change the forward slashes to a back slash it works on
windows
http:myIPAddress\upload\uploads\UniqueDateId\images\bird.gif

How can I get the string to work on Linux and Windows browsers?

Thanks in advance!

T.K.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.