Reputation: 2221
I have action in my jsp page <jsp:include page = <%=(String)request.getAttribute("page")%> />
the page
is request parameter that i have set previously in my servlet. But when i try to access my jsp page i get.
<jsp:include page = <%=(String)request.getAttribute("page")%> />
How to set page
correctly ?
Upvotes: 0
Views: 1066
Reputation: 46871
I suggest to avoid Scriplet instead use JSP Standard Tag Library and Expression language that is easy to user and less error prone.
the
page
isrequest parameter
that i have set previously in my servlet.
Since as per you its request parameter
then you can access it using JSTL and EL from parameter.
${param.page}
If its set a request attribute
the access it a below:
${requestScope.page}
See Difference between getAttribute() and getParameter()
Upvotes: 1