Re: Problems with slash (/) and plus (+) in URL

Splash Forums PrettyFaces Users Problems with slash (/) and plus (+) in URL Re: Problems with slash (/) and plus (+) in URL

#20678

Ralf Haller
Participant

The problem here is that the actual ‘+’ is not being encoded as ‘%2B’, and I believe this is a fault of the URLEncode object, which is not actually meant to encode URLs apparently… great name, Sun.

Strange, running “URLEncoder.encode(“a + b”)” gives me “a+%2B+b” under Sun Java6

I agree with Christian, though. As a temporary workaround, I would manually encode the ‘+’.

This is good as a temporary hack, however a final solution would be great.