Jetty Request Missing ServletContext
Marvin Addison
marvin.addison at gmail.com
Tue Mar 15 17:03:06 EDT 2016
I've noted request log events like the following for resources fetched from
the logout page:
128.173.13.100 - - [15/Mar/2016:15:33:16 -0400] "GET
/profile/$request.servletContext.contextPath/scripts/bootstrap-3.3.5.min.js
HTTP/1.1" 404 5457 "https://login.vt.edu/profile/Logout?execution=e2s1"
"Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0"
Note the unrendered Velocity expression, which obviously produces 404s in
the browser. At first I thought this was a case of somehow losing the
request template variable, but it's not so. This is only happening on
refreshing the page or otherwise getting a second execution of the flow
(e2s1). I put some debugging statements in the view to determine whether
the null is coming in, and it's puzzlingly at
HttpServletRequest#getServletContext(). Following are two successive runs:
<!-- request.toString() == Request(GET
https://login-dev.middleware.vt.edu/profile/cas/logout?execution=e2s1)@77afaa19
-->
<!-- request.servletContext.toString() ==
ServletContext at o.e.j.w.WebAppContext@4148db48{/,[file:///apps/tmp/jetty-0.0.0.0-8080-webapp-_-any-1412257876712204297.dir/webinf/,
file:///apps/local/idp/webapp/],AVAILABLE}{/apps/local/idp/webapp} -->
<!-- request.toString() == Request(null null)@77afaa19 -->
<!-- request.servletContext.toString() ==
$request.servletContext.toString() -->
Note the object is the Jetty Request object, which extends
HttpServletRequest. Before I go banging on the Jetty list, anyone have any
ideas how IdP code might be producing this situation? I certainly can't
think of anything.
M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160315/1216a2fe/attachment.html>
More information about the dev
mailing list