el

What java view technology is this?

It seems velocity and freemarker look fairly similiar, at least for basic usage. Anyhow, what is the "built in" or standard view framework called? It looks like: <c:if test="${someobject.property != null}"> ...

Getting EL variable properties in eclipse

I'm using Eclipse/Spring source to edit JSP tags and EL. If I want to check what all the properties of a variable are is there a way to do this? Or even find out which file is generating the variable that's passed in. I'm thinking something along the lines of firebug for Javascript, where you can select an object and drill-down to get it...

Code assist in (jsp /jstl) view for Spring MVC model objects in Eclipse

In Spring MVC when placing an object in the view model like so: public String getUser( Model model ) { //...fetch user... model.addAttribute( "user", user ); return "viewName"; } and accessing it's values in the JSP / JSTL view like this: ... <p> ${user.name} </p> ... I'm wondering if it is possible to have code ass...

JSF, JSTL and EL - use c:set to set a non-string value

Whenever doing <c:set var="name" value="1" />, #{name} is always a String as evidenced by #{name.class}. Is there any way to in a JSF/Facelets context to set a scoped attribute that is an Integer or Long literal value? ...

JSF Testing for Enum equality

Is it possible to test for enum equality in JSF? i.e. <h:outputText value="text" rendered="#{myBean.enum==BeanEnum.enum1}"/> ...

Item value in JSTL foreach loop not working in Portlet

Given the following Portlet Code: ArrayList nameList = new ArrayList(); nameList.add("Willi Willisch"); nameList.add("Seppi Seppisch"); renderRequest.setAttribute("names", nameList); And the following JSP Code: <c:forEach var="aName" items="${names}"> <tr> <td>${aName} </td> </tr> </c:forEach> Prints out: ${aName}...

JSTL Session Lookup - Key Has Periods

Hello All, I am working with some legacy code, and at some point there is a key in the session that is something like session.setAttribute("com.org.something.Object",someObject); Now trying to access this in a jsp using jstl is a bit difficult becuase if I tried it like I normally would I would do: ${sessionScope.com.org.something....

Mixing jsf el and Javascript

I was wondering if anyone out there knew of a way to have EL expressions in included JavaScript files be evaluated by JSF. I was hoping that Seam might have a way around this but no luck so far. All I want is to be able to use localized messages in my Javascript functions which are shared across pages. ...

GAE/J: unable to register a custom ELResolver

I need to register a custom ELResolver for a Google App Engine project. Since it must be registered before any request is received, as specified by the Javadoc: It is illegal to register an ELResolver after the application has received any request from the client. If an attempt is made to register an ELResolver after that ti...

[Struts2+tiles] How can I make title dynamically?

I'm developing BBS in struts2 and tiles(2) framework. I want to push a value in ActionSupport class and pop the value in layout.jsp of tiles. but i just keep failing to access to the value. I will explain my works step by step. 1) Users click a link to view an article at list page. And BoardView class will be called as defined in stru...

What is the JSP EL equivalent for request.getRemoteUser()?

I'm using <%=request.getRemoteUser()%> to retrieve the logged on user's ID within Tomcat. What would be the equivalent using JSP Simple Expression Language? ...

Accessing bean object methods from xhtml in RichFaces

Hello When I use (1) in my xhtml, I get an error as in (2). How can I access the size of an array in my bean? (1) A List of objects of a custom class type, accessed through the following h:outputText in a rich:column in a rich:subTable in a rich:dataTable: <h:outputText value="Info: #{f.filemask.size()}" /> (2) Caused by: com.sun...

Set HTML dropdown selected option using JSTL

In the same context i have another query <select multiple="multiple" name="prodSKUs"> <c:forEach items="${productSubCategoryList}" var="productSubCategoryList"> <option value="${productSubCategoryList}"${productSubCategoryList == productSubCategoryName ? 'selected' : ''}>${productSubCategoryList}</option> ...

Is it possible to use objects as function paremeters in EL with JBoss EL resolver?

There is this sentence in JBoss EL resolver online documentation: It's important to fully understand how this extension to EL works. When the page is rendered, the parameter names are stored (for example, hotel.id and user.username), and evaluated (as value expressions) when the page is submitted. You can't pass objects as paramete...

JSF Custom EL function works only on the first load of the page.

I created a ( JSP-based) custom EL function to use in the rendered tag. The function will return a boolean to decide if a page component needs to be rendered on a page or not. I import it onto the jsp page using <%@ taglib uri = "/WEB-INF/mine.tld" prefix = "g" %>. Everything works perfect on the first load of the jsp page. Once a but...

Which variables can be accessed with the ${...} syntax in a Struts tag in a JSP page?

I'm getting a little bit frustrated since I can't find out which variables I can access with the ${...} syntax in a Struts tag, placed in a JSP page. As an example I've got the following code: <c:set target="${status.menueStatus}" property="activeMenuePath" value="whatever" /> Where does the object "status.menueStatus" have to be def...

JSF2 ResourceBundleLoader override?

I need to have resource messages that contain EL expressions be resolved when loaded from a ResourceBundle. Basically I have a number of properties files containing the text. Some of the text will look like the following: welcomeText=Welcome #{userbean.name} The only possible way I can see this working currently is implementing a custo...

JSP 2.0 SEO friendly links encoding

Currently I have something like this in my JSP <c:url value="/teams/${contact.id}/${contact.name}" /> The important part of my URL is the ID, I just put the name on it for SEO purposes (just like stackoverflow.com does). I was just wondering if there is a quick and clean way to encode the name (change spaces per +, latin chars remova...

Get the selected value from a Select box and check that value against an array in the same form

I'm new to JSTL/EL and JSP and can't seem to find a reference which covers the following scenario: I have an array of values in JavaScipt: var Countries = ('US', 'CA'); I then need to check to see if the currently selected value of a standard HTML select box is in that array. This is what I have so far: <select id="shippingCountry...

Evaluate empty or null JSTL c tags

How can I validate a String null or empty using the c tags of JSTL. I have a variable of name var1 and I can display it, but I want to add a comparator for validate it. <c:out value="${var1}" /> I want to validate when is different of null or empty (my values are string). ...