Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-taglibs Wiki" 
for change notification.

The following page has been changed by BjornTownsend:
http://wiki.apache.org/jakarta-taglibs/Standard1%2e1%2e3FAQ

The comment on the change is:
Supplanted by the main JSTL FAQ.

------------------------------------------------------------------------------
- Q. Using string() on a complex expression in an xml tag is returning an empty 
string. What's up?
+ deleted
  
- A. This was reported by Yuriy Yatsyk in 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=33032 #33032] and appears 
to be due to some oddity in the way the Standard Taglib uses Xalan. The work 
around is to split your code up so that string() is applied to a simple 
expression. 
- 
- Using Yuriy's example change:
- 
- {{{
- <x:set var="navigationPath" 
-        select="string($content/content/pages/page/url[text() = 
$contentUrl]/../navigation-path)" 
-        scope="request"/>
- }}}
- 
- to:
- 
- {{{
- <x:set var="navigationPath" 
-        select="$content/content/pages/page/url[text() = 
$contentUrl]/../navigation-path" 
-        scope="request"/>
- <x:set var="navigationPath" select="string($navigationPath)" scope="request"/>
- }}}
- 
- 
- Q. The Standard Taglib depends on Xalan. Why?
- 
- A. The original source was coded against Xalan packages and not the XSL 
specification. It's unlikely that this will be changing any time soon, so you 
will need to include Xalan with your web applications. See 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=30050 #30050] to see if any 
developments occur with this issue.
- 
- 
- Q. The order of columns coming back in my SQL query does not match the order 
returned by the specification. Why?
- 
- A. The underlying code for sql:query uses a TreeMap to hold the row data. 
Unfortunately the specification limits us and we can't change this to a 
SortedMap, so there is no way to fix this bug. However if you approach the 
sql:query differently you can work around this issue. Consider the following 
code that avoids using the row data:
- 
- {{{
-   <%-- Get the column names for the header of the table --%>
-   <c:forEach var="columnName" items="${db.columnNames}">
-     <th><c:out value="${columnName}"/></th>
-   </c:forEach>
- 
-   <%-- Get the value of each column while iterating over rows --%>
-   <c:forEach var="row" items="${db.rowsByIndex}">
-     <tr>
-       <c:forEach var="column" items="${row}">
-         <td><c:out value="${column}"/></td>
-       </c:forEach>
-   </c:forEach>
- }}}
- 
- For more information concerning this bug, see 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=33054 #33054]
- 
- 
- Q. I am getting an exception - "An error occurred while evaluating custom 
action attribute ...". Why?
- 
- A. Chances are this is the issue reported by Luca Conte 
([https://issues.apache.org/bugzilla/show_bug.cgi?id=34153 #34153]) and solved 
by Bill Stilwell. If your beans lack setters for the properties being obtained 
then from JDK 1.4.2_06 onwards this results in an exception. The workaround is 
to add a set method for the property. 
- 
- 
- Q. The out tag is not handling my paramater named 'param'. Why not?
- 
- A. The following parameters should be treated as reserved words and not be 
used as developer variable names:
- 
-  * pageContext
-  * pageScope
-  * requestScope
-  * sessionScope
-  * applicationScope
-  * param
-  * paramValues
-  * header
-  * headerValues
-  * initParam
-  * cookie
- 
- If you do use them as variable names, your mileage may vary. For more 
information, please see 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=40870 #40870]. If you do 
need to use such a variable, then you can work around the keyword by referring 
to them within the pageScope as follows:
- 
- {{{
- <c:out value="${pageScope.param}"/>
- }}}
- 
- 
- Q. My XML tag is resulting in "Content is not in prolog" - why?
- 
- A. This is an error from the XML parser and appears to usually mean that the 
parser junk input. Most likely you have the filename wrong (reported as 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=41224 #41224]).
- 
- Q. The last() and position() functions are not working within x:forEach - why?
- 
- A. Not a clue :) It appears to be an aspect of how the Standard Taglib is 
calling Xalan and the solution is not readily apparent. The bug is tracked in 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=22765 #22765]. 
- 
- Q. When using the Xerces (2.3.0) version that ships with JSTL 1.0.5 with JDK 
- 1.3.1.07 I'm getting the error below:
- 
- {{{
- java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError
-       at 
- org.apache.xml.serialize.IndentPrinter.breakLineIndentPrinter.java:281). 
- }}}
- 
- when trying to serialize a XML Document. 
- 
- A. This is due to a bug in Xerces. It doesn't apply to JSTL 1.1.x, as 1.1.x 
does not depend on Xerces. There are presently no plans to release a new 
version of the 1.0.x branch, but a workaround of sorts can be found by by 
recompiling Xerces with a JDK version higher than 1.3.1_07 (1.3.1_11 is 
reported to work). Using a later version of Xerces may also suffice.
- 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to