servlet:
response.sendRedirect("showMessage.jsp?ValueA=1");
jsp:
var a=<%=request.getParameter("ValueA")%>;