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...
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
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...
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...
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...
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...
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.
<% ...
2
Solved
i was wondering how to use/implement string contains method in jsf2 without using JSTL.
please advise, thanks.
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"%>
<...
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...
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) +'...
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 ...
4
Solved
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...
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...
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...
© 2022 - 2024 — McMap. All rights reserved.