Cross-Context Import Error within CAS Web Application Simple UI
Scott Battaglia
scott.battaglia at gmail.com
Thu Jun 21 07:47:19 EDT 2007
>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 <ukari at pdc.org> 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
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
--
-Scott Battaglia
LinkedIn: http://www.linkedin.com/in/scottbattaglia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20070621/45ff1f98/attachment.html
More information about the cas
mailing list