Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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: 60781
    
  65

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.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scriptlet to el/action
 
Similar Threads
Not able to run sample servlet + jsp
why servlet as controller
How to Configuring Servlet Mappings?
EL question
forEach tag