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