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.
If you are using JSTL/EL etc... then why Java code inside the JSP? They should belong in your model layer. Can you tell us what configuration you have setup here (application server, JSTL version)? And perhaps the complete Error message?
Please read TellTheDetails.
I am just trying to see whether message in the LinkedList is getting displayed or not, hence java code, I will later put it in bean file. Server is GlassFish 3.1 and using Netbeans 7.0.1 and the output is the same which I have already mentioned. Again repeating -
Exactly. The EL and JSTL do not "see" scripting variables, only scoped variables. Even for testing, mixing scriptlets with JSTL/EL can be a problem -- they're like oil and water.
if we are setting using pageContext.setAttribute then where to get it!
To get the value you already have the code. But its about setting it. Just add the line I posted after you set the values of the list inside the scriptlet.
And please use code tags when posting code in the forums as already pointed out.
aatish pandya
Greenhorn
Joined: Apr 20, 2011
Posts: 21
posted
0
Dear Vijitha,
Look at the modified code as per your suggestion -
Result - No Effect - same Blank output. I would suggest, you please run the and test code on your system, this will help you know the real problem!
I am using NetBeans 7.0.1 to run the code!
aatish pandya
Greenhorn
Joined: Apr 20, 2011
Posts: 21
posted
0
Dear Vijitha,
Look at the modified code as per your suggestion -
Result - No Effect - same Blank output. I would suggest, you please run the and test code on your system, this will help you know the real problem!
I am using NetBeans 7.0.1 to run the code!
There are different ways you can access depending on the various data structures being used.
You already have done this for the List data structure. And the *square bracket style* ([]) can be used with Map, bean, List, Array types.
Here the "x" can be the index (for array types) or a key (for Map types) etc... Note that this object should be placed in one of EL/JSTL accessible scopes as mentioned already.
I suggest you read the EL, JSTL in the J2EE tutorial here for more examples.
Bear Bibeault wrote:The EL and JSTL do not "see" scripting variables, only scoped variables. Even for testing, mixing scriptlets with JSTL/EL can be a problem -- they're like oil and water.
Quoted for a wisdom!
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: Not able to execute code for forEach loop in EL