File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes EL and Scriptlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "EL and Scriptlet" Watch "EL and Scriptlet" New topic
Author

EL and Scriptlet

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
How can we declare the variable in EL? Is't possible to do all the operations done by scriptlet (expression, declaration and scriptlet) in EL?

I know the expression can be done at EL:

For Example:
<%! String str = "Hello"; %> // for this???
<% request.setAttribute("hi",str); %> //<c:set...>
<%= request.getAttribute("hi"); %> // ${}

Whether there will be only one uri per tld file?
[ January 10, 2007: Message edited by: Micheal John ]

Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Sanjeev Singh
Ranch Hand

Joined: Nov 01, 2006
Posts: 381
<%! String str = "Hello"; %> // for this???

I dont think you can write a EL to get the value of str!


~Sanjeev Singh<br />SCJP 1.5
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14669
    
  11

use c:set with "page" scope.


[My Blog]
All roads lead to JavaRanch
Sanjeev Singh
Ranch Hand

Joined: Nov 01, 2006
Posts: 381
Yes Satou,
You are right.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EL and Scriptlet
 
Similar Threads
Qn from JSP Spec
looking for quick reference to jsp taglibs
doubt in value for rtexprvalue element in tld
Passing values to param value dynamically in jsp
Content of JSTL test attributes