jstl 1 « JSTL « JSP-Servlet Q&A





1. What are the alternatives to JSTL?    stackoverflow.com

Are there any alternatives to JSTL? One company I worked for 3 years ago used JSTL and custom tag libraries to separate presentation from logic. Front-end developers used EL to do ...

2. JSTL and authenticated web services    stackoverflow.com

Can I access an authenticated web service using JSTL? (Form-based authentication) If I can't do it using JSTL, is there any other way I do it from a JSP?


Maybe I need ...

3. how to get the path of server's folder inside Java program (J2EE + JSTL)    stackoverflow.com

I wanted to read contents excel files in my web-based project(J2EE-JSP+Servlets) which are located inside the web server's folder.. So, I have made a java file, which i will call through ...

4. Why does JSP/JSTL division by 1000 sometimes give remainder?    stackoverflow.com

When dividing by 1000 I sometime run across a bug that doesn't do the division "correctly". For example, when dividing 90.55 by 1000 instead of getting .09055 I get .090549999999.

<c:out ...

5. Escape apostrophe as \' with c:out JSP    stackoverflow.com

I have an object field with person's last name. If I use ${person.lastName}, I get O'Brian If I use

 <c:out value="${person.lastName}"/>
I get O'Brian Both outputs breaks the next jsp code in IE
 <a ...

6. Multiple JSTL Versions in Weblogic J2EE App    stackoverflow.com

Thanks in advance for taking a look :) I'm hard at work on a J2EE web app (in JDeveloper) and recently added some functionality that required JSTL, and I've hit a little ...

7. difference between eq and == in JSP    stackoverflow.com

What is the difference, if any, between the keyword 'eq' and the operator '==' in JSP Expression Language? In code, what is the difference between:

<c:if test="${var1 eq var2}">some code</c:if>
and
<c:if test="${var1 == var2}">some ...

8. JSTL: I need to access hashtable using a key    stackoverflow.com

I know this works: <c:out value="${model.testhash['A']}"/> but I need something like: <c:out value="${model.testhash[${model.testkey}]}"/> Is this possible?

9. how to configure and use jstl in websphere    stackoverflow.com

Does anybody know how to configure jstl in websphere. i know that we have use taglib directive in web.xml . where do i find web.xml in websphere 5.1.2 and how to ...





10. Does IBM Websphere 5.1.2 support jstl    stackoverflow.com

Guys i have included jstl and standard.jar in lib directory under classpath. It says absolute uri http://java.sun.com/jstl is not found either in web.xml or in application. please let me ...

11. Problem with JSTL and weblogic    stackoverflow.com

I get the following error when I run my java ee app on weblogic,

javax.servlet.jsp.el.ELException: Cannot find PropertyDescriptor for 'name' for bean 'class java.lang.String'
I want to print a list ...

12. Java: how to debug an invalid JSTL declaration?    stackoverflow.com

I've seen this kind of issue on SO (and on the Net overall) quite a few times. For example here: http://stackoverflow.com/questions/1884529 Earlier today I was trying on a JSP (regular .jsp, ...

13. How to prevent auto correction / suggestion of text in textarea?    stackoverflow.com

We provide a page where a student can provide his answer to a certain question. This information is obtained via an input text area box and we would prefer that the ...

14. JSTL Tei Not Working    stackoverflow.com

All the jstl tags which do not involve passing back a value(using tei) are working, but whenever I use a tag like <c:forEach var="abc">...<%=abc%></c:forEach> i am getting an error abc cannot ...

15. issue with JSTL Hashset    stackoverflow.com

The below code is not working

<c:forEach var="row" varStatus="rowCount" begin="1" end="10">

 <c:set var="entry" scope="request" value="${session.entry.mileStones[rowCount.count]}"/>
 or

<c:set var="entry" scope="request" value="${entry.mileStones[rowCount.count]}"/>

</c:forEach>
where , Entry.getMileStones ====> HashSet is properly set in action class in session ...

16. What is JSTL and the different between the JSP?    stackoverflow.com

I want to ask a question about the web programming. I learn the servlet and the JSP before, but I don't know what is the JSTL and the different between the ...





17. JSTL: Check if Submit was clicked    stackoverflow.com

How can I check if the Submit button was clicked in JSTL?

18. JSTL and hashmap not working    stackoverflow.com

In a servlet I have:

HashMap eventsByDayNo = new HashMap();
eventsByDayNo.put (new Integer(12), "day 12 info");
eventsByDayNo.put (new Integer(11), "day 11 info");
eventsByDayNo.put (new Integer(15), "day 15 info");
eventsByDayNo.put (new Integer(16), "day 16 info");

request.setAttribute("eventsByDayNo", eventsByDayNo);
request.setAttribute("daysInMonth", new ...

19. java inheritance and JSTL    stackoverflow.com

I want to acces to an attribute inherited by one of my java classes, in a jsp using jstl 1.2 : Java :

public class LigneDeclarationBean  {

    private ELigneDeclaration ...

20. How to use if-else option in JSTL    stackoverflow.com

Is there an if-else tag available in JSTL?

21. implementing JSTL in Apache http server + JServ environment    stackoverflow.com

I am working in Apache http Server which using JServ Servlet engine. Earlier the code is written in JSP itself. Now I have to do refactoring and want to use JSTL. Can anybody please ...

22. Increment counter with jsp    stackoverflow.com

This question is related to my previous question : Jsp iterate trough object list I want to insert counter that starts from 0 in my for loop, I've tried several combinations so ...

23. access hashmap in jsp    stackoverflow.com

         <c:forEach var = "cart" items= "${cartx.items}"> 
            <tr bgcolor="${(i%2) ? "#EFF3FB" ...

24. Forloop problem in JSTL    stackoverflow.com

I'm using JSTL to loop over a list of shop objects. It looks like the following:

    <c:forEach items="${shops}" var="shop"> 
       <div ...

25. Status of JSTL in Java EE 6    stackoverflow.com

It seems JSTL is no longer even mentioned in the Java EE 6 Tutorial, Oracle instead favouring the JSF libraries heavily over the older jstl core libraries. Does this ...

26. JSTL not being read properly in JSP    stackoverflow.com

Good day! I tried using JSTL in java but there's an error:

exception
javax.servlet.ServletException: java.lang.InstantiationException: class session.Item : java.lang.InstantiationException: session.Item

root cause
java.lang.InstantiationException: class session.Item : java.lang.InstantiationException: session.Item
My code is as follows:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC ...

27. fn JSTL not supported    stackoverflow.com

when am using ${fn:contains()}" it causes the following exception:

org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported
How can i solve this exception? and if I need to download a newer version of jstl.jar ...

28. How to invoke non-static method from Java class using JSTL?    stackoverflow.com

I think this isn't new issue but I haven't found solution yet so i hope the answers to this post may clarify my problem. Suppose that i have a class which contains ...

29. I need to access vectors in JSTL    stackoverflow.com

THis is my JSTL code.can u help me to correct this code.

<c:set var="answer" value="${N}"/> 
<c:set var="level" value="${Firm Level}"/> 
    <c:if test="${not empty objBrokerVO}"> 
     ...

30. How to capitalize first letter with JSTL/CSS?    stackoverflow.com

I am coding a JSP/JSTL application. I would like to style a link with the first letter uppercase and the rest lowercase. For example "my LINK" would become "My Link". I saw ...

31. Creating a menu with navigation links with JSTL    stackoverflow.com

Is there a library or best-practice way of creating a menu with navigation links using JSTL? I have 5 links that go on every page. I want the link that points to ...

32. Verifying Cookies in JSP using JSTL    stackoverflow.com

I'm trying to figure out how cookies can be used to prevent a hacker from typing in a URL to an internal part of a java web application that shouldn't be ...

33. If....else in JSTL    stackoverflow.com

A quick JSTL question. I usually use scriptlets in my jsp pages, but have a conflict due to some other things in my page. I understand you can do ...

34. Building a simple shopping cart with basic jstl    stackoverflow.com

i was wondering if there was anybody able to help me with my question. How can i build a shopping cart-type JSTL program that allows the user to click on the ...

35. Unable to create a cookie from JSTL    stackoverflow.com

I'm new to JSTL. I'm trying to set a cookie with JSTL and cant find any useful solution. Help!!

36. JSTL padding int with leading zeros    stackoverflow.com

I'm trying to use JSTL to build a form. I have a select input for the months but I need the months to always be two digits i.e. padded left ...

37. JSTL body content exact specification    stackoverflow.com

can someone suggest how possible to interpret <c:set> body?

  • <c:set var="movieList">One,Two,Three</c:set>
  • <c:set var="movieList">"One","Two","Three"</c:set>
in the first case movieList is a string and in the second it is an array {"One", "Two", "Three"} what is movieList ...

38. insertDefinitions in JSP doesn't overwrite original tile    stackoverflow.com

Hey I pretty new to the whole tiles concept and have a problem. Will try to explain as good as I can. In my tiles .xml file I have:

<definition name="/article/startDateAndPrioTeaserList.do" template="/article/startDateAndPrioTeaserList.do" />
Now ...

39. How can I get input side by side in JSP    stackoverflow.com

<table>
<c:forEach items="${requestScope['rfpq.mailRecievers']}" var="row">
<tr>
                             ...

40. how to call parameterized method from JSP using JSTL    stackoverflow.com

How to call a java method with parameters which is defined in Java class,from JSP using JSTL. The method is resturning arrays.

41. jsp:element creates element    stackoverflow.com

In trying to clean up some pretty crufty code I rewrote something this way:

<jsp:element name="img">
    <jsp:attribute name="src">
        <c:url value="${akamai}/images/prdLargerImage.gif"/>
   ...

42. multiple inside     stackoverflow.com

I am just wondering whether the below code is valid? I am just wondering whether the below code is valid?

<c:choose>
    <c:when test="${empty example1}">
    </c:when>
   ...

43. Why jstl is not working?    stackoverflow.com

Like in the article , I have placed the following files in WEB-INF/lib folder of my applicaion

  • Standard.jar (1.1.2)
  • jstl.jar (1.1.2)
in taglib it states that it would resolve uri tag in the TLD ...

44. What is best way of JSTL or jsp:useBean    stackoverflow.com

I have currently use jstl to my jsp pages. I displayed some data in <td> tag. In that data length exceed the 15 characters i need to only display the first 15 ...

45. HREF inside TEXTAREA?    stackoverflow.com

im trying to make a hyperklink in a textarea box...is that possible? This is what i got, just shows up as text:

   <c:if test="${action == 'update'}">
<%-- Preserve the indentation for ...

46. Output line number to generated document in JSP    stackoverflow.com

Is there any tag that allows to output the line number of the file. I mean if if have file jsp

<html>
<something>
</html>
will output
<html>
2
</html>
Does this <something> exist? :) A more precise use case is ...

47. JSTL and SEAM 2.0.1    seamframework.org

48. JSR 168 and JSTL    coderanch.com

49. Can JSP with JSTL be configured as a web service using Axis?    coderanch.com

Hi, I have designed an web application "Hotel Reservation System" using JSTL sql tags and tomcat. I am accessing my SQL Server database through the JSTL sql tags. I am not using a single java class/bean in my application. Now, I want to convert my work into a web service using axis and tomcat. My concern is will it be possible ...

50. JSTL info    coderanch.com

Originally posted by Ricardo Cortes: Here's a link to the Java Community Process page that controls the publishing of the JSTL specification. They are going to vote on the final draft May 17: http://jcp.org/jsr/detail/52.jsp Also, "More Servlets and JSPs" by Marty Hall has a chapter devoted to the topic. Hi there. I'm the reference-implementation lead for JSTL. The Proposed Final Draft ...

51. Is JSTL useful?    coderanch.com

Originally posted by Sean Lee: I've read the sun's tutorial of JSTL, I don't think that will be convenient but bothersome. Maybe i just cannot go through into it. Is there any experts here can tell me the really usage of that technique? thanks! Well, I'm the reference-implementation lead for JSTL, so I'm hardly unbiased, but I think JSTL offers a ...

52. How to use JSTL?    coderanch.com

Hi, Friends,I am new tag libs.I am trying to use the core tags like (forEach).I have downloaded the jstl.jar and standard.jar and put in WEB-INF/lib of JRun3.1.My .tld file contains /jstl-c /WEB_INF/c.tld And I am referring as <%@ taglib uri="/jstl-c" prefic="c" %> My page has this only one line. Helpful if some one helps at the earliest. A.Umar

53. JSTL problem    coderanch.com

I've set up the jstl lib and tld directories under my Web-inf and have included <%@ taglib uri="/Web-inf/tld/c.tld" prefix="c" %> in the jsp file, which is fine. However, when I try to use anything from the prefix, i get the following error:Unable to load class org.apache.taglibs.standard.tag.el.core.OutTag which is in the c.tld file. Any suggestions? Please help i am using ...

54. JSTL iteration over 2 or more items    coderanch.com

55. JSTL when test problem    coderanch.com

Below is a code snippet from a JSP I have. I want the background colors of the rows in a table to alternate. I can make this work in scriptlet code fine but the when test below is returning false every time so that instead of alternating colors a single background color (specified by the otherwise tag) is displayed. <%! String ...

56. JSTL    coderanch.com

57. JSTL pageScope    coderanch.com

58. JSTL and Java Server Faces    coderanch.com

59. JSTL Learing curve    coderanch.com

Originally posted by Pradeep Bhat: Thanks Shawn for ur reply. I have downloaded the .zip. I will start working very soon. Some of my friends feel that there are some shortcomings in JSTL. Do u agree ? Well, I'm biased -- since I had the opportunity, being on the JSR-052 expert group, to redress any shortcomings I noticed. Seriously, I think ...

60. JSTL Requirements    coderanch.com

61. newbie at JSTL    coderanch.com

What do I have to modify in tomcat 4.0.4 's confiruation file in order to use jstl tags? I tried to run the example from Shawn Bayern's book scroll.jsp from chapter 5(listing 5.1, I get a blank screen. When trying to compile the file from Forte for Java 4, community edition, I get the following error: "This absolute uri (http;//java.sun.com/jstl/core) cannot ...

62. Business Relevance of JSTL    coderanch.com

Suppose I am a business owner running a shop building Web Applications using JSP/Java. Someone comes to me and says: "I know JSTL through and through. Hire me." How would my business gain from hiring this person and getting the JSTL expertise? Would I increase my productivity -- pushing more Web Applications of the same or higher quality out the door ...

63. JSTL: Maps and static properties    coderanch.com

64. (OC4J) version 1.0.2.2.1 and JSTL    coderanch.com

65. JSTL and JSP 1.1 container    coderanch.com

66. JSTL doubts (c:if)    coderanch.com

Hello: I have a JSP Page with following code: <% String stringSearch = request.getParameter("aParameter"); if (stringSearch = null &&! stringSearch.equals("")) { %> <%-- My code here. --%> <% } %> To not mix Java code with HTML, I am beginning to use the JSLT from the Jakarta Project. My page was thus: <% stringSearch = request.getParameter("aParameter"); %> ...

67. JSTL and Resource Bundles    coderanch.com

68. JSTL Basics    coderanch.com

69. JSTL Bug ????    coderanch.com

Hello There, I am using JSTL and I have found an interesting behavior. I have a bean with the following field and get/set methods: public class PlcWebApp implements Serializable { ... private Hashtable tagLibs; //L is UPPER CASE ... } When using the following, the prop is NOT FOUND (prop case is the same but something wrong happens...) ...

70. JSTL Performance    coderanch.com

71. installing JSTL behind firewall    coderanch.com

I'm trying to install the Java Standard Tag Libraries on my WSAD local environment, but as soon as I call the taglib, I get this error: JSPG0111E: Unable to open the tag library descriptor: Operation timed out: no further information I was trying to figure out what could be timing out and my guess is that it is because the taglib ...

72. JSTL: MultiPage (pager)    coderanch.com

73. Does the book cover some common JSTL?    coderanch.com

74. how to use jstl in jsp2.0    coderanch.com

Hello, As I execute the following codes in jsp 2.0, I get the following error messages org.apache.jasper.JasperException: /SimpleBean.jsp(15,0) According to TLD or attribute directive in tag file, attribute value does not accept any expressions Here's the code: <%@ page language = "java" contentType = "text/html;charset=Big5" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>Hi

75. setting properties with jstl possible    coderanch.com

76. break, continue in JSTL    coderanch.com

77. JSTL and resource bundles    coderanch.com

I am trying to determine the amount of time it takes for an update to a resource bundle to be recognized by an application, if it even does. In other words do I have to redeploy the application or will the file changes be reloaded at a specific interval? This is specifically for the use with the 'i18n ' features of ...

78. JSTL x:out problem    coderanch.com

79. passing from jstl TO jsp    coderanch.com

81. Ratings on the Sue Spielman's JSTL book    coderanch.com

82. JSTL requirements    coderanch.com

Hi Vasu. JSTL is the JSP Standard Tag Library. It's a collection of frequently used actions that make creating JSPs much easier, more readable, and more maintainable. The Expression Language (EL) was first introduced with the JSTL, but the support of it has now been moved to JSP 2.0. It allows for easy access to objects, and a much cleaner way ...

83. Advantages and Disadvantages of JSTL    coderanch.com

It's important to keep a perspective here. So I'll give you mine on the points of that article concerning the disadvatages. Disadvantage: Overhead I highly disagree here. There are ways (like precompiling JSPs) to mitigate this. As other implementations of the JSTL make their way into app servers they will be highly optimized, so I think this point is not really ...

84. JSTL & Java Server faces...    coderanch.com

85. JSTL and c:set    coderanch.com

87. Jstl    coderanch.com

88. jstl performance issue    coderanch.com

89. Problem sending mail using JSTL    coderanch.com

I am trying to send e-mail using JSTL. I have "taglibs-mailer.jar" (Version 1.1) in webapps/myApp/WEB-INF/lib. I also have "activation.jar" and "mail.jar" in C:\j2sdk1.4.2_03\lib and they are in classpath. In my JSP I have following lines of code: taglib uri="http://jakarta.apache.org/taglibs/mailer-1.1" prefix="mt" c:if test="${pageContext.request.method=='POST'}" c:set var= "email" value= " '${param.e_mail}' " mt:mail server="myServer" to="${email}" from="eMailAddress" subject="Test mail" mt:message>This is a test

90. Trying to use jstl    coderanch.com

I added standard.jar and jstl.jar to my WEB_INF/lib folder of my webapp. I created a simple jsp page that has the following: <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> Test JSTL This is testing JSTL The error I get is: ( I can see the tag out when I look inside the standard.jar file.) org.apache.jasper.JasperException: /new.jsp(6,0) No ...

91. books about JSTL    coderanch.com

93. JSTL and c:if problem    coderanch.com

I think I might already know what the problem is, but I wanted to share and see if anyone believes the same... Here is a snippet of code in my results jsp page...

94. Converting my scriplets to jstl    coderanch.com

95. simple JSTL problem    coderanch.com

96. new to JSTL    coderanch.com

97. JSTL problem with order of gets/sets in class    coderanch.com

I'm seeing some strange behavior using the Apache JSTL. When using the "value" attribute in the "formatDate" tag to get a value from an object, I get a JspException: An error occurred while evaluating custom action attribute "value" with value "${member.birthDate}": Unable to find a value for "birthDate" in object of class "com.somepackage.membership.MemberImpl" using operator "." even though there is a ...

98. working with JSTL Problem....    coderanch.com

Hello, Im using Apache Tomcat 5.0.25 Server Ive dwld JSTL from jakarta site. Ive placed jstl and standard jar files in the WEB-INF/lib of my webapp from jakarta-taglibs-standard-current. My codings :This is only a test since Im trying to use this for the first time. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> THIS IS A TEST JIL 2+2 is ${2+2} and ...

99. JSTL 1.0 Weblogic help    coderanch.com

100. JSTL: equality test against a static member    coderanch.com

Well, as you know, the EL is not meant to be a Java replacement, but is geared towards referencing bean-patterned scoped variables; of which your type-safe enumeration is clearly not. In this case what I would probably do is to (at application startup time, probably using a context listener) is to load a Map into the application context containing the enumerated ...