This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes scriptlet to el/action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "scriptlet to el/action" Watch "scriptlet to el/action" New topic
Author

scriptlet to el/action

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
What is EL/Action code equivalent to this Scriptlet code:

<%
request.setAttribute("key","value");
%>

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

There is no EL equivalent. The EL is a read-only expression language.

You can set scoped variables with the JSTL:

<c:set var="name" value="${whatever}" scope="request"/>
[ June 01, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Thanks Bear.

This point should go in HFS&J.

Originally posted by Bear Bibeault:
The EL is a read-only expression language.


 
GeeCON Prague 2014
 
subject: scriptlet to el/action