jstl

Which option do you like the most?

I need to show a list of movies ordered by the date they were registered in the system and the amount of comments users have made about them. E.g: Title | Register Date | # of comments Gladiator | 02-01-2010 | 30 Matrix | 01-02-2010 | 20 It is a web application that follows MVC. So, I have the object "Movie", there is a...

c:forEach.items getting repetitively called

Environment: Seam, Richfaces The following code snippet causes the method getUsers to be called multiple times, how do I avoid this in my application so that it gets called only once. <c:forEach items="#{userHome.getUsers()}" var="_user"> </c:forEach> ...

html select option tag closes itself due to a "/" character in the dynamic value (JSP, JSTL)

<select id="ordersSelect" class="drop-down" onchange="somemethod()"> <c:forEach items="${orders}" var="order" varStatus="orderStatus"> <option value="${order.id}"> ${order.publicId} </option> </c:forEach> </select> I have the above peice of code in a JSP page, that receives a list of Orders and each order has some information, the...

Access FlowScope from JSP without JSTL

I'm using Spring Web Flow (v. 1.0.5) and I have a JSP page that makes an AJAX call to a flow and needs to read in the XML results. That flow successfully sets an object into the FlowScope, then calls a JSP page to render the results. In the JSP page, I'd like to test whether the object has a property (say, .firstName) and if so, do som...

J2EE Template Engine Recommendations?

Looking to expand a current J2EE project using JSTL and Apache Torque with some sort of template engine so we can easily modify the views. Any suggestions? ...

How can I parse a URL using JSP/JSTL?

I want to capture the base path of a given url http://mydomain.com/mypath/coolpath/favoritepath/file.htm so basically i just want this: /mypath/coolpath/favoritepath/ Any ideas how to do this without using straight Java? ...

JSTL - Format date

Hi! I have a loop that goes through all the news items we have on our site. One of the fields is date ${newsitem.value['Date']}, given in millliseconds. I'd like to display this date in month/day/year format on the webpage. I thought JSTL format tag, <fmt:formatDate>, would help, but I haven't succeeded. Do you know how to do it? ...

Integrating JSTL With Facelets

Hi, I am considering using Facelets and JSTL in the same web project. Are there any issues in integrating these ? ...

Is there a good java library for localized labels with database backing?

I'm looking for a good general library to grab localized labels for displaying on a web page. I've found some useful solutions at http://stackoverflow.com/questions/19295/database-backed-i18n-for-java-web-app and I will use them but I wanted to see if there was a standard library other than the fmt jstl tags that is already database bac...

how to iterate a arraylist of object

Dear all, i m using dao design pattern in which i m returning a arraylist object ,inside object i can fetch by typecasting object into class and acees the getters like object.getName(),i want to itearate using a jstl tags.how can i do that. ...

Set HTML dropdown selected option using JSTL

In the same context i have another query <select multiple="multiple" name="prodSKUs"> <c:forEach items="${productSubCategoryList}" var="productSubCategoryList"> <option value="${productSubCategoryList}"${productSubCategoryList == productSubCategoryName ? 'selected' : ''}>${productSubCategoryList}</option> ...

How do I make the JSTL core tags work in RAD6.0?

I am using RAD 6.0, where I have put jstl.jar under the lib folder in my application. When I am using the JSTL tags, it does not give any copilation errors. But when I am trying to run the application, the core tags are not working. ...

how to submit a form without losing values already selected at the same form

Hi everyone, I am using jstl with dropdown lists. When i click submit button i success the specification but values int dropdownlists are reinitialized. So I want to submit form without loosing the values already selected in the form because I need to stay always at the same level in the form.To be more clear, user choose a value from...

submit form and keeping values setting

Hi I want to know if there is a way to submit a form but at the same time keep the values selected and edited(without reset). Thanks. ...

Which variables can be accessed with the ${...} syntax in a Struts tag in a JSP page?

I'm getting a little bit frustrated since I can't find out which variables I can access with the ${...} syntax in a Struts tag, placed in a JSP page. As an example I've got the following code: <c:set target="${status.menueStatus}" property="activeMenuePath" value="whatever" /> Where does the object "status.menueStatus" have to be def...

the attribute item of the tag <c:forEach> and java code to keep the dll dynamic

the problem I found is exactly in the attribut items of the tag forEach because I use a class java to build my options dynamically so I have not the options from the begining to put them in the items I tried the following: <%=h.ConstructListActivity("Activity","SELECT from Activityopc activityopc".toString()) %>' var="option"> but it d...

c:set tag to set a non-primitive type value

What's a possible way to use Spring Security tag <sec:authentication property="principal.id" /> as the value for the <c:set…> tag? These statements: <c:set var="userId" value="<sec:authentication property='principal.id' />"/> <c:set var="userId" value="<sec:authentication property=\"principal.id\" />"/> won't work. ...

Evaluate empty or null JSTL c tags

How can I validate a String null or empty using the c tags of JSTL. I have a variable of name var1 and I can display it, but I want to add a comparator for validate it. <c:out value="${var1}" /> I want to validate when is different of null or empty (my values are string). ...

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

Hello, 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" name="showBox"/> <jsp:param value="none" name="display"/> </jsp:include> The page is included fine, but when I try to access the parame...

Java: help me convert a working .jsp to some XML notation

I've got a .jsp file that is working fine. It's maybe a bit special in that it is calling a factory (ArticlesFactory) that returns a singleton (but that is a detail) of class Articles (it does so by automatically fetching shared Google Docs that are transformed to html and then stored into ".../text/en" but that is a detail too). The f...