https://issues.apache.org/bugzilla/show_bug.cgi?id=56882

Konstantin Kolinko <knst.koli...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression

--- Comment #2 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to Konstantin Kolinko from comment #1)
> Ack. Reproducible with 8.0.11 using the examples webapp.
> 
> Steps:
> 1. Configure a user with manager-gui role in conf/tomcat-users.xml

An alternative way to reproduce:
Skip step 1. and replace step 4. with:
- Touch webapps\examples\WEB-INF\web.xml 
- Wait several seconds, until a success message is logged on the console
Reloading Context with name [/examples] is completed

> 2. Start Tomcat
> 3. Access "Include" and "Forward" JSP examples,
> in two different tabs in Firefox
> http://localhost:8080/examples/jsp/include/include.jsp
> http://localhost:8080/examples/jsp/forward/forward.jsp
> 
> 4. Go to Tomcat Manager web application and click "Reload" button on the
> examples 
> webapp.
> 
> 5. Reload (F5 in Firefox) the above example pages.
> Expected: The same output as on step 3 though with diifferent time stamps.
> Actual:
> 
> include.jsp gives:
> [[[
> In place evaluation of another JSP which gives you the current time:
> 1408802860131
> by including the output of another JSP: :-) 
> ]]]
> The second sentence had to contain a timestamp value. It is missing.

The second sentence is missing more than just the timestamp.
The first part of it is missing as well. It had to be
[[[
To get the current time in ms by including the output of another JSP:
1408803609298 :-) 
]]]


The source code of include.jsp page is essentially the following:
[[[
<%@ page buffer="5kb" autoFlush="false" %>
<p>In place evaluation of another JSP which gives you the current time:
<%@ include file="foo.jsp" %>
<p> <jsp:include page="foo.html" flush="true"/> by including the output of
another JSP:
<jsp:include page="foo.jsp" flush="true"/>
:-)
]]]

Thus both <jsp:include page="foo.html"> and <jsp:include page="foo.jsp"> are
failing.


I wonder why it silently skips the failed pages. I expected it to produce an
exception after the first failed include and abort the response.

The generated Java code for include.jsp does
[[[
      out.write("<p> ");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response,
"foo.html", out, true);
      out.write(" by including the output of another JSP:\r\n");
]]]
and the JspRuntimeLibrary.include() method just calls
RequestDispatcher.include(). Neither of them does any try/catch wrapping.

Why isn't javax.servlet.UnavailableException being thrown by RequestDispatcher?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to