I don't use MyFaces, but tried the same with RI. I don't receive any output, because the map can't be found by the EL. I think that the EL-statement is evaluted and Faces tries to look for an attribute myMap in the scopes request -> session -> application, but no attribut is found.
To solve this problem, you can save your map in the request-scope and everything should work as you had expected it:
Dave Alvarado wrote:Thanks for this creative work-around, but is the lesson here, that in JSF, it is impossible to directly access values of instance variables defined on the JSF page?
Instance variables of what?. You listed the property named "mymap", but you didn't say which bean it was contained in.
JSF isn't intended to be composed of JSPs with scriptlets in them. That's a violation of the MVC architectural standard, putting a Model object directly inside the View.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Mar 09, 2008
I think it is possible to directly access values of instance variables in a JSF/JSP page, but for that use the scriptlet <%= expression %>. This code will be inserted directly in the service()-method of your servlet and so is able to access the instance variable. I don't say that this look pretty...
With an faces-tag like <h: outputText> I don't see a possbility to access the instance variable, because the "page-scope" misses. I think in Faces 2.0 exists a page scope, and so perhaps it is then also possible with tags like <h: outputText>.