Re: problem with x:set variables

2015-07-24 Thread Jerry Malcolm
A bit more info supporting my theory that it is a TC bug.  I was running 
TC 7 pretty much out of the box.  The only changed files in the TC 7 
tree were the server and web app config files.  My doc root with the 
actual webapps is on another drive and not under the TC folder tree.  I 
installed TC 8, copied the config files and changed a few parms that TC 
8 renamed.  Pointed TC 8 to the same doc root TC 7 was using.  Stopped 
TC 7 service.  Started TC 8 service. Voila it now works.  The only 
thing different is which TC service is running.  So there is definitely 
something wrong in the TC 7.0.57 build.  The good news is that it fixed 
in TC 8.  So I can now move on.


Thanks

Jerry

On 7/24/2015 6:07 PM, Jerry Malcolm wrote:
It appears that the problem was truly a bug in that particular version 
of Tomcat.  I dug through all of the jar files and all possibly custom 
config items, and found absolutely nothing amiss. Finally, I moved up 
to Tomcat 8 on the server, and everything works fine now.



On 7/21/2015 12:07 PM, Jerry Malcolm wrote:
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 :
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:



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(" ${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

Re: problem with x:set variables

2015-07-24 Thread Jerry Malcolm
It appears that the problem was truly a bug in that particular version 
of Tomcat.  I dug through all of the jar files and all possibly custom 
config items, and found absolutely nothing amiss. Finally, I moved up to 
Tomcat 8 on the server, and everything works fine now.



On 7/21/2015 12:07 PM, Jerry Malcolm wrote:
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 :
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:



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("${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'

Re: problem with x:set variables

2015-07-21 Thread Jerry Malcolm

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 :

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:



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("${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  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


Re: problem with x:set variables

2015-07-21 Thread Konstantin Kolinko
2015-07-21 3:13 GMT+03:00 Jerry Malcolm :
> 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:
>
> 
>
> 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



Re: problem with x:set variables

2015-07-20 Thread Jerry Malcolm
BTW Everything else in XPath is working fine on the 3rd 
environment.  I can do




and it outputs the data correctly.  It appears the only thing not 
working is when I reference an x:set variable using the ${...} syntax.


Jerry


On 7/20/2015 7:13 PM, Jerry Malcolm wrote:
I have a large webapp that processes XML data into JSPs using 
XPath/JSTL plus some of my own custom tags.   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:





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



problem with x:set variables

2015-07-20 Thread Jerry Malcolm
I have a large webapp that processes XML data into JSPs using XPath/JSTL 
plus some of my own custom tags.   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:




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.

Jerry

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