Use JSTL Tag to avoid Cross Site Scripting issue
JSTL is very common word across web developer who work on dynamic content display in JSP page creation. It may be common practice now a days but thought it would worth sharing this information. This information will be helpful... Lots of developer use normal scriptlet to print dynamic values from user in JSP. e.g. String langId = request.getParameter("langId"); <%=langId %> This might be fast way to do the coding but not the safest way. This approach will make your website vulnerable to security threats like Cross Site Scripting. And can be easily used by malicious user to do some fishing in your website. Malicious User's can use this loop hole to redirect to some fishing website and capture critical user data. To address this issue there are many approaches available but one of the better and simpler approach is to use JSTL tags. These tags takes care of these above mentioned issues on its own. No additional coding is required. If you use <c:out value=...