I am using JSTL c:url tag to define my URL's in the application, something like:
<c:url value"/home" />
But the problem is that it appends the application context to the url, so the link becomes http://appName.come/appName/page while it should be http://appName.come/page.
The link had to be with slash, because it's not relative. I wa...
Is it possible to implement the following using plain JSTL:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<table>
<%
java.util.Map msgMap = (java.util.Map) request.getAttribute("messageMap");
for(int loopCount=1;loopCount>0;loopCount++) {
if(msgMap.containsKey("/p...
Hi,
I'm using the jstl c taglib in a web application which I deployed on Tomcat 6.0.26. I need to run this web application on Tomcat 5.0.28... the problem is that the jstl tags are not being interpreted. For example, I'm getting ${status.errorMessage} written on my login page whereas this should be empty unless the password entered is ...
Preface: I am a long-time fan of SO, read stuff here almost everyday -- but this is my first question -- thank you to everyone who has made SO such a fantastic resource!
Environment: Spring/JSTL/Java ; the constraints of this project are such that I cannot accept a solution which requires abandoning Spring/Java, though I could probably...
<%@ tag language="java" pageEncoding="utf-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ tag import="com.ocpsoft.pretty.time.PrettyTime, java.util.Date"%>...
Let say I have something like this in a JSP:
<li>
<c:set var="sectionId" scope="request" value="${userSession.sect['Utilities'].id}" />
<a class="header" href="#category-2">Cat 2</a><c:import url="/resources/softwareCategoriesAccordion.jsp"/>
</li>
<li>
<c:set var="sectionId" scope="request" value="${userSession.sect['Games'...
Here is the scenario,
Let's say I have a user class like so:
public class User{
private String firstName;
private String lastName;
//...
// setter, getters
}
Then I have a class like so to handle user Comments:
public class Comments{
// some fields
public static loadComments(User user, int count){...}
}
So far very basic s...
Is it somehow possible to only display the fraction digits with fmt:formatNumber? I basically need to render a price-like double in two fields: decimal and fraction digits (123.456 -> 123 456) and I want to avoid string splitting etc. :-)
The solution has also to work with a minimum number of fraction digits in order to create for inst...
Possible Duplicates:
accessing constants in JSP (without scriptlet)
Reference interface constant from EL
Hi,
I am having a class which contains all the constants used in my application.
Eg:
public class AppConstants {
public static final String USER_TYPE_ADMIN = "Administrator";
}
Now in one of my jsp page, i need t...
I have a controller bound the URL: "/ruleManagement".
Inside my JSP, I have a form that forwards (on submit) to "ruleManagement/save" url. When there are errors with the input fields, I want it to return back the original form View. This is where the problem starts...
Problem 1) Now that the URL is "/ruleManagement/save", my form sub...
Hello,
is it possible to create a custom JSTL tag that accepts a non-string attribute?
I would like to create a tag that would be handle pagination using PagedListHolder from Spring MVC.
<%@tag body-content="scriptless" description="basic page template" pageEncoding="UTF-8"%>
<%-- The list of normal or fragment attributes can be spec...
Hello I have an User with some Roles
User.class
public class User {
private Long id;
private String firstName;
private String lastName;
private Set<Role> roles = new HashSet<Role>(0);
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
public String getFirstName() { return this.firstName; }
pu...