How can I print a HTTP Request parameter inside of a <jsp:body>?
The following doesn’t work.
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<t:basePage>
<jsp:attribute name="title">Reset Password</jsp:attribute>
<jsp:attribute name="lib">lib/</jsp:attribute>
<jsp:attribute name="bodyClass">loginPage</jsp:attribute>
<jsp:body>
<%= request.getParameter("msg"); %>
</jsp:body>
</t:basePage>
I get this error:
HTTP Status 500 - /message.jsp (line: 39, column: 22) Scripting elements ( <%!, <jsp:declaration, <%=, <jsp:expression, <%, <jsp:scriptlet ) are disallowed here.
Try with Expression Language
OR simply
may be your configuration disables scripting elements.
EDIT
This does not relate to your current requirement since scripting elements seem to be disabled at your end. However the below is syntactically incorrect
You must never add a
;afterexpression_here<%= #expression_here %>for the simple reason that it translates to
out.print(msg;);which is syntactically incorrect.