2015-07-21 3:13 GMT+03:00 Jerry Malcolm <techst...@malcolms.com>:
> I have a large webapp that processes XML data into JSPs using XPath/JSTL
> plus some of my own custom tags.

Are you using Apache (Jakarta/Tomcat) implementation of JSTL or some
3-rd party one?

http://tomcat.apache.org/taglibs.html

It should not matter. Just wondering.

>   The app is working fine on two separate
> Tomcat systems (one is TC7 and one is TC8).  I copied the app to a third
> system (TC 7.0.57) and I'm having problems with all of the x:set variables
> on all pages.  In the JSP code I simply do:
>
> <x:set var="myVar" select="$doc/aaaa/bbbb/@cccc" />
>
> I then use ${myVar} to insert the string into the HTML.   In the first two
> TC environments, it inserts the appropriate data from the XML attribute into
> the HTML as expected.  In the third environment, it does not recognize the
> "${myVar}" as a variable and simply puts ${myVar} in the HTML instead of
> substituting the data value.
>
> I'm including all of the XPath/JSTL taglib jars in the WAR file. And I don't
> see any stray XPath/JSTL jars in the TC library or anything.  So
> theoretically it should work the same.  I could have missed something.  But
> I don't see anything obvious.  Obviously, though, something is different.
>
> Any ideas why it won't substitute in this one environment only?  Any idea
> where to start looking?  What code is responsible for recognizing the ${...}
> syntax?
>
> Thanks for any help you can give me.


That is odd.

If a variable is not defined, it would print an empty string.

Printing "${myVar}" means that EL expression is not recognized, or its
textual value is literally "${myVar}".   Are other EL expressions
working on that page?

There exist options that turn off recognition of EL expressions.  More
details are in JSP specification.  Make sure that version and schema
path in web.xml are correct.

JSTL library has different <%@taglib declaration URLs for JSTL 1.0 and
JSTL 1.1/1.2 tags. Make sure that you use the correct one.

Look into java code generated for the JSP page for what strings are
written out by the page. Is it written literally, or it is evaluated?

Are you accessing the JSP page in Tomcat,  or directly the source code
of JSP page? Iit may happen with misconfigured Apache HTTPD in front
of Tomcat.

Any unnecessary libs in WEB-INF/lib directory (e.g. a different copy
of Tomcat jars pulled in by Maven)?  Any unnecessary libs in Tomcat's
lib directory?

Can you simplify your example, while keeping it reproducible?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to