expression « JSP « JSF Q&A

1. Can I use a Hashtable in a unified EL expression on a c:forEach tag using JSF 1.2 with JSP 2.1?

I have a Hashtable<Integer, Sport> called sportMap and a list of sportIds (List<Integer> sportIds) from my backing bean. The Sport object has a List<String> equipmentList. Can I do the ...

2. How do you get the length of a list in the JSF expression language?

How would I get the length of an ArrayList using a JSF EL expression? "#{MyBean.somelist.length}" does not work.

3. Unable to locate the EL RI expression factory

I am getting the following exception in my application.

com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is older than 2.1 and unable to locate the ...

4. jsf 2.0 Expression language brackets not working

I have this attribute in my h:commandButton

disabled="#{ not ( ( nodeChild.children == null or empty nodeChild.children ) and ( not setupManager.currentTerminals ) ) }"
If it renders disabled="false" everything works but the ...

5. EL expressions are not evaluated

I have developed a java server page which has java server faces tags. It is fetching a bean data like this:

<h:inputText value="#{UserBean.userName}" />
But when I run it, it is showing the ...

6. Is there a way to escape apostrophes in JSP Expression Language?

The above line is part of a google analytics tagging that we use. But webName is failing when an apostrophe is in there. I just want to strip it using EL, is ...

7. Evaluating 2 expressions in JSF using JSTL if tag

Hi, I have an application using JSF with JSTL. My requirement is as follows: In my page, I have a user id by which the user has logged in and a list of users who are available. Now, when I log in, I need to display all users information. However, the logged in user information needs to be shown as a ...

8. JSP 2.1 and deferred expression

9. JSP expression inside JSF tag?

I have a set of categories and I want to display that as hyperlinks in my JSF page. If the user clicks in one of them, the category ID is submitted and the action BookController.filterByCategory is called. This is my code:


    <% ArrayList categories = Category.selectAll(); for (int i = 0; i < categories.size(); i++) { %>
  • ...