• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

valid places where we can put EL?

 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are valid places where we can use EL?

for example in HFSJ I saw following use of EL

<jsp:useBean id="myDog" class="foo.Dog">
<jsp:setProperty name="myDog" property="name" value="${list[1]}"/>
</jsp:useBean>

We can use EL in any jsp standard action? I am listing where all I saw EL being used till now

1.JSP page
2.jsp:setProperty

Can anybody list other places where EL is legal?It can be used anywhere in jsp?

Thanks
Veena
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Veena,

You can use EL expression in :

- a normal "template text data" <h1> ${xx} </h1>

- ALL XML actions such as standarts, JSTL and custom tags that accept "request-time expressions".

JSP STAND ACTION
--------------------
<jsp:include>
<jsp:forward>
<jsp aram>
<jsp:setProperty>

JSTL
-------

<c ut value="EL" />

<c:var target="EL mandatory" value="EL" />

<c:if test="EL" /> and <c:when value="EL" />

<c:forEach items="EL" begin="EL" end="EL" step="EL" />

<c:url value="EL"> , <c:import url="EL" /> and <c:redirect url="EL" />


CUSTOM TAGS
-------------
for all tags that have declated <rtexprvalue>true</rtexprvalue>


Hope it help you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic