RE: Evaluating expression in 2.3 specifications

2006-06-18 Thread Karr, David
>From what little I see, this is what you'll have to change: 1. A JSP 2.0 container uses JSTL 1.1.x You'll have to use the latest JSTL 1.0.x taglib. Note that the URI for those two versions are different. Make sure you use the correct one. 2. A JSP 1.2 container does not natively evaluate EL e

RE: import for dynamic content

2005-11-03 Thread Karr, David
The "c:import" tag is like the JSP include "action", as opposed to the JSP include "directive". It's important to understand the difference between these two. The latter includes at compile time, and the former includes at run time. In other words, the include action executes the specified resou

RE: Problems using Taglibs 1.1: c:out

2005-09-09 Thread Karr, David
I believe you'll need to make your web.xml use the Servlet 2.4 schema. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, September 09, 2005 3:22 AM > To: taglibs-user@jakarta.apache.org > Subject: Problems using Taglibs 1.1: c:out > > > Hi, > > i'

RE: how to do this with JSTL

2005-07-25 Thread Karr, David
Hold on there. I think you've misunderstood the intent of integrating JSTL with Struts. The idea is not to replace all Struts tags with JSTL tags. That's not practical. In general, you should look at the functionality available in the JSTL. If there's something that the JSTL does, and there's

RE: combining tags

2005-07-06 Thread Karr, David
To clarify some comments from other responders: It is a good idea to use Struts-EL if you're going to use the JSTL. However, for this particular example, the Struts tag library itself has knowledge of "c:forEach", as opposed to "logic:iterate", so an "html" Struts tag that uses "indexed=true" will

RE: question about tags and includes

2005-05-02 Thread Karr, David
It is trying to do the include at compile time, but your input is not "well-formed". You can't start an element in one file and end it in another. > -Original Message- > From: Luca Passani [mailto:[EMAIL PROTECTED] > > People, this one got me by surprise. I always thought that the statu

RE: JSTL Question

2005-04-11 Thread Karr, David
ill any > partial part of > a matching name. > > What I want to do is to have param.field or > ${restaurant[param.field]} > evaluated only once at the beginning of the table. param.field only > needs to be evaluated once as it becomes the name of the table. > > Tha

RE: JSTL Question

2005-04-11 Thread Karr, David
It's a little hard to tell exactly what you're trying to do here, but it might be helpful to know that '${restaurant.cuisine}' is the same as '${restaurant[param.field]}' if "param.field" is equal to "cuisine". With this, you would need only the single case. This strategy is only useful if you rea

RE: alternative of bean-el:write

2005-04-08 Thread Karr, David
> -Original Message- > From: Wendy Smoak [mailto:[EMAIL PROTECTED] > > From: "anuradha.vaidya" <[EMAIL PROTECTED]> > > > Now that there is no support for bean-el:write is there an > alternative > > I > can > > use for the same? > > Is this a Struts question? If so, look at the README

RE: alternative of bean-el:write

2005-04-08 Thread Karr, David
I would try this:    > -Original Message- > From: anuradha.vaidya [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 11:01 PM > To: Tag Libraries Users List > Subject: alternative of bean-el:write > > > Hi All > > I wanted to use bean-el:write this way

RE: Best practice for taglib declaration?

2005-04-01 Thread Karr, David
I'm afraid you misunderstood one important point about this. You can't avoid the "taglib" directive in your JSP. The only difference in the two strategies is what "uri" attribute you use in those taglib directives in your JSP. If you remove the taglib elements from your web.xml, then the JSP tag

RE: Entity reference preservation in

2004-12-09 Thread Karr, David
First of all, questions about Struts tags are better written in the "struts-user" group. Did you read the documentation for "bean:write"? Look at the "filter" attribute. That might help. > -Original Message- > From: Tomos Llewelyn [mailto:[EMAIL PROTECTED] > Sent: Thursday, December

RE: struts-logic counterpart of this...

2004-11-18 Thread Karr, David
> -Original Message- > From: luca [mailto:[EMAIL PROTECTED] > > Karr, David wrote: > > > If your web container doesn't support JSP 2.0, and you want > to use the > > EL in the attributes of your Struts tags, then you'll need > to utilize

RE: struts-logic counterpart of this...

2004-11-17 Thread Karr, David
Well, first of all, there's no technical reason you can't use the JSTL and Struts taglibs on the same page. An important question is what web container you're using. If your web container supports JSP 2.0, then you can use the EL in your JSP (assuming you use the servlet 2.4 doctype, and a couple

RE: forEach gives servletexception

2004-11-16 Thread Karr, David
What I read from this error message is that the type of "image" is a List or Array. That's what it's complaining about. What are you assuming is the type of the objects in the "pageList" collection? If you assume each object is a List or Array, then the syntax of "${image.uniqueId}" will not wor

RE: Custom tags

2004-10-04 Thread Karr, David
Placing the TLD in the taglib jar works in JSP 1.2 also. That is not a new feature. In order to take advantage of it, you need the following: * Keep the TLD in the taglib jar * Do not put the "taglib" directive in the web.xml * Specify a "taglib" directive in the JSP that uses the URI specified

RE: Putting custom tag inside a custome tag

2004-09-28 Thread Karr, David
Note that this only works in a JSP 2.0 container, with the EL enabled. If you're using Tomcat 4, or you haven't enabled the Servlet 2.4 version of web.xml, or other hand-waving, then this won't work. However, this is the best way to do it, if you can get it. > -Original Message- > From: H

RE: standard-1.1.1 expression language not working

2004-09-22 Thread Karr, David
s-EL with a JSP 2.0 container, it just won't work. Just use Struts by itself in a JSP 2.0 container and all the tags can use the EL (for attributes that have "rtexprvalue" set to "true"). > -Original Message- > From: Pedro Salgado [mailto:[EMAIL PROTECTED] &

RE: standard-1.1.1 expression language not working

2004-09-20 Thread Karr, David
Other replies indicated your problem with the web.xml and JSP page. Another point is that you don't use Struts-EL with JSP 2.0. > -Original Message- > From: Pedro Salgado [mailto:[EMAIL PROTECTED] > Sent: Monday, September 20, 2004 10:07 AM > To: [EMAIL PROTECTED] > Subject: standard-1.1.

RE: Dynamic Expressions for Struts-EL and JSTL

2004-09-02 Thread Karr, David
I wonder if you need something like this: ${formBean[layoutObject.property][layoutObject.property2]} Where "layoutObject.property" is "userInfo" and "layoutObject.property2" is "firstName". That will obviously be a litter harder to construct, but determining whether this works would be one ste

RE: How jsp assigns the variable type for

2004-08-31 Thread Karr, David
Those results seem reasonable. You should assume the value is a string, unless you specifically have an integer type. In your case, the value "1" is a string. Now, if you did "${1}", that might give you an integer. > -Original Message- > From: Starting out [mailto:[EMAIL PROTECTED] >

RE: page redirect problem in jstl or jsp?

2004-08-18 Thread Karr, David
If it isn't obvious yet, try: > -Original Message- > From: Gao Di [mailto:[EMAIL PROTECTED] > > i use struts framework in my project,and use the jstl > in the jsp page.now i want to write a page which will > auto forward to a struts action class,but whatever i > use jstl or jsp ,it

RE: Scriplet OK, JSTL OK - result different!!

2004-07-19 Thread Karr, David
It might be interesting to see what it does with the following: is empty node is empty node.title > -Original Message- > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > > OK guys, this is an odd one. Have been using JSTL 1.1 for a > short while with no pr

RE: passing JSTL to custom tag attribute

2004-05-13 Thread Karr, David
I would say there are several basic ideas here: 1. Use a JSP 2.0 container, like Tomcat 5. The JSTL is implemented natively there. 2. Use solution 1. 3. Build a second tag library that's implemented exactly like Struts-EL. Each tag class in Struts-EL is a subclass of the corresponding tag in th

RE: out value = '${str}' vs. [${str}]

2004-04-15 Thread Karr, David
Method 1 can be used in a JSP 2.0 container, or a JSP 1.2 container with JSTL 1.0. Method 2 can only be used in a JSP 2.0 container. In a JSP 2.0 container, the results will be the same (except for the "[" and "]" in method 2). > -Original Message- > From: [EMAIL PROTECTED] > > Can som

RE: Referencing scriptlet variable in expression language

2004-04-15 Thread Karr, David
If you read the JSTL specification, you would have learned that the EL doesn't reference scriptlet variables. > -Original Message- > From: Derek [mailto:[EMAIL PROTECTED] > > This has got to be a really trivial thing, but this > doesn't work for me: > > <% String test = "Happy Days"; %>

RE: JSP2.0 Tag File question

2004-04-04 Thread Karr, David
How many items are in the collection? Four? Show us the class represented by your "employee" object. That is probably the key. > -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Saturday, April 03, 2004 10:42 PM > To: Tag Libraries Users List > Subject: JSP2.0

RE: using JSTL 1.0.5 ExpressionEvaluatorManager for custom tags

2004-03-05 Thread Karr, David
I'm not sure what is wrong. I used ExpressionEvaluatorManager (not ExpressionUtil) to write Struts-EL, so you could inspect that code to look for examples. Ask about enabling aspects of Struts logging in struts-user. It uses commons-logging, so you should be able to set up a logging.properties f

RE: using JSTL 1.0.5 ExpressionEvaluatorManager for custom tags

2004-03-04 Thread Karr, David
You said that the bean "labels" is a java.util.List. However, you also said "table being the String ...". The error message, stating 'Attempt to convert String "labels" ...' appears to concur with the last statement (that "labels" is a String, not a List). It sure seems like "labels" is a String

RE: taglib standard 1.0 in Tomcat

2004-02-26 Thread Karr, David
I haven't been following this, but you should be able to put your "standard.jar" and "jstl.jar" into WEB-INF/lib, remove all "taglib" elements from "web.xml", and reference the canonical URI in your "taglib" elements in your JSP pages. Just in case, open up the jar file and inspect the "uri" eleme

RE: Subtracting 2 values from different collections using and el

2004-02-12 Thread Karr, David
Read the specification. These questions are easily answered there. In short, use the "varStatus" attribute. -Original Message- From: Adam Bickford [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 12:36 PM To: Tag Libraries Users List Subject: Subtracting 2 values from differe

RE: Problems with c:forEach and c:redirect

2004-02-11 Thread Karr, David
So the code above the redirect is only doing computation, and is not intentionally generating output, correct? You might have to make your code look ugly to prevent emitting newlines. As the number of items you have to iterate through gets larger, the computation-only loop will be generating more

RE: "Attribute select has no value" error

2004-02-08 Thread Karr, David
Assuming you really did copy this directly from your code, the answer is clear right here: You didn't close the "sql:query" tag with a ">" character, but the "select" line ends with one. Thus, the JSP compiler would think that "select" is an attribute", but you gave it no value. Move the ">"

RE: Redirect from imported file

2004-01-19 Thread Karr, David
Whether it works or not, note that redirecting in JSP isn't really considered a good idea. You run a risk of having your initial buffer already being flushed to the client, which would throw an exception (InvalidStateException?). It's best to make redirection decisions in your application logic, n

RE: Performance issues

2004-01-18 Thread Karr, David
should be aware of that, in any case. -Original Message- From: Colin Chalmers [mailto:[EMAIL PROTECTED] Sent: Saturday, January 17, 2004 5:17 AM To: Tag Libraries Users List Subject: Re: Performance issues Karr, David wrote: >Just in case, are you doing your measurements AF

RE: Performance issues

2004-01-17 Thread Karr, David
Just in case, are you doing your measurements AFTER the first generation/compile of the servlet? It's not meaningful to measure taglib performance before then. With respect to "caching" evaluation results, it's probably not worth it, as it would have to do most of the evaluation before it could de

RE: c:forEach, c:import and variable scope?

2003-12-09 Thread Karr, David
I can't see how that could work. The "c:import" operation is processing that URL in an external context. You'd probably have to use "jsp:include" for that sort of thing. > -Original Message- > From: otisg [mailto:[EMAIL PROTECTED] > > Here is the problem (using [] to avoid problems wit

RE: New to JSTL

2003-12-04 Thread Karr, David
Well, I can see several things here. First of all, it's important for us to know what container and version you're using. From the error you got from the JSTL test case, I'm guessing you're using one of the revisions of Tomcat 5. You talk about a "bean" that does some JDBC work. That certainly

RE: fmt tld Problem

2003-11-13 Thread Karr, David
Are you trying to use a tag named "form" from the "fmt" library? I don't see a tag by that name in the specification. > -Original Message- > From: Nic Werner [mailto:[EMAIL PROTECTED] > > For some reason, I can't use the 'fmt' taglib. I have the > correct include > in for JSTL 1.0 and

RE: Unstandard Library Source / Developing custom EL taglibs

2003-11-09 Thread Karr, David
As another poster pointed out, the source for the Struts-EL taglib is one example of a library that specifically uses the EL. I would recommend that you don't write a standalone library that uses the EL, but instead extend a non-EL library, and keep all the real business logic in the non-EL librar

RE: out> unable to find value

2003-11-03 Thread Karr, David
> -Original Message- > From: Morrow, Steve D. [mailto:[EMAIL PROTECTED] > > I have a session-scoped bean structured (in part) as follows: > > public class Customer { > public Integer id; > public String name; > public Integer getId() { > return id; > } > publi

RE: Storing JSTL/EL statements?

2003-10-29 Thread Karr, David
statements? > > > I tried something similar to this a while ago and instead of > printing the > business name out, it instead printed the expression out (ie, > "business.name" was sent to the browser - not the actual > business name). > Any special parameters I

RE: Storing JSTL/EL statements?

2003-10-29 Thread Karr, David
You might get mileage out of something like this: "${requestScope[expression]}". > -Original Message- > From: [EMAIL PROTECTED] > > i have, what is hopefully, a very brief question. does > anyone know of a way > to evaluate an EL statement that is cached in > request/session/etc scope

RE: Problem with c:import (JSTL 1.0)

2003-10-23 Thread Karr, David
Looks like you're missing a ">" at the end of the "c:if". -Original Message- From: Stephen Letschin [mailto:[EMAIL PROTECTED] I am having a problem with a c:import that I hope someone has an answer to. <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %> <%@ taglib uri="http:

RE: Help with JSTL...

2003-10-07 Thread Karr, David
> -Original Message- > From: Jacob Wilson [mailto:[EMAIL PROTECTED] > > I am developing a new application in Struts and just wanted > to see how to implement JSTL in my jsps... I am trying to > iterate a loop using a jstl tag... I am specifying a > collection object in the items attrib

RE: Tag Lifecycle

2003-09-30 Thread Karr, David
> -Original Message- > From: Lukas Bradley [mailto:[EMAIL PROTECTED] > > What is the lifecycle of custom tags? Are tag objects reused > throughout a > page? It seems as if my tags are not always being created. > They are not > *always* reused however. The custom tag lifecycle is pro

RE: not working as expected...

2003-09-26 Thread Karr, David
You're not using Resin, are you? Resin has their own JSTL implementation, which might be different from the Jakarta implementation. > -Original Message- > From: Billy Bacon [mailto:[EMAIL PROTECTED] > > I tried this after your suggestion and I still get the same > result. Are you > doi

RE: Can EL take variables?

2003-09-10 Thread Karr, David
One way to get indirection is to use the fact that the several variable scopes are all hashmaps available to the EL. So, if you have a variable named "formName" that contains the name of a variable you want to reference, you can reference "pageScope[formName]" to reference that variable. If you us

RE: set with body content throws exception

2003-09-05 Thread Karr, David
Yes, that's probably the correct approach. Using the body content is probably converting it from a Date back into a string. > -Original Message- > From: Siggelkow, Bill [mailto:[EMAIL PROTECTED] > > I would try doing the fmt:parseDate prior to the c:set as follows: > > var="theDate"/>

RE: writing a custom tag that can use EL

2003-09-04 Thread Karr, David
> -Original Message- > From: Eric W Hauser [mailto:[EMAIL PROTECTED] > > On Wed, 3 Sep 2003, Felipe Leme wrote: > > > - you *have* to add the code that evaluates the expression. > With JSP 2.0 you > > won't need to, it's done automatically > > Although this is obviously a valid point,

RE: forEach problem

2003-09-02 Thread Karr, David
If you're using the non-RT version of the tag library, then you can't use expression scriptlets for attribute values. You'll have to change your initial "c:set" to this (untested): <%=Constants4Lists.SECTION_LIST %> > -Original Message- > From: Adam Hardy [mailto:[EMAIL PROTECTED] >

RE: problems with install

2003-08-22 Thread Karr, David
You'll need to use a J2EE 1.3 compatible container to get this to work. > -Original Message- > From: e [mailto:[EMAIL PROTECTED] > Sent: Friday, August 22, 2003 11:10 AM > To: [EMAIL PROTECTED] > Subject: problems with install > > > > I've downloaded the standard taglibs from > http:/

RE: JSTL or html:options issue

2003-08-14 Thread Karr, David
Do you have more than one "getPo" function? Do you have a "setPo" function? And a long shot, you might try changing "po" to something more than two letters (making sure you change all your accessors in the same way). > -Original Message- > From: Shah, Shrihas (OFT) [mailto:[EMAIL PROTEC

RE: if with 2 script element not working

2003-07-22 Thread Karr, David
First of all, it's hard to help if you don't say what's happening. Saying "it doesn't work" isn't enough. It might be useful if you would print out the values you're comparing. If they're really not equal, then they really won't be equal :) . > -Original Message- > From: Thomas Martin [ma

RE: Length of collection using EL?

2003-07-22 Thread Karr, David
This has been discussed numerous times on this list. The EL can reference javabean properties, and elements of collections and maps. That's it. The length of a collection is not a javabean property. It's straightforward to implement a simple class called "CollectionBean" (and "MapBean") that is

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Karr, David
> -Original Message- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > > On Tue, 2003-07-22 at 10:54, Karr, David wrote: > > > If you have a bunch of constants that you might want to reference, you > > might consider processing a class with reflection, loadin

RE: Way to compare scoped value to a class constant variable?

2003-07-22 Thread Karr, David
The pre-JSP 2.0 version of the JSTL can reference properties of JavaBeans, and entries of collections and maps. That's it. If you have a bunch of constants that you might want to reference, you might consider processing a class with reflection, loading all the "static final" variables into a hash

RE: how to ask length of collection in JSTL tags

2003-07-15 Thread Karr, David
As you may know by now, the EL in this version only allows you to access javabean properties, and collection and map entries. You can't directly get the length of a map or collection. What I've done recently is implement a small class called "CollectionBean" which has two javabean properties of "

RE: Whitespace Galore!

2003-06-30 Thread Karr, David
First of all, you will always run some risk if you try to redirect from a JSP page. Nevertheless, if the redirect is near the top of the page and your buffer size is of a reasonable size, you should be ok. If you're failing, then you either have a miniscule buffer size, or your redirect element i

RE: JSTL and isUserInRole

2003-06-25 Thread Karr, David
Uh, no, that won't work. You can't call arbitrary methods in JSTL. > -Original Message- > From: Kumar, Kiran [mailto:[EMAIL PROTECTED] > > change it to > > > Thanks > > KiranKumar (Raj) > ext 7203 > > -Original Message- > From: Jim Kennedy [mailto:[EMAIL PROTECTED] > > Has a

RE: JSTL and isUserInRole

2003-06-25 Thread Karr, David
This is handled with the "logic:present" tag in Struts. You can't call arbitrary methods in the first version of the JSTL. > -Original Message- > From: Jim Kennedy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 12:58 PM > To: Tag Libraries Users List > Subject: JSTL and isUser

RE: Users & Roles in JSTL

2003-06-24 Thread Karr, David
You'll find that complex applications will end up using more than one tag library. It's not really practical to assume you'll do everything with a single tag library, whether it's Struts, JSTL, or the Display tag library. If you want to use both Struts and JSTL, you can use the Struts-EL library

RE: new instance

2003-06-13 Thread Karr, David
There are several variations of the useBean tag. If you read the information about this in the JSP specification (or your favorite JSP book), you'll discover that one of the variations will create an instance of the bean. > -Original Message- > From: MARCIO JULIÃO [mailto:[EMAIL PROTECT

RE: Non EL enabled tags

2003-06-12 Thread Karr, David
The "attribute" specification in your TLD needs to have "rtexprvalue" set to true. Check the JSP specification or a JSP book about this. > -Original Message- > From: James Norman [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2003 10:30 AM > To: [EMAIL PROTECTED] > Subject: Non EL e

RE: Accessing scope attributes with dotted names using JSTL

2003-06-06 Thread Karr, David
I guess one thing that might help a tiny bit is if there was a map in some scope that is formed by merging (in order) the applicationScope, sessionScope, requestScope, and pageScope maps. That would give you a single map to search, instead of having to know which scope to look in. > -Original

RE: any tutorial to develop EL-compliant taglib?

2003-05-27 Thread Karr, David
The JSTL specification doesn't specify an API to the EL engine, so you'll have to rely on an implementation that gives you an API for this. You can use the Jakarta Taglibs implementation for this. If you look through the classes in this library, you'll find both the "ExpressionEvaluatorManager

RE: lookup when a name contains a dot

2003-04-04 Thread Karr, David
It's unfortunate, but that would be another strategy that would make your life easier. > -Original Message- > From: Brian Buckley [mailto:[EMAIL PROTECTED] > > David, > > Thanks for your help. > > Perhaps my convention of naming objects using their fully-qualified > package > names ough

RE: lookup when a name contains a dot

2003-04-03 Thread Karr, David
I can only see one way to do this, and it's not simple. You'd have to write a custom tag that would create a page-scoped variable which is a single map variable that has been merged from the following maps, in order: application, session, request, and page. Then you could reference your dotted va

RE: Tags Aren't Getting Translated (using WebLogic 6.1)

2003-03-27 Thread Karr, David
If you cut/pasted that excerpt directly from your JSP page, then the answer is obvious. It's "taglib", not "tablib". I have no idea what's going on with that copying of tld files. > -Original Message- > From: Hohlen, John C [mailto:[EMAIL PROTECTED] > > > Hi. > > > > My team is using We

RE: Variable in a Struts tag

2003-03-26 Thread Karr, David
Ask Struts questions on the "struts-user" list. If you want to use the JSTL with Struts, you should probably use the Struts-EL library, which is a contributed library in the nightly build. > -Original Message- > From: Giovanni Formenti [mailto:[EMAIL PROTECTED] > > I have the JSTL/Struts

RE: Evaluating expression on my custom tags

2003-03-17 Thread Karr, David
The Jakarta JSTL implementation provides a public API that you can use in your own tag libraries. You can browse the javadoc for the "ExpressionEvaluatorManager" class. You could also browse the source code for the "Struts-EL" contributed library in the Struts distribution. If you inspect the "Ev

RE: Java constants as attribute values

2003-03-11 Thread Karr, David
The JSTL EL references JavaBeans properties, collections, and maps. That's it. If you want to reference a constant, you'll have to have your business or setup logic put the constant into a JavaBean property, collection, or map. > -Original Message- > From: René Zanner [mailto:[EMAIL PR

RE: Tag libraries that use ExpressionEvaluator depend on Jakarta implementation

2003-03-10 Thread Karr, David
> -Original Message- > From: Pierre Delisle [mailto:[EMAIL PROTECTED] > > David M. Karr wrote: > > This is probably obvious, but it is the case that any tag libraries that > use > > the ExpressionEvaluator class in the Jakarta JSTL implementation are > actually > > dependent on the Jakarta

RE: need a scope/visibility example (newbie)

2003-03-06 Thread Karr, David
You likely will have more problems if you don't have time to read the specification. The JSTL expression language can only reference javabeans properties, collections entries, and map entries. It can't reference variables directly, and it can't call functions, except for javabeans property getter

RE: attributes required but not both.

2003-02-25 Thread Karr, David
ve a "false" required > attribute and then run isValid() to check if one or the other was > supplied? > > Thanks, > > jb > > -Original Message- > From: Karr, David [mailto:[EMAIL PROTECTED] > Sent: Tue 2/25/2003 4:

RE: attributes required but not both.

2003-02-25 Thread Karr, David
Well, if you want to validate this at translation time, then I guess a "TagExtraInfo" class would do it. This will have a "isValid()" method, which takes a "TagData" object, which is basically a hashmap of attributes and values. You specify the presence of the TEI class in the TLD. > -Origin

RE: Session

2003-02-25 Thread Karr, David
Use the JSTL. It would be as simple as this: Or if you wanted to make sure you got it from session scope: > -Original Message- > From: Sloan Seaman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 25, 2003 9:16 AM > To: [EMAIL PROTECTED] > Subject: Session > > What is the bes

RE: Attributes with Spaces in Their Names

2003-02-20 Thread Karr, David
Yes. In this case, you could use: '${applicationScope["theRestaurantCollectionPacific Rim"].collection}' > -Original Message- > From: Hunter Hillegas [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 19, 2003 12:35 PM > To: Taglibs > Subject: Attributes with Spaces in Their Names >

RE: Benefits of using taglibs...

2003-02-19 Thread Karr, David
You may get some benefits from this, but you'll probably get better benefits from a harder task, of rearchitecting your application to use the "Web MVC" structure. If you just concentrate on "translating" scriptlets to custom tags, you'll end up writing custom tags which just execute business logi

RE: JSTL problems on Tomcat 4.1.x

2003-02-13 Thread Karr, David
It might be useful if we could see your JSP code, and any relevant bean code if it's non-trivial. -Original Message- From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]] Sent: Wed 02/12/2003 3:17 PM To: [EMAIL PROTECTED] Cc: Subject:

RE: accessing static fields/methods from a static class using jstl el

2003-02-05 Thread Karr, David
> -Original Message- > From: Henri Yandell [mailto:[EMAIL PROTECTED]] > > On Wed, 5 Feb 2003, Karr, David wrote: > > > The JSTL EL can reference javabean properties, maps, and collections. > > That's it. The JSTL specification describes this, alth

RE: accessing static fields/methods from a static class using jstl el

2003-02-05 Thread Karr, David
> -Original Message- > From: Donald Ball [mailto:[EMAIL PROTECTED]] > > hi, i'm trying to figure out how to access static fields or methods from a > static class using the jstl el. say i've got a class, call it > com.example.Foo, which has a method getBar(). how would i access that > prope

RE: Pb with c:out for bean stored under a doted key name

2003-02-05 Thread Karr, David
> -Original Message- > From: Marc Guillemot [mailto:[EMAIL PROTECTED]] > > Hi, > using Strugs I've a java.util.Locale object stored in session under the > key > "org.apache.struts.action.LOCALE". How can I output the language property > of > this bean using c:out? > > I've nothing outputt

RE: Non Java Developers, programmers using JSTL and taglibs

2003-02-04 Thread Karr, David
Ideally, applications will be designed using the Web MVC paradigm, so view pages will contain only "view logic". However, in a complex application, using even the most popular frameworks (Struts, for instance), it's still difficult to completely avoid using scriptlets or scriptlet expressions. If

RE: Escaping quotes in form fields - c:out doesn't see my variable

2003-02-04 Thread Karr, David
Oh, yeah, and as another poster pointed out, it is "${book.title}", assuming your bean class is written correctly. -Original Message- From: Stephen Riek [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 9:52 PM To: [EMAIL PROTECTED] Subject: Escaping quotes in form fields - c:out

RE: Escaping quotes in form fields - c:out doesn't see my variable

2003-02-04 Thread Karr, David
First of all, it would help if you made it clear exactly what your first problem is. Whenever the most detailed statement of what went wrong is "it does not work", then you haven't given enough information. I'm going to guess that you see nothing from your "c:out". This is because you've created

Issues with implementing the EL in a non-JSP environment

2003-01-30 Thread Karr, David
How practical is it to consider deploying tools/frameworks using the EL which do not use JSP? I looked in the two jar files (standard and jstl), and it appears "standard" contains all the EL classes, but it also contains some classes which are obviously JSP-related. If there's no obvious dependen

How do tag libraries handle final references to specific images used in custom tags?

2003-01-28 Thread Karr, David
I'm familiar with the HTML tags for specifying images, either as a static image or as a button. I'm also familiar with how tag libraries work. What are useful conventions for building custom tags in a tag library that come with canned images? For instance, if a tag library provides some sort of

RE: Cooperating tag

2002-12-31 Thread Karr, David
a particular file that shows what you are > talking about? > I've looked through both the tags in the distribution and > CVS, but haven't > found an example. > > Thanks! > > > -Original Message- > > From: Karr, David [mailto:[EMAIL PROTECTED]] > >

RE: Cooperating tag

2002-12-31 Thread Karr, David
In JSP 1.2, you have to specifically use the API for the JSTL expression language engine if you want attributes to use the "${...}" syntax. In JSP 2.0, this will happen automagically, but we're not there yet. If you want one example of how this is done, look at the Struts-EL contrib library, w

RE: Taglibs and Commons Logging

2002-12-17 Thread Karr, David
> -Original Message- > From: Mark R. Diggory [mailto:[EMAIL PROTECTED]] > > I've been attempting this strategy, but it seems that in the web > application, somehow the properties files in the classes > directory don't > seem to get recognized by commons logging and used. When I compile

RE: Taglibs and Commons Logging

2002-12-17 Thread Karr, David
Struts uses commons-logging. If you put a "commons-logging.properties" file in your WEB-INF/classes directory, with the following contents: org.apache.commons.logging.Log = org.apache.commons.logging.impl.SimpleLog Then, you can have a file named "simplelog.properties" in the same place, with c

RE: Stuck in Mud... Need your help...

2002-12-16 Thread Karr, David
The return value from "doStartTag()" can have three (more?) different return values, being EVAL_BODY_INCLUDE, EVAL_BODY_BUFFERED, or SKIP_BODY. I don't see how the difference is "silly". It was a good idea to separate them, so tags which don't need to manipulate their body can be more efficient.

RE: Word Separator Character For Bean Key Names...

2002-12-12 Thread Karr, David
Make sure you nest quotes correctly. That EL expression string you supplied would be nested by single quotes. > -Original Message- > From: Hohlen, John [mailto:[EMAIL PROTECTED]] > > Follow-Up Question: > > If I want access a property from the bean, such as lastName, > what's the > syn

RE: invoking a JSP or servlet

2002-12-10 Thread Karr, David
A common pattern is to have your welcome file be a jsp that does nothing but forward to your first "action". > -Original Message- > From: Anuj Agrawal [mailto:[EMAIL PROTECTED]] > > Is it accurate to say that we should never invoke a JSP file > directly? It > should always be forwarded

RE: How to add object to a List or Map with JSTL ?

2002-12-01 Thread Karr, David
If you're determined to put your business logic into your JSP pages, then just use a scriptlet to create the list object and put it into the session. You can expect the JSTL to well support applications which use the MVC pattern (by having "view" logic in your JSP pages and "business" logic in

RE: rtexprvalue and EL

2002-11-27 Thread Karr, David
If these are constants in your application, you want to load this information ONCE, into your application context. You would do this in a servlet's init() method, which is set to "load-on-startup", or you could add a ServletContextListener for the application to do the same thing. > -Origi

RE: JSTL Bug - requestScope[var] not working

2002-11-21 Thread Karr, David
If Shawn's response wasn't clear, I'm not sure what else we can say. The EL parser doesn't read scripting variables. It doesn't know anything about them. It can't use them. Your first example doesn't work because it's trying to reference a scripting variable. From the EL's point of view, th

RE: page context

2002-11-13 Thread Karr, David
First of all, if you want to ask questions about Struts, ask them on the "struts-user" list. You'll get better answers. I don't know what you mean by "user context", so I can't compare them. Note that when using Struts, a good practice is to have all links go to Actions, not directly to JSP pa

RE: struts issues for multiple action and taglib

2002-11-13 Thread Karr, David
First of all, you're better off asking questions about Struts on the "struts-user" list. Your first issue: You've mostly answered your own question. The automatic handling of form beans, both in and out of pages, is a very powerful tool. Your second issue: There are several ways to handle th

  1   2   >