Re: Application-aware JSPs?
"Daniel P. Berrange" <[email protected]> Mon, 10 May 2004 20:01:07 +0100
| Newsgroups | gmane.linux.redhat.ccm.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 10, 2004 at 03:00:51PM -0400, Jeff K. Hoffman wrote: > >The only situation in which Web.getContext().getApplication() can > >return null, is if you are requesting the JSP directly with its > >concrete URL, > > > > ie, /templates/ccm-myapp/index.jsp > > > >instead of the correct > > > > /ccm/myapp/index.xml > > Can you think of any other cases in which > Web.getContext().getApplication() can return null, even when accessed > through the DispatcherServlet? All of the pieces you outline above seem > to be in place in my environment. When I make a request, I see log > output somewhat like the following (from memory, since I'm not on my R&D > box, now): > > invocation: /ccm/myapp/index.jsp (contextPath: /ccm, servletPath: > /myapp/index.jsp, servlet:ccm-dispatcher, ...) > [CCM's dispatcher locates myapp, then dispatches to it...] > invocation: /myapp/files/index.jsp (contextPath: /myapp, servletPath: > /files/index.jsp, servlet: files, ...) > realPath: /templates/myapp/myapp1/index.jsp -> > /var/ccm-devel/web/myuser/webapps/myapp/templates/myapp/myapp1/index.jsp > realPath: /templates/myapp/index.jsp -> > /var/ccm-devel/web/myuser/webapps/myapp/templates/myapp/index.jsp > jsp: init() > ... > > And then my JSP displays, with a 'null' as its output. > > I know CCM is finding my application, since changes to my app's > getContextPath() and getServletPath() methods affect runtime behavior. > > Could my mis-use of BaseJSP be screwing things up? In other words, since > BaseJSP is not required when using DispatcherServlet/BaseDispatcher, > could its use in this context be mucking with the web context machinery? Yes, it is quite (very) possible that BaseJSP resets the WebContext in some way. Try removing the 'extends=...BaseJSP' tag and re-requesting the page Dan. -- |=- Daniel P. Berrange - [email protected] -=| |=- Red Hat, 338 Euston Road, London, NW1 3BT. +44 (0)7977 267 243 -=| |=- -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| -- Redhat-ccm-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/redhat-ccm-list Archives: https://www.redhat.com/pipermail/redhat-ccm-list/
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAn9Fys9/3Qn07lQURArG5AJ0am8VUY6eclGGUBZ951kA13fPSrQCcC2pf 2v1DB8IrinGTJ/AyYTCxtQ0= =R4Y1 -----END PGP SIGNATURE-----