On 3/6/07, Tim Funk <[EMAIL PROTECTED]> wrote:
trimDirectiveWhitespaces is only applicable at servlet configuration
time. See $TOMCAT_HOME/conf/web.xml

There's a new directive and new jsp property which is supposed to do
the same as our trimSpaces (of course, it's far more complicated).
While it is parsed and validated (to pass the TCK), it doesn't seem to
be used.

The user could test the following patch to see what it does:
Index: TextOptimizer.java
===================================================================
--- TextOptimizer.java  (revision 513314)
+++ TextOptimizer.java  (working copy)
@@ -29,6 +29,7 @@
    static class TextCatVisitor extends Node.Visitor {

        private Options options;
+        private PageInfo pageInfo;
        private int textNodeCount = 0;
        private Node.TemplateText firstTextNode = null;
        private StringBuffer textBuffer;
@@ -36,6 +37,7 @@

        public TextCatVisitor(Compiler compiler) {
            options = compiler.getCompilationContext().getOptions();
+            pageInfo = compiler.getPageInfo();
        }

        public void doVisit(Node n) throws JasperException {
@@ -71,7 +73,8 @@

        public void visit(Node.TemplateText n) throws JasperException {

-            if (options.getTrimSpaces() && n.isAllSpace()) {
+            if ((options.getTrimSpaces() ||
pageInfo.isTrimDirectiveWhitespaces())
+                    && n.isAllSpace()) {
                n.setText(emptyText);
                return;
            }

Rémy

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to