Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to acces jsp:param from a scriptlet

843840May 15 2008 — edited May 15 2008
I need to access a value that was passed using jsp:param from within a jsp:include block:
<jsp:include ...>
    <jsp:param...>
</jsp:include>
In EL I can just say ${param.foo} but I'm not sure how to get to it from a scriptlet. Here is what I am doing:
<c:set var="foo" value="${param.foo}"/>

<%
    String foo = (String) pageContext.getAttribute("foo");
    ...use... foo
%>
But there has to be a more direct way to get to it. Any thoughts?

Thanks,
M
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2008
Added on May 15 2008
4 comments
754 views