• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1255
  • Last Modified:

how to pass an EL variable into a scriptlet?

hi,

i am setting a variable with EL syntax as mentioned below.
<c:set var ="_p0"><%=PolicyQuery.getINSURED_ADDRESS_LINE1(0)%></c:set>

am trying to call this scriptlet method like this:
<%=PolicyQuery.getSingleQuotDoubleQuotEncoding(_p0)%> --this line is throwing error.

_p0 passed in this method is set with EL , how can i get that in SCRIPTLET ?
0
mali_ini
Asked:
mali_ini
1 Solution
 
Eternal_StudentCommented:
I think you are setting the variable incorrectly, try this:

<c:set var ="_p0" value="<%=PolicyQuery.getINSURED_ADDRESS_LINE1(0)%>"/>
0
 
TimYatesCommented:
that shouldn't make any difference (afaik)
0
 
mali_iniAuthor Commented:
i m getting an error saying _p0 cannot be resolved, how can i resolve this?
0
 
rrzCommented:
You can use  
<c:set var ="_p0"><%=PolicyQuery.getINSURED_ADDRESS_LINE1(0)%></c:set>
<%
  String _p0 = (String)pageContext.getAttribute("_p0");   // I assumed String, but you have to use your correct type
%>
<%=PolicyQuery.getSingleQuotDoubleQuotEncoding(_p0)%>

Where do you want to use EL ?    rrz
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now