We have data in DB which contains special characters as &. While displaying the data in view(jsp) page its getting replaced with &
.
For eg:
DB data: Hari & Kishan
in UI displayed as: Hari
&
Kishan
Currently we have managed use charset='UTF-8'
in page import but there is no result of conversion of &
to &. below is the code snippet of imports which used in the jsp page.
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width">
Could anyone help in getting this issue solved so that the value showing in view will be similar to Db data.