Skip to main content

Questions tagged [jstl]

JSTL (Jakarta Standard Tag Library) is a XML based standard tag library which offers tags to control the flow in a Facelets or JSP page, date/number formatting and internationalization facilities and several utility EL functions.

1,417 questions with no upvoted or accepted answers
8 votes
1 answer
1k views

JSP tag attribute inherits variable from parent scope when null is passed in?

I encountered an issue recently where passing null into a custom JSP tag resulted in the tag going up the scope and resolving the variable to a variable of the same name in the parent JSP. Is this ...
MrColes's user avatar
  • 2,483
6 votes
1 answer
732 views

Attributes naming convention resulting in long EL expressions in JSP Page

I'm writing lot of JSP pages for different views. Those JSP retrieve request scope attributes which have very long names to prevent overlapping. An example is: request.getAttribute("domain1....
J.M. Kenny's user avatar
6 votes
1 answer
1k views

Can I create a JSP from dynamically generated XML?

I want to generate a JSP using XSLT and <x:transform> tag. But I don't have an XML-file on my file system, and I can't import it like: <c:import url="./xml/MyXml.xml" var="xmldoc"/>. It is ...
user2140493's user avatar
5 votes
1 answer
7k views

Break out of a forEach loop in JSP/JSTL

I have a collection of objects which have some properties. A property can only be of two types either Type1 and Type2. All I want to do is to check if an object has a property of Type1. I'm using ...
Darshan's user avatar
  • 181
5 votes
3 answers
1k views

Jstl negative zero

If you try the following bit you'll get -0 <c:set var="demo" value="-0.04" /> <fmt:formatNumber maxFractionDigits="1" value="${demo}" var="demo" /> but if you test if less than 0 it says ...
Hartimer's user avatar
  • 545
4 votes
0 answers
305 views

JSTL taglib absolute url not resolved

JSTL taglib <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> works only in my child pages but not ...
Clinton Prakash's user avatar
4 votes
1 answer
658 views

Checking/unchecking checkboxes based on returned database values

I am trying to get a checkbox to be checked based on values returned from a database. So far I'm getting the correct "Y" or "N" values up to my controller layer, but the checkbox is not being checked/...
Amber M's user avatar
  • 177
4 votes
0 answers
2k views

c:forEach items not updated from backing bean

I cannot update the list in a <c:forEach> by a backing bean. I am working with PrimeFaces 5.0 and JSF 2.0. This is my simplified JSF code: <c:forEach var="i" items="#{dataset....
Ago's user avatar
  • 41
4 votes
0 answers
2k views

Templating in JSP. Adding the <script> and <link> tags from different template clients to the <head> tag of the template

I am going with templating in JSP as shown below. The tag files given below are stored under /WEB-INF/tags. genericTag.tag (it is a basic template) : <%@tag description="put the tag description ...
Tiny's user avatar
  • 27.8k
4 votes
1 answer
84 views

Read property of annotation

If I had defined this class: @MainForm(grupo = 3, icone = "user") public class Usuario { ... } and pass to the view this List (which include the class above): public List<Class<?>> ...
Kleber Mota's user avatar
  • 8,805
4 votes
0 answers
426 views

Can't load JSTL in multi module maven project with embedded jetty

I have created a test framework for testing .jsp files and .tag files using embedded jetty. I'm starting Jetty server programmatically using Java API, adding servlet holder and wrapper test JSP and ...
susmit shukla's user avatar
4 votes
1 answer
551 views

Dynamic form:select and form:option in Spring form tags

Consider the Following scenario: I am using Spring form tags to help process a form. I am using the a accompanied by the tags. The values are injected into the select using an ENUM. However now ...
Khush's user avatar
  • 853
4 votes
1 answer
2k views

JSTL - parse not working for elements with namespace

I am trying to parse the following XML using JSTL. I can easily retrieve all the elements in the XML apart from the tags with the "t" prefix, how do I do this? XML looks like (feed.xml) <rss ...
A Edwards's user avatar
4 votes
1 answer
3k views

JSP request parameter is returning null on a jsp include with Weblogic

I am having trouble with the jsp:include tag. I have code like the following: <jsp:include page="./Address.jsp"> <jsp:param value="30" name="tabIndex"/> <jsp:param value="true" ...
doug's user avatar
  • 51
4 votes
3 answers
4k views

Cannot get Tomcat 8.0 with Servlet 3.1 working with JSTL 1.2

I have read through nearly every answer to this question on SO and have tried over a dozen different "solutions" but I cannot get JSTL to work in a Spring boot web app using servlet 3.1 within Tomcat ...
Matt Crysler's user avatar

15 30 50 per page
1
2 3 4 5
95