Konstantin, thank you so much for the quick response.  My comments below....

On 7/21/2015 6:07 AM, Konstantin Kolinko wrote:
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.
I'm including the taglibs-*-1.2.1 version in my WEB-INF/lib. I did notice that there are 4 jars in the 1.2.5 distribution. Not idea why (been too long since I set this up), but I am not including the 'compat' jar file in my lib. Is that new? When is it needed? The fact that it's still working fine on other installations without the compat jar makes me think it's not related to the current problem. But if I need that jar for some reason, I'll add it.

   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?
Do you mean other variables using the ${...} syntax? Same with all variables using that syntax.
Are there other types of EL expressions that I should check?

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.
I'm assuming that all of the version info in web.xml is correct since this exact same web app image works fine on the other two installations. Those version are 7.0.50 and 8.0.15 which are on either side of the 7.0.57 that is not working. Was anything changing in underlying TC JSP, etc around those different versions (around 1/2015)

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?
I looked at the generated source.... it appears the JSP processor never even recognized it as anything other than
a string of literal characters.  No variable substitution or anything.
          out.write("                <li>${viewName}\r\n");


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.
Standard Tomcat JSP processing. Everything else in the page is processed normally. This environment has been working for months with normal JSPs including all other forms of JSTL XPath (x:out, c:out, etc). It appears
that the only culprit is when I introduced the use of ${...} for variables.

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?
I erased the entire webapp folder and copied it from one of the working environments. So the WEB-INF/lib set of jars is identical between working and non-working. I looked for something different in the TC lib folder. I try to not put any other jars in the TC lib other than the base install other than a few I can't get around. But there could be something that got in there. We migrated to a new server box in January. So it was a clean install of TC at that time. What specific jar file has the code that would cause the JSP to identify the ${...} syntax and handle it differently?

Can you simplify your example, while keeping it reproducible?
I'll see what I can do. It appears from what I'm seeing that any JSP that accesses a DOM, then does an <x:set...> and then references ${...} is going to fail in this one environment.

Thanks so much for the help.  We'll figure this out some way.....

Best regards,
Konstantin Kolinko

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



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6081 / Virus Database: 4392/10276 - Release Date: 07/21/15


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

Reply via email to