el Questions

5

Solved

i'm using jre6/eclipse and importing javax.el.* the error package javax.el does not exist [javac] import javax.el.*; comes up. isn't this supposed to be part of java? can anyone tell me why this...
Bluenose asked 28/1, 2010 at 22:25

4

Solved

How do I concatenate strings in EL? I want to do something like this but it doesn't work: ${var1 == 0 ? 'hi' : 'hello ' + var2} It throws an exception trying to cast 'hello' to a Double
Kicker asked 6/7, 2010 at 19:47

3

Solved

I'm trying to show a session attribute "userSession" in a jsp page using JSP EL, but it returns null (case 1). Request attributes are shown properly in EL expressions though. Using java scriptlet ...
Fluidextract asked 19/1, 2011 at 1:9

2

Solved

EDIT Take this answer with a grain of salt. Much has changed since I asked this question years ago. I recommend now using Lombok instead of my EL solution. Leaving the original question for histor...
Coexecutor asked 30/1, 2013 at 17:52

1

Solved

The following tag of JSTL can be used to set a value to a variable in a request scope. <c:set var="value" scope="request" value="someValue"/> I want to check conditionally, if the variable...
Jo asked 23/1, 2013 at 14:48

1

Solved

I have a command button like below. <h:commandButton value="Accept orders" action="#{acceptOrdersBean.acceptOrder}" styleClass="button" rendered="#{product.orderStatus=='N' }"></h:comma...
Lyre asked 22/1, 2013 at 8:23

1

Solved

I have a project that use JSF 2.1 and PrimeFaces. I tried to use a simple <h:outputText> referencing #{myBean.matriz} and I got this error: SEVERE: javax.el.PropertyNotFoundException: ... va...
Thorn asked 18/1, 2013 at 13:43

1

Solved

I have a Map<Integer, Object> in passed to JSP from a controller. There is a null key with a default value, that means map.get(null) returns a default object. keyObject.keyProp is Integer and...
Boarish asked 17/1, 2013 at 21:7

1

Solved

Usually, to get the request URL in a JSP, I would use ${pageContext.request.requestURL} but on the project I am working with (because we use tiles I guess) if I run the above I get something lik...
Rosenthal asked 26/11, 2012 at 13:8

2

Solved

In JSF an component can be rendered or not using the EL empty operator rendered="#{not empty myBean.myList}" As I've understood the operator works both as null-check, but also check checks if t...
Chalkboard asked 6/1, 2013 at 18:0

1

Solved

In my project I've to assign a variable every time the JSP is being opened. I tried it with scriptlets <% %> in JSP and EL ${} which gives the variable back. But it seems not working. <% ...
Myocardium asked 23/12, 2012 at 0:16

2

Solved

i was wondering how to use/implement string contains method in jsf2 without using JSTL. please advise, thanks.
Radioelement asked 3/12, 2012 at 10:58

5

Solved

I've been using the jQuery tmpl library for some projects and really liking it. I'm not using it on a small project that needs to be in JSP, and things got strange. It is not working fully. <s...
Schlesien asked 17/6, 2011 at 0:14

3

Solved

i have the following JSP: <%@ page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ page isELIgnored="false"%> <...
Marine asked 20/8, 2010 at 12:54

2

Solved

How does the following Java condition translate into s:if test="..." in struts2? if(company.getAffiliateId().asInt() != com.foo.bar.Affiliates.XYZ.asInt()){ // do something } company.getAffilia...
Lycaonia asked 14/11, 2012 at 9:55

2

Solved

I'm trying to use a conditional expression in an el expression used in jsf, but it does not work. <h:outputText value="#{(sel.description !=null) && (sel.description !='') ? sel.descrip...
Arsenault asked 13/11, 2012 at 11:23

3

Solved

I need to write an EL expression for an attribute which goes something like this: #{cc.attrs.appreciatedByCurrentUser ? (cc.attrs.count +'<br/>'+ (cc.attrs.count-1)) : ((cc.attrs.count+1) +'...
Dosia asked 12/9, 2011 at 9:59

2

Solved

Lambdaj (and some other similar libraries) provides a having function which allows me to define predicates like so (example directly from the lambdaj Features page): List<Person> oldFriends ...
Ionization asked 5/11, 2012 at 18:19

4

Solved

I know that using scriptlets are considered taboo nowadays. Its okay and I will agree to the Top Star's words (as I am just a novice in Java at the moment). What I have heard so far is, its to mak...
Costive asked 18/10, 2012 at 5:23

3

Solved

How to do this simple check in JSTL (without extending any Java classes and additional JSP functions). I need it like this: <c:if test="${fn:isNumeric()}"> // do something </c:if> T...
Hartmann asked 22/10, 2012 at 9:21

2

Solved

I want to have a generic menu in my JSF (MyFaces 1.2) application. <h:form> <h:dataTable id="dt1" value="#{portal.actionList}" var="item"> <f:facet name="header"> <h:output...
Terpstra asked 8/6, 2010 at 15:24

2

Solved

My jsp lies at below location http://myApp.com/myWebApp/customer/images/customer.jsp My image(accessed thru customer.jsp) lies at http://myApp.com/myWebApp/images/customer.gif In image tag i ...
Garrote asked 3/10, 2012 at 9:6

4

Solved

To summarize the answer shown here Code assist in (jsp /jstl) view for Spring MVC model objects in Eclipse is not working for me at all, is there a setting that I need to change ? I have just down...
Crossexamine asked 2/10, 2012 at 16:28

1

Solved

I'm building a web-application using JSF/Primefaces. I need to have a "constants"-class, i.e. a class that will consist of constants. These constants are mainly navigational commands that will be u...
Quadratics asked 1/10, 2012 at 6:8

1

Solved

I'm getting an exception when displaying my jsp page that tries to invoke a function defined getCurrentlocation() in type Person. The function is invoked by ${person.currentlocation} in the jsp fil...
Therrien asked 17/9, 2012 at 17:29

© 2022 - 2024 — McMap. All rights reserved.