jstl « JSP « JSF Q&A

1. JSF JSTL problem with nested forEach    stackoverflow.com

Inside a nested foreach, accessing the same variable is returning different values. This happens when the page is reloaded, not on first load.



2. JSF with different object type    stackoverflow.com

I'm trying to compare two different object in JSF. A String and an Integer, of cours it don't work... //myVar ==> Integer object
//myVar2 ==> String

<c:if test="${myVar == myVar2}">
I try with myVar.toString ...

3. JSF tag not found    stackoverflow.com

I use JSF-facelets.jar 1.1.14 (I downloaded it here) and tomcat 6.0

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)
Implementation-Version: 1.1.14
If I understand well, JSF-facelets.jar = JSF + JSTL + ...

4. problem with iterate over java.util.Map using "JSF" OR JSTL TAGS    stackoverflow.com

I'm using Richfaces JSF and I want to iterate over an Map<Object,Object>. I see many examples on Sun forums and other sites but in my case it doesn't work. Here is ...

5. JSF 'total' variable something like c:set in JSTL    stackoverflow.com

I don't like JSF but I need to solve this problem with it, I am working in "pure" JSF. So this is what I baisicly need but I don't know how to ...

6. h:inputText return a empty string instead of NULL    stackoverflow.com

i make a JSF 2.0 Application and i use many h:inputText fields to input data in my database. Some fields are not required

<h:inputText value="#{registerBean.user.phoneNumber}" id="phoneNumber" >

7. Comparing strings with JSTL    stackoverflow.com

I have two strings that i need to compare, but even if they have the same values or different , it always enters the statement...

<c:when test="#{bean.name1 != ...

8. where can i find schema definitions for jsf?    stackoverflow.com

where can i find schema definitions for


9. How do you use JSTL?    stackoverflow.com

Trying to use JSTL but have the following problem: Index.xhtml page:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"

10. How to overcome caching problem of jsf?    stackoverflow.com

I have 7 drop down in my jsp(Using JSF tag-Select One Menu), 2 drop downs are dependent on other 2 drop downs. The scope of my Managed Bean is session.I have ...

11. c:when and c:if don't work    stackoverflow.com

I can access my variable stored in a backing bean from my JSF2 page, so things like

<h:outputText value="#{myBean.myValue}"/>
work, and the value (which is an int btw.) prints okay. However, when trying to ...

12. What tag to use to hide content in JSF    stackoverflow.com

When I want to hide some content in JSF, what tag is made for this purpose? There are several tags that can do the job:

<f:subview rendered="#{...condition...}" />
<c:when test="#{...conditon...}" />
Which is the ...

13. XSLT, JSTL e JSF    stackoverflow.com

I have a xml file which I want to transform in a jsf code page. To do that I've created a xsl file. xml:

<?xml version='1.0' encoding='ISO-8859-1'?>
<questionario xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'

14. Problems with JSTL forEach in JSF 2    stackoverflow.com

Hi I got the following code:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0    
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"

 <c:forEach ...

15. Mixing JSF tags with JSTL tags gives strange results    stackoverflow.com

I have this piece of code:

 <c:if test="#{utils.getCounterOfCharOccurence(hideTypes, ';') != 0}">
   <ui:repeat value="#{document.instanceList}" var="instance">
    <c:set var="columnRendered" value="true"></c:set>
    <c:forEach items="${hideTypes.split(';')}"

16. When works for X but works for Y    stackoverflow.com

I use <c:foreach> in my jsf app to iterate over a list of people. I don't use <ui:repeat> because every person has its own tab (primefaces). JSF hero 'BalusC' already helped ...

17. Is possible : javascript extract value from c:forEach tag?    stackoverflow.com

i have populate some values using c:forEach tag. I want to get those values in my javascript.
If I click GetCtag value button, then i want ...

18. h:graphicimage not working in c:foreach    stackoverflow.com

I have used c:forEach loop for display the list of images using h:graphicImage. But I can't display the images. I have the h:commandLink also in my page. The image have to ...

19. What's the difference between the various JSTL libraries out there and which to use?    stackoverflow.com

I'm puzzled because of build and run errors that mislead me. From them, I can't quite figure out what the distinction is between the various JavaServer Page Standard Tag Libraries. For ...

20. How to compare 2 strings with ?    stackoverflow.com

I am trying to display a <h:outputText> or <h:commandLink> accordingly to a String property returned by a backing bean. I am having problems when comparing the strings.. Here is the illustration:

<c:if test='#{column.header ne ...

21. JSF - How to add h:graphicImage after f:selectItem element?    stackoverflow.com

I am trying to add a h:graphicImage after the f:selecItem element, using this declaration:

<h:selectManyCheckbox layout="pageDirection">

    <f:selectItem itemValue="some Value" itemLabel="some Label" itemDisabled="true">

22. ui:repeat using the same client id. c:foreach works fine    stackoverflow.com

I know this may have something to do with the phase each one comes in at. If I do this.

 <ui:repeat id="repeatChart" varStatus="loop" value="#{viewLines.jflotChartList}" var="jflotChart">

23. Using JSTL with JSF 1.1    stackoverflow.com

I'm trying to use JSTL with JSF 1.1. The following code is causing me a problem:

<c:forEach var="key" items="${names}">
        <f:facet name="header">

24. problem with c:when tag    stackoverflow.com


<h:dataTable value="#{item1.zapas}" var="item2" >
        <h:outputText value="#{item2.hrac == null}"/>

25. JSF core tag value overflow while iterate    stackoverflow.com

I have problem with core tag in JSF. Im using this tag for pagination button rendering. There is one big problem - when there is more then 127pages. Iteration value ...

26. how to get the value in jstl    stackoverflow.com

I have written a piece of code in jstl . I am getting the following error while executing the html. Can I call a method in value attribute for c:set.If not please ...

27. java code in inputText    stackoverflow.com

i am trying to include a java code into the value of the inputText in my jsf page but an error occur

according to tld or attribute directive in tag ...

28. JSTL c:choose c:when not working in a JSF page    stackoverflow.com

Consider the following jstl choose:

    <c:when test="#{AuthMsgBean.rw['2'] ne null}">
        Display Text


29. Keeping view-local variable in JSF 2.0    stackoverflow.com

I faced this situation quite a few times, and I found my solution but not sure if it's a good one. I need to call some service which interacts with ...

30. JSTL version to be used with JSF 2.1    stackoverflow.com

i want to know what version of JSTL to be used with JSF 2.1 on tomcat 7 please advise, thanks.

31. JSF method of f:event preRenderView called after c:forEach    stackoverflow.com

I'm doing a page with jsf 2.0 and i wanna do something like this:

    <f:viewParam name="id" value="${id}" />
    <f:event type="preRenderView" listener="#{controller.initPage(id)}"/>
....(Some code)....
<c:forEach items="#{bean.listLoadedByInitPage}" var="var">

32. List contains method not working in JSF page    stackoverflow.com

I have two list that consist out of the same object. I want to check if the first list containts an object of the second list

<ui:repeat var="item" value="#{userTypeController.permissionItems}">
    <c:if ...

33. (JSTL) iterate - foreach eqivilant    coderanch.com

34. JSTL and facesmessages    coderanch.com

35. JSTL fmt:formatDate and fmt:formatNumber in JSF pages    coderanch.com

I've read various messages and articles that discourage the use of JSTL in JSF pages, and I think I understand the reasoning behind that. However, I'm hoping that there is a better way to format dates and numbers for display than just returning the formatted String value from the managed bean. If I have a person bean, with properties hireDate and ...

36. jstl value into jsf tags    coderanch.com

hi, i read that link and i think it was hard to understand for me. but what i understood was i have to change some tag lib and that they have written that it only works in Glassfish. is that Glassfish server? pl let me know am i correct? i m using Tomcat server. any other link or any other solution ...

37. JSF + JSTL    coderanch.com

Hi, Can I use JSTL tags with JSF? I am trying to use it, but JSTL tags are not working, probably the bean in request is not visible to jstl tags. I am using this to have the bean available in request scope <%-- jsf:pagecode language="java" location="/JavaSource/com/dest/web/pagecode/LogView.java" --%><%-- /jsf:pagecode --%> When I use the jstl tags works fine, but I ...

38. Where to find jstl examples ?    coderanch.com

Hello all i started to use jsf , and i downloaded the jakarta.apache jstl 1.2 tag lib now im trying to find somekind of reference to the html tag lib for example the core i found in sun site . can someone please point me to the reference api ? or examples? thanks

39. Regarding JSTL    coderanch.com

40. Where I can find jstl tags reference    coderanch.com

41. JSF / JSTL tutorial?    coderanch.com

42. Some doubts regarding JSF & JSTL on the same page    coderanch.com

Hi guys, Could you please answer some if my doubts below regarding JSF & JSTL on the same page ? Doubt #1 : Is there some way to dynamically construct a page where the columns are variable by using a dataTable tag ? What I need is basically show some items on columns instead of rows as the dataTable tag actually ...

44. JSF Vs JSP Vs JSTL    coderanch.com

46. JSTL c:if tag is not working in JSF page    coderanch.com

<%@ page language="java" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> Test Page

47. Error while working with JSF SelectOneMenu and JSTL forEach Tag    coderanch.com

Thank you for your reply. Unfortunately, In JSF 1.2 RI, the UI does not have the attribute "var", so, the below code does not work. I think, this can't be done JSF1.2 UI. As you suggested, I might need to add Tomahawk into my application. Please let me know if there are any other solutions. I am using richfaces with ...

48. JSTL + JSF - why wont this work?    coderanch.com

49. Mixing JSF and jstl    coderanch.com

51. JSF vs JSTL?    coderanch.com

52. jsf 1.2 and jstl    coderanch.com

53. JSTL forEach tag    coderanch.com

54. jsf and jstl    coderanch.com

I have a simple seam project created in Eclipse.All my web pages have extension xhtml and I access each of them by typing page_name.seam.I would like to restrict access to every other page other than login page if the user is not logged in.I tried to use tag but it didn't work.Other c: tags won't work either.Can anyone tell me ...

55. jsf-html with jstl-core    coderanch.com

56. JSTL/JSF/Velocity    coderanch.com

Thanks bear! I really appreciate that. To be very honest, I am planning to make my own website(web application). So, I am looking for some book which could give me practical examples that I could refer to while creating my web pages. (I am going to be using Struts). Could you kindly suggest a good book on JSP/JSTL.

57. Passing JSF variable to JSTL c:out doesn't work    coderanch.com

Tim Holloway wrote: What you are doing wrong is mixing JSTL with JSF. I won't say you should never do that, but I haven't found a good reason to use JSTL on a JSF page ever and I've been working with JSF since about 1985. I thought that this was the best way to do the condition, since I'm working with ...

58. what is difference in access jstl and jsf tags!    coderanch.com

Acutally, what they did was get rid of the idosyncratic per-framework expression languages and merge them all into a Unified Expression Language (UEL). Makes the rules more consistent and voids the need for separate parsing, interpreting and support facilities. The primary difference between the "$" and "#" indicators is that "#" indicates a reference and "$" indicates a value. Specifically, since ...

59. jstl c:if problem - surely this is impossible?    coderanch.com

After a year working with JSF I did not expect to be encountering problems like this - but then I don't use jstl much so perhaps I'm just missing the blindingly obvious! I can run this code with the backing bean property teamCreateView.countryIsSet set to true and get the output: true Output 2 Output 4 true When I run is with ...

61. Check NULL in JSTL    coderanch.com

62. What is the most advanced JSF or JSTL or JSP?    coderanch.com

So you have an application coded with JSP and Dojo, why you want to rewrite it (assuming it is working)? It is not logical to say which one is advanced since each one of them is different from the another. JSP is a template technology, JSTL is a supporting tag library and JSF is a component-based framework. You are the one ...

63. how to get the value in jstl    coderanch.com

64. JSTL c:if alternative?    coderanch.com

Hello! I'm trying to use the jstl tag if, but it doesn't work. I'm sure the condition is false, but it gets into the if anyway. XXXX !!! I've searched a lil bit: With Facelets, JSTL evaluations happen at compilation time, whereas other EL evaluations happen at render time. This ...

65. what is the difference between jsp and jsf?    java-forums.org

JSP stands for Java Server Page. A jsp is a file with a .jsp extension that when placed in a servlet container (Typically Tomcat) will be converted by the servlet container into a java file then compiled to run as a servlet. Typically this servlet is used to service a client http request. For instance a login screen with a username ...

66. a problem about my jsf-tomcat application    java-forums.org

67. Error JSF tomcat 5.5.30    java-forums.org

Hello, I need urgent help ... I am with the following problem. I've posted a jsp page with jsf. I use tomcat 5.5.30 and when I try to access my page gives the following error: type Status report message / admin / login.jsf description The requested resource (/ admin / login.jsf) is not available. My question is this .. I read ...

68. New to JSF, simple problem with Eclispe and Tomcat    java-forums.org

I'm having problems doing what should be very simple. Trying to extend my JAVA knowledge which is limited to pure JAVA, not J2EE. To do so, I downloaded Eclipse (latest build) and Tomcat (v5.5). Everything appears to run fine, but I'm having problems running a simple JSP page (with JAVA Server Faces). FYI, I'm on Mac, running latest Leopard build. - ...

69. JSF 1.2 + JSTL 1.2 + JSP 2.1    forums.oracle.com