File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 60059
    
  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
forEach tag
How to Configuring Servlet Mappings?
Not able to run sample servlet + jsp
EL question
why servlet as controller