I have been working with ASP, and now learning JSP. I could not find alternative methods as in ASP: <em>Server.URLEncode</em> and <em>Server.HTMLEncode</em> Thanks
Two things to note when posting code to this board: 1. Please put UBB CODE tags round your code to preserve the formatting. 2. If you use HTML escape sequences in your code such as > they will be converted to the equivalent characters when the page is shown, which will probably mystify readers. To force the board to show > you need to type &gt;. I have edited the above example to do this, but everyone should really be aware of these issues when posting code. [This message has been edited by Frank Carver (edited November 29, 2000).]
That's doing it the hard way! Sun already provides a URLEncode method. for an HttpServletResponse object, invoke: String encodedURL = response.encodeURL( originalURL );
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking