Bug 31701 - standard-examples 'ShowSource.jsp' doesn't show Sources
Summary: standard-examples 'ShowSource.jsp' doesn't show Sources
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Unknown Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P3 minor (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-10-13 11:15 UTC by Joachim Kessel
Modified: 2005-03-20 17:06 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Kessel 2004-10-13 11:15:23 UTC
I've got a little Problem with the 'ShowSource.jsp' which
is called using the 'screwdriver' icon from the 'standard-examples'.

The page doesn't show any source code, what I get (on every page) is the
following output (e.g.):
--- snip ---
Source code for:  /elsupport/Out.jsp

--- snap ---

The expression '${reader}' doesn't seem to get evaluated.

Does somebody have an idea why this could happen ?

Here's my setup:

Windows 2000
Jakarta Tomcat 4.1.30
Jakarta Taglibs 1.0.6
Jakarta Struts 1.2.4

I've posted this problem to the 'taglibs-user' Mailing List and 'Kris Schneider'
wrote the following:
--- snip ---
This definitely looks like a bug in 1.0.6. The problem is with the handler for
the <ex:escapeHtml> tag:
org.apache.taglibs.standard.examples.taglib.EscapeHtmlTag. In 1.0.5, it appears
to properly evaluate EL expressions. However, for 1.0.6, it looks like a 1.1
version leaked in so that EL expressions are no longer evaluated by the
--- snap ---

Today I used the 'EscapeHtmlTag.java' from version 1.0.5 and after rebuilding
the 'standard-examples.war' file the 'ShowSources.jsp' file correctly prints the
Source code of any example.
Comment 1 Justyna Horwat 2004-10-18 18:46:47 UTC
In my commit message I forgot to thank Kris Schneider for pointing out the source of the problem. I'm 
sorry and I wanted to make sure Kris got the recognition for the fix.

Yes, it looks like a 1.1 version of the EscapeHtmlTag got leaked in. I checked the cvs histories and I 
believe this happened when the examples were re-packaged. Since I use a JSP 2.0 container, I didn't 
notice any problems. Thanks for catching the bug!

I went ahead and enabled EL expression evaluation in the EscapeHtmlTag tag handler so that it works in 
a pre-JSP 2.0 container. Fix submitted to the STANDARD_1_0_BRANCH tag.