Originally posted by Axel Janssen:
Hi,
first a 3x thank you for Shawn Bayern:
1. JSTL is very clear and easy to use
2. Your book is very clear and easy to use (I think even for pure dhtml-designers)
3. JSTL really speeds me up
I have 2 questions:
1. There is no String concenating in JSTL?
When I try something like:
<c:out value="${entry.cat_name + 'something completly different, but a String'}"/>
it seems to expect double values for doing adition of numbers.
2. Is it possible to escape " or '?
When I tried to dynamize some javaScript calls to build one of those fancy dhtml-navigators, it didn't work first, when I tried something similar to this:
<c:out value="${'addParent(\"a name\")'}"/>
I managed those problems by concenating the Strings I need for the javaScript in the Bean and using the very important escapeXml="false" parameter.
Originally posted by Eric Savage:
Two questions.
First, in JSTL, how does one get the size of a map/collection/etc. This seems such a common thing that I'm sure it must be somewhere but I can't find it.
User.getTickets() returns a Hashtable. I also tried extending Hashtable and adding the following:
[/QB]
Second, how does one reference a static property in JSTL. Something like the following:
[/QB]
Originally posted by Sankar B:
[QB]Hi,
What yar. Then u might've provided to declare variable in JSTL and use it without making it as an scoped attribute. Cos, declaring variables are just used for some temporary operations within that page.
Or, Is there any option to declare variables in JSTL and use it without making it as an Scoped Attribute ?
Ex: int x,y; String myString; like this. But, without making it as a scoped attribute.
Originally posted by Sankar B:
So, we fear whether we can utilise JSTL or stick with JSP itself or switch over to JSF when its released.
Originally posted by Harpartap Singh:
But, I thought another advantage of using <c:import> was that you are not bound to "relative URL" anymore.
So if there was a [B]<c:forward>[B] we could forward requests to another web application's URL without having to go through the circus of getContext, getRequestDispatcher, forward etc.
Isn't convenience a motivation for JSTL?
When one calls a bean in a "session" does this line class="simplebean.lineBean"
create an instance of the bean???
If I want to use the same bean in another JSP page would I use the same "beanid" and thus the same code line "<jsp:useBean class="simplebean.lineBean" id="bean0" scope="session" />"?
1. In the included file the RenderTag is instantiated again. It instantiates a NEW RenderTag object. CORRECT?
2. But since this included file is a NEW jsp file, it has its own NEW pageContext
but calling pageContext.getAttribute(section,REQUEST_SCOPE), should retrieve the ORIGINAL section/content pair that I had stored in the outside files pageContext. I believe this is the case, because the included file did get the SAME request object, and the stored section/content pair of values came with it. CORRECT?