I have a JSP page that contains a scriplet where i instantiate an object. I would like to pass that object into the JSP tag without using any cache.
For example i would like to accomplish this:
<%@ taglib prefix="wf" uri="JspCustomTag" %>
<%
Object myObject = new Object();
%>
<wf:my-tag obj=myObject />
I'm trying to avoid dir...
Can anyone recommend a framework for templating/formatting messages in a standalone application along the lines of the JSP EL (Expression Language)?
I would expect to be able to instantiate a an object of some sort, give it a template along the lines of
Dear ${customer.firstName}. You order will be dispatched on ${order.estimatedDispat...
I have the following piece of code in my jsp :
<% pageContext.setAttribute("warnings",Globals.WARNING_MESSAGES); %>
<c:choose>
<c:when test="${requestScope[pageScope.warnings] or sessionScope[pageScope.warnings]}">
<html:errors header="warnings.header" footer="warnings.footer" prefix="warnings.prefix" suffix="warnings.suffix"/>...
How would I get the length of an ArrayList using a JSF EL expression? "#{MyBean.somelist.length}" does not work.
...
In EL expressions, used in a jsp page, strings are taken literally. For example, in the following code snippet
<c:when test="${myvar == 'prefix.*'}">
test does not evaluate to true if the value of myvar is 'prefixxxxx.' Does anyone know if there is a way to have the string interpreted as a regex instead? Does EL have something sim...
I have a List of beans, each of which has a property which itself is a List of email addresses.
<c:forEach items="${upcomingSchedule}" var="conf">
<div class='scheduled' title="${conf.subject}" id="scheduled<c:out value="${conf.id}"/>">
...
</div>
</c:forEach>
This renders one <div> per bean in the List.
For the sublist, ...
I'm getting the following error when I try to use the JSTL XML taglib:
/server-side-transform.jsp(51,0)
According to TLD or attribute directive in tag file,
attribute xml does not accept any expressions
I'm looking into the tlds etc, but if anyone knows what this is an can save me some time, it'd be appreciated!
If it helps, I get t...
Hi,
I am working in eclipse (Ganymede 3.4.1) and have created a ctl TLD :
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.x...
I'm looping through a list of items, and I'd like to get a request parameter based on the item's index.
I could easily do it with a scriptlet as done below, but I'd like to use expression language.
<c:forEach var="item" items="${list}" varStatus="count">
<!-- This would work -->
<%=request.getParameter("item_" + count.index)%>
...
For simplicity, i have the following file named test.jsp:
<script language="javascript">
alert("a$b".replace(/\$/g,"k"));
</script>
I put this file in my local server, then display it using firefox: http://localhost:8080/myproj/test.jsp. It works okay, the result alert string is:
akb
But when i put this file in a remote serve...
In a JSP page(index.jsp):
${requestContext.requestURL} is the URL
just shows the expression itself. It used to be evaluated to something like "http://.../somerset/"
I created the Maven project with maven-archetype-webapp archetype in Eclipse. The Jetty version is jetty-6.1.14.
My web.xml is simple:
<web-app>
<display-name>Arche...
Is there a way to use something like deferred EL in JSP 2.0 / J2EE 1.4? The idea is to pass a test to a tag file and have it display an item in a list (or not) based on the value of the expression. Basically, I'd like to do something like this:
JSP:
<x:myTag items="${myCollection}" test="${item.visible}"/>
myTag.tag
<c:forEach var...
Why doesn't the following work:
<c:set var="formId" value="#${otherFormId}"/>
where
<c:set var="formId" value="# ${otherFormId}"/>
notice the space ^
works fine (though is invalid for my purposes). Im trying to prepend ${otherFormId} with a # symbol (i.e. creating jquery id selector).
The first form ends up with
#${o...
I'm using/anticipating the following technology stack:
JSF
Seam
jBPM
Spring
Of course, I'd like Seam to access Spring beans directly and have got this much to work fine. I'd now like to move down into jBPM and develop a proof of concept process definition that accesses Spring beans to perform actions and make decisions.
To promote s...
How to remove the whitespace line generat by @code{}, @if{}, @foreach{}, @end{} ect Orb Tags in the result of MVEL 2.0 Templating ? ? ? ?
...
I have a JSP page running on Tomcat 5.5. I have the following code:
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i}" />
<br />
</c:forEach>
The output I am getting is:
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
I cant work out why the forEach loop is working but the output is not working. Any...
Here's the situation:
In a rich:dataTable in an a4j:form, i create a a4j:commandLink to select the values and pass it to the bean with the jboss el action syntax
action="#{bean.myaction(myparameter)}"
This works without problem.
But If I re-render the form to filter the datatable with an ajax call, when I select the value, it gives...
How does EL search for an attribute in JSP?
and how to disable it?
does any one know the performance of EL?
...
I'm trying to use expression language inside jstl tags but strange error occurs.
"According to TLD or attribute directive in tag file, attribute value doesn't accept any expressions"
The code is something like this:
<c:out value="${header['host']}"/>
But next code executes well:
${header["host"]}
<c:out value="hello"/>
I added js...
I'm running Tomcat 6.0.18 on Linux.
I have a JSP that uses a bean like this:
<jsp:useBean id="helper"
type="com.example.SomeType"
scope="request"/>
The page references an attribute of helper with the expression language like this:
<!-- This works properly, but could fail silently if the bean name is incorre...