Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HttpUtility.HtmlEncode equivalant

843840Mar 17 2009 — edited Mar 17 2009
Hello,

I'm new to JSP but have experience with .NET, and was wondering if someone could help me with this.

I am trying to encode an ID value that is being passed in a querystring. This value (assuming it isn't null) will then be printed out to a page. In .NET I'd use the HttpUtility.HtmlEncode method but was wondering if there is something similar in Java. Please find an example of my code below.
<param name="movie" value="swf.swf<%= request.getParameter(" id=") != null ? "?id=" + request.getParameter("id") : "" %>">
</param>
Any advice you could give me would be greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2009
Added on Mar 17 2009
4 comments
530 views