Is the SQL tags (in JSTL) performance acceptable?
I'm populating tables and was wondering if it would be
better to read the data in normal Java code and then
populate the table with
td%= row.getItem1() %/td
td%= row.getItem2() %/td
etc.
I'm not too worried about trying to keep java code out
thanks,
i tried this on opera 6 for windows and it does not compute the base URI of
the document per Section 14.14 of rfc2616. i tried using the jstl redirect
tag but the app doesn't recognise it the header returns a blank and whats
within the body tags takes up the space. it looks like a
Just guessing, but I doubt it will be faster performance-wise, just faster
to develop. It lets you treat JSP as a scripting language and remove the
compile/deploy stage.
Hen
On Thu, 5 Feb 2004, Riaan Oberholzer wrote:
Is the SQL tags (in JSTL) performance acceptable?
I'm populating tables
yes. i have an application with an include header.jsp file, and its using
the c:redirect/ tag to go to the remote site then nothing happens in
terms of header.jsp tag, this is missing from the browser page and appears
to return nothing.
in terms of the c:import tag it works ok if the url is
When you're talking about read the data, what type of object would you be
reading from? If it's a Result generated by one of the tags, then any
significant performance hit will already have been taken. In other words, the
*potentially* slow and memory intensive part of the SQL tags is in
hi,
i have a struts application and i use jtsl taglibs. In order to
internationalise my webpage, i use the taglibs-i18n taglib. I make my
file correctly like
-ApplicationResources.properties
-ApplicationResources_fr.properties
I'd like to know how i18n choose the appropriate language between the
I've just upgraded to TC 5.0.18 and J2SDK 1.4.2_03.
The problem persists in this environment as well, though the Bug ID that
Kris gave was marked as resolved for 5.0.18, so maybe something more
that I'm overlooking here?
Thanks,
-aadi
Pierre Delisle wrote:
To make things easier, make sure
Hi,
is it possible to use JSTL for an expression like
%=calculateDays(startDate, endDate) % ???
probably not, but I am too new to JSTL to figure it out by myself. Could
someone advise me?
thanks.
Dirk
-
To unsubscribe,
The jakarta-tomcat-5-bin-20040203.zip build seems to work for me. The bug was
reported *against* 5.0.18.
Quoting Aadi Deshpande [EMAIL PROTECTED]:
I've just upgraded to TC 5.0.18 and J2SDK 1.4.2_03.
The problem persists in this environment as well, though the Bug ID that
Kris gave was
I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH Linux
9.
My XHTML JSP contains a simple construct: p1 + 2 + 3 = c:out
value=${1+2+3}//p
But the expression is not being evaluated, yet the c:out tag is being
processed fine. The output just looks like:
1 + 2 + 3 =
There a several different ways to calculate days, based on the definition of
day; e.g. should 23:59 - 00:01 count as a day? Nevertheless, once you
decide on those rules, you can write your own custom tag (I don't believe
JSTL has such a function).
my:days start=%= startDate % end=%= endDate % /
jstl 1.0 has no notion of first class functions, but JSTL 1.1 does ( and
I believe they're implemented as static methods of a given class )
hth,
-a
Just Fun 4 You wrote:
Hi,
is it possible to use JSTL for an expression like
%=calculateDays(startDate, endDate) % ???
probably not, but I am too
I just verified and that I'm running 1.4.2_03 and the JAVA_HOME
is set properly. Sadly a junit test gives the same error.
I plugged the 3 xalan jars into cooktop xml and it works there.
-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 05, 2004
Depends. If you're using a JSP 2.0 container, you can create EL functions that
map to public static Java methods. See section 2.6 of the JSP 2.0 Spec. JSTL 1.1
provides a basic set of EL functions, see section 15 of the JSTL 1.1 Spec.
However, if you're using JSTL 1.0 (JSP 1.2), then you're kind
el has been incorporated into JSP 2.0 which is what Tomcat 5 implements.
So, you no longer need the c:out tag. Just do:
p1 + 2 + 3 = ${1+2+3}/p
Check out Tomcat's default pages to see more cool things you can do with
Tomcat 5 (JSP 2.0/Servlet2.4).
-Ben
From: David Wall [EMAIL PROTECTED]
See, I _knew_ I was overlooking something ( like a basic understanding
of Bugzilla) !
Thanks, I'll check it out..
-a
Kris Schneider wrote:
The jakarta-tomcat-5-bin-20040203.zip build seems to work for me. The bug was
reported *against* 5.0.18.
Quoting Aadi Deshpande [EMAIL PROTECTED]:
is it possible to use JSTL for an expression like
%=calculateDays(startDate, endDate) % ???
probably not, but I am too new to JSTL to figure it out by myself. Could
someone advise me?
This could be possible through an EL function (introduced in JSP 2.0).
The syntax would be as follows:
Here's a little tester jsp that demonstrates one way to do it:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
jsp:useBean id=endDate class=java.util.Date
jsp:useBean id=startDate class=java.util.Date/
%-- this sets the startDate to one year ago --%
c:set target=${startDate}
Thanks... this is insightful. Ie, not worth exploring
something else and therefor sticking to the neater
JSTL SQL tags.
--- Kris Schneider [EMAIL PROTECTED] wrote:
When you're talking about read the data, what type
of object would you be
reading from? If it's a Result generated by one of
the
David Wall wrote:
I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH Linux
9.
My XHTML JSP contains a simple construct: p1 + 2 + 3 = c:out
value=${1+2+3}//p
But the expression is not being evaluated, yet the c:out tag is being
processed fine. The output just looks like:
1 +
Since you're using a JSP 2.0 container, you should be able to just do:
p1 + 2 + 3 = ${1+2+3}/p
Make sure you're using a Servlet 2.4 deployment descriptor.
That didn't work for me. Perhaps it's your last comment. What does it mean
to have a 2.4 deployment descriptor for the JSP page? Maybe
I think you need to indicate in the web.xml that this is a jsp version 2
web
application, otherwise the container assumes the web application is
written for
an old jsp version where not the container but the taglib does the EL
evaluation
(you would need the 1.0.5 taglib version for this).
is it possible to use JSTL for an expression like
%=calculateDays(startDate, endDate) % ???
probably not, but I am too new to JSTL to figure it out by myself. Could
someone advise me?
This could be possible through an EL function (introduced in JSP 2.0).
The syntax would be as
David Wall wrote:
I think you need to indicate in the web.xml that this is a jsp version 2
web
application, otherwise the container assumes the web application is
written for
an old jsp version where not the container but the taglib does the EL
evaluation
(you would need the 1.0.5 taglib
Thanks. The comments below did it for me. However, I still had some JAR
file location issues (tomcat's common/endorsed for the webapps WEB-INF/lib).
Do most people put the XERCES, XALAN, JSTL/STANDARD jars in the endorsed
location or do they just keep it with their webapps? Right now, I seem
thanks to you all. Unfortunately I am stuck to JSTL 1.0 since I use Tomcat 4
with JSP 1.2. I am aware now that JSP 2.0 offers a lot improvements.
However, I do not feel very comfortable with the idea to setup static
methods for each el function. I am also very interested in the technical
aspects:
Section 8.3 of the JSTL 1.0 Spec provides the details of how a basename and set
of preferred locales are used to determine the resource bundle. Give it a look
and post back if you still have questions. You should notice that the set of
preferred locales can either be taken from the client/browser
NB: Date.setYear is deprecated.
Quoting Ben Anderson [EMAIL PROTECTED]:
Here's a little tester jsp that demonstrates one way to do it:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
jsp:useBean id=endDate class=java.util.Date
jsp:useBean id=startDate class=java.util.Date/
Instead of:
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
...
/web-app
Use:
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
29 matches
Mail list logo