View | Details | Raw Unified | Return to bug 48616
Collapse All | Expand All

(-)jasper/src/share/org/apache/jasper/compiler/Generator.java (+33 lines)
Lines 301-306 Link Here
301
            }
301
            }
302
302
303
            public void visit(Node.CustomTag n) throws JasperException {
303
            public void visit(Node.CustomTag n) throws JasperException {
304
                // XXX - Actually there is no need to declare those
305
                // "_jspx_" + varName + "_" + nestingLevel variables when we are
306
                // inside a JspFragment.
304
307
305
                if (n.getCustomNestingLevel() > 0) {
308
                if (n.getCustomNestingLevel() > 0) {
306
                    TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
309
                    TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
Lines 2466-2471 Link Here
2466
        }
2469
        }
2467
2470
2468
        private void declareScriptingVars(Node.CustomTag n, int scope) {
2471
        private void declareScriptingVars(Node.CustomTag n, int scope) {
2472
            if (isFragment) {
2473
                // No need to declare Java variables, if we inside a
2474
                // JspFragment, because a fragment is always scriptless.
2475
                return;
2476
            }
2469
2477
2470
            Vector vec = n.getScriptingVars(scope);
2478
            Vector vec = n.getScriptingVars(scope);
2471
            if (vec != null) {
2479
            if (vec != null) {
Lines 2515-2520 Link Here
2515
            if (n.getCustomNestingLevel() == 0) {
2523
            if (n.getCustomNestingLevel() == 0) {
2516
                return;
2524
                return;
2517
            }
2525
            }
2526
            if (isFragment) {
2527
                // No need to declare Java variables, if we inside a
2528
                // JspFragment, because a fragment is always scriptless.
2529
                // Thus, there is no need to save/ restore/ sync them.
2530
                // Note, that JspContextWrapper.syncFoo() methods will take
2531
                // care of saving/ restoring/ sync'ing of JspContext attributes.
2532
                return;
2533
            }
2518
2534
2519
            TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
2535
            TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
2520
            VariableInfo[] varInfos = n.getVariableInfos();
2536
            VariableInfo[] varInfos = n.getVariableInfos();
Lines 2576-2581 Link Here
2576
            if (n.getCustomNestingLevel() == 0) {
2592
            if (n.getCustomNestingLevel() == 0) {
2577
                return;
2593
                return;
2578
            }
2594
            }
2595
            if (isFragment) {
2596
                // No need to declare Java variables, if we inside a
2597
                // JspFragment, because a fragment is always scriptless.
2598
                // Thus, there is no need to save/ restore/ sync them.
2599
                // Note, that JspContextWrapper.syncFoo() methods will take
2600
                // care of saving/ restoring/ sync'ing of JspContext attributes.
2601
                return;
2602
            }
2579
2603
2580
            TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
2604
            TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
2581
            VariableInfo[] varInfos = n.getVariableInfos();
2605
            VariableInfo[] varInfos = n.getVariableInfos();
Lines 2631-2636 Link Here
2631
         * the given scope.
2655
         * the given scope.
2632
         */
2656
         */
2633
        private void syncScriptingVars(Node.CustomTag n, int scope) {
2657
        private void syncScriptingVars(Node.CustomTag n, int scope) {
2658
            if (isFragment) {
2659
                // No need to declare Java variables, if we inside a
2660
                // JspFragment, because a fragment is always scriptless.
2661
                // Thus, there is no need to save/ restore/ sync them.
2662
                // Note, that JspContextWrapper.syncFoo() methods will take
2663
                // care of saving/ restoring/ sync'ing of JspContext attributes.
2664
                return;
2665
            }
2666
2634
            TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
2667
            TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
2635
            VariableInfo[] varInfos = n.getVariableInfos();
2668
            VariableInfo[] varInfos = n.getVariableInfos();
2636
2669

Return to bug 48616