This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSP and the fly likes JSTL out with JSP expression Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "JSTL out with JSP expression" Watch "JSTL out with JSP expression" New topic
Author

JSTL out with JSP expression

Anand Wadhwani
Ranch Hand

Joined: Mar 21, 2005
Posts: 151
I am unable to use a JSP expression inside JSTL out tag:

e.g.


If I replace the out tag in above snippet with following:

<c ut value="<%= pageContext.getAttribute("i") %>"/>

It should work, but it doesn't! I get following error:

Attribute i has no value

I am using WebSphere 5.0 server (JSP 1.2 specification)

Thanks much!


SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56554
    
  14

Bearing in mind that you are extremely limited in what you can do with the JSTL and EL in a JSP 1.2 environment, if you are going to be using scriplet expressions in conjunction with the JSTL, you need to declare the 'rt' version of the JSTL URI.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JSTL out with JSP expression
 
Similar Threads
Trouble with retrieving dates after I create a column alias
JSP 2.0 EL and html:options issue
Error while accessing parameter values using JSTL forEach tag
Default JSTL URI can't be resolved
howto use JSTL foreach to display list ?