Thanks, Scot. I hope you see that the cross-context anomaly reported below can be easily reproduced by anyone that has access to CAS, JSTL and an extremely simple (dummy) "header.jsp" file. Also, that cross-context works outside CAS. Clearly, there is *something* within the CAS context that is prevent JSTL <c:import/> from working. Thanks, though, for letting me know that there is nothing intentional within CAS that is disabling <c:import>. I will sniff around a bit to see if I find anything and let the group know...but mostly likely I will end up in favor of A) writing my own screen-scraper that is immune to the way JSTL is treated B) leaving the simple UI as-is C) hard-coding the look-and-feel (only if we have to go to production and A and B are no-go).
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Battaglia Sent: Thursday, June 21, 2007 1:47 AM To: Yale CAS mailing list Subject: Re: Cross-Context Import Error within CAS Web Application Simple UI >From the stack trace it doesn't look like an issue with CAS (I don't see any CAS or Spring related entry in the stack trace). I've never tried cross-context with it though. We shouldn't be doing anything special that would eliminate your ability to do that. -Scott On 6/20/07, Uday Kari <[EMAIL PROTECTED]> wrote: Say, you would like to customize the login page. You are unable to import header, footer etc from another context into the cas context. If you try this in a context other than cas it works just fine. Q: Is there something special with respect to the cas web application that makes it impossible to import stuff from other context? Would it be some sort of security violation? Brief ----- Starting with the "simple" UI within the CAS war, import your header and footer (as per your company or application suite standards) from a centrally maintained tomcat context, say, "common". Get the following error: CAS is Unavailable: A general exception occurred while trying to access CAS. Please notify your system administrator. Details ------- To do this you would 1. create META-INF/context.xml within cas context with the following contents: <?xml version=" 1.0" encoding="utf-8" ?> <Context crossContext="true" /> 2. To import the header, add the following element into casLoginView.jsp in right after the <body> tag within WEB-INF/view/jsp/simple/ui directory: <%-- HEADER --%> <c:import context="/common" url="/html/header.jsp" /> 3. Replace "default" with "simple" in default_views.properties 4. Bounce tomcat 5. access server:port/cas 6. Login page does not render, instead get the above mentioned error... 7. Examine logs(stdout_*.log): 2007-06-20 15:32:17,283 ERROR [org.apache.catalina.core.ContainerBase .[Catalina].[localhost].[/cas].[j sp]] - <Servlet.service() for servlet jsp threw exception> javax.servlet.jsp.JspTagException: Unable to get RequestDispatcher for Context: "/common" and URL: "/html/header.jsp". Verify values and/or enable cross context access. at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString( ImportSupport.java:278) at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag (Impor tSupport.java:161) at org.apache.jsp.index_jsp._jspx_meth_c_005fimport_005f0(index_jsp.java:96 ) at org.apache.jsp.index_jsp._jspService(index_jsp.java:60) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:328) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:315) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:108) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:1 51) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87 0) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc essConnection( Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow erWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:685) at java.lang.Thread.run(Thread.java:595) _______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas -- -Scott Battaglia LinkedIn: http://www.linkedin.com/in/scottbattaglia
_______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
