CAS 3.0 with Weblogic 8.1 (Servlet 2.3 container)
Scott Battaglia
scott.battaglia at gmail.com
Tue Aug 29 20:59:00 EDT 2006
Mark,
I don't believe there is an equivalent to the fn tag library in JSP 1.2.
Essentially, however, what that snippit is doing is checking that the length
of the array is greater than one. So you could use a scriptlet and do
something like
<%
if (assertion.chainedPrincipals.length > 1) {%>
.... code....
<%}%>
making sure to have all the proper imports.
-Scott
On 8/29/06, Mark Stralka <mstralka at gmail.com> wrote:
>
> Scott,
>
> I've run into more problems with Weblogic and JSP 2.0 tags. My app is
> configured to send users to CAS for authentication. When I login and start
> to get redirected back to my app (called sso), I get this error, which is
> obviously because the fn: tag is not available in JSTL 1.0:
>
> edu.yale.its.tp.cas.client.CASAuthenticationException: Unable to validate
> ProxyTicketValidator [[edu.yale.its.tp.cas.client.ProxyTicketValidatorproxyList=[null] [
> edu.yale.its.tp.cas.client.ServiceTicketValidator casValidateUrl=[
> https://beaadmindev.janus.na.jnj.com:7301/cas/serviceValidate]
> ticket=[ST-2-xthzyR73lLxcEQovtNBjbs6xQsi2kaOiClf-20]
> service=[http%3A%2F%2Fbeaadmindev.janus.na.jnj.com%3A7100%2Fsso%2Fcas-protected%2Findex.jsp]
> renew=false entireResponse=[<html>
> <head>
> <title>JSP parse error</title>
> </head>
> <body>
>
> <b>Parsing of JSP File
> '/WEB-INF/view/jsp/omjps/protocol/2.0/casServiceValidationSuccess.jsp' <font
> color=#FF0000>failed</font>:</b><HR>
> <font face="Courier New, Courier, mono" size="2">
> /WEB-INF/view/jsp/omjps/protocol/2.0/casServiceValidationSuccess.jsp(3):
> Could not parse deployment descriptor: java.io.IOException: cannot resolve
> ' http://java.sun.com/jsp/jstl/functions' into a valid tag library<br>
> probably occurred due to an error in
> /WEB-INF/view/jsp/omjps/protocol/2.0/casServiceValidationSuccess.jsp line
> 3:<br>
> <font color="#FF0000">
> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"
> prefix="fn" %>
> </font>
> <hr><i>Tue Aug 29 18:14:19 EDT 2006</i>
> </body>
> </html>
>
> Any thoughts on how I can make fn: work with JSTL 1.0, or modify
> casServiceValidationSuccess.jsp to not require it?
>
> Thanks again
> Mark
>
> On 8/29/06, Mark Stralka <mstralka at gmail.com> wrote:
> >
> > Thank you Scott,
> >
> > I had also updated web.xml, but I had to make the <c:out/> changes you
> > recommended, and I ended up commenting-out the language selections on the
> > login page because I couldn't get <c:out> working correctly with them, and
> > we only need English for now. I really wish I didn't have to use Weblogic
> > but that's life :)
> >
> > Thanks again,
> > Mark
> >
> >
> > On 8/29/06, Scott Battaglia < scott.battaglia at gmail.com> wrote:
> > >
> > > A quick google search seems to indicate that that exception appears
> > > when the document is not saved in the proper encoding. I'm no sure if
> > > that's the problem in your case.
> > >
> > > Also, did you update your web.xml to use the proper Servlet 2.3 spec?
> > >
> > > These are the steps we usually recommend people take:
> > > http://developer.ja-sig.org/projects/cas/views/jsp12.html
> > >
> > > -Scott
> > >
> > > On 8/29/06, Mark Stralka < mstralka at gmail.com> wrote:
> > >
> > > > Hello,
> > >
> > > I have successfully configured CAS to authenticate against our LDAP
> > > server and it works properly with Tomcat 5.0. I am trying to deploy
> > > CAS 3.0 to Weblogic 8.1 SP5, which is a Servlet 2.3 container. When I
> > > deploy it out-of-the-box, I get errors about
> > > java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
> > >
> > > I replace jstl-1.1.2.jar and standard-1.1.2.jar in the cas.war file
> > > and redeploy, but now I get different errors when I try to get to the login
> > > page:
> > > /WEB-INF/view/jsp/default/ui/casLoginView.jsp(2): Could not parse
> > > deployment descriptor: java.io.IOException: cannot resolve 'http://java.sun.com/jsp/jstl/core'
> > > into a valid tag library
> > > probably occurred due to an error in
> > > /WEB-INF/view/jsp/default/ui/casLoginView.jsp line 2:
> > > <form method="post" action="<%=response.encodeRedirectURL("login" + (
> > > request.getQueryString () != null && request.getQueryString().length()
> > > > 0 ? "?" + request.getQueryString() : ""))%>">
> > >
> > > I think this is because the JSP is trying to load JSTL 1.2, which is
> > > not compatible with servlet 2.3 and weblogic, so I copied
> > > view/jsp/default to my own directory, view/jsp/omjps and changed the
> > > cas_servlets.xml to load views from this directory. I edited
> > > view/jsp/omjps/ui/includes/top.jsp to use the JSTL 1.0 instead of 1.2:
> > > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> > >
> > > But I now get this error (albeit in a friendly page):
> > > A general exception occurred while trying to access CAS. Please notify
> > > your system administrator.
> > > The Weblogic log file indicates the following error:
> > > java.io.IOException: javax.servlet.jsp.JspException: The taglib
> > > validator rejected the page: "java.io.UTFDataFormatException: Invalid
> > > byte 2 of 4-byte UTF-8 sequence., "
> > > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:130)
> > > at weblogic.utils.compiler.CodeGenerator.generate(
> > > CodeGenerator.java:258)
> > > at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:396)
> > > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:246)
> > > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:196)
> > > at weblogic.servlet.internal.ServletStubImpl.getServlet(
> > > ServletStubImpl.java :598)
> > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
> > > ServletStubImpl.java:406)
> > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
> > > ServletStubImpl.java:348)
> > > at weblogic.servlet.internal.RequestDispatcherImpl.forward (
> > > RequestDispatcherImpl.java:322)
> > > at
> > > org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel
> > > (InternalResourceView.java:112)
> > > at org.springframework.web.servlet.view.AbstractView.render (
> > > AbstractView.java:248)
> > > at org.springframework.web.servlet.DispatcherServlet.render(
> > > DispatcherServlet.java:1055)
> > > at org.springframework.web.servlet.DispatcherServlet.doDispatch(
> > > DispatcherServlet.java:819)
> > > at org.springframework.web.servlet.DispatcherServlet.doService(
> > > DispatcherServlet.java:728)
> > > at org.springframework.web.servlet.FrameworkServlet.processRequest
> > > (FrameworkServlet.java:396)
> > > at org.springframework.web.servlet.FrameworkServlet.doGet (
> > > FrameworkServlet.java:350)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at org.jasig.cas.web.init.SafeDispatcherServlet.service (
> > > SafeDispatcherServlet.java:115)
> > > at
> > > weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(
> > > ServletStubImpl.java:1072)
> > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
> > > ServletStubImpl.java :465)
> > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
> > > ServletStubImpl.java:348)
> > > at
> > > weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
> > > (WebAppServletContext.java:6981)
> > > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(
> > > AuthenticatedSubject.java:321)
> > > at weblogic.security.service.SecurityManager.runAs(
> > > SecurityManager.java:121)
> > > at weblogic.servlet.internal.WebAppServletContext.invokeServlet (
> > > WebAppServletContext.java:3892)
> > > at weblogic.servlet.internal.ServletRequestImpl.execute(
> > > ServletRequestImpl.java:2766)
> > > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
> > > at weblogic.kernel.ExecuteThread.run (ExecuteThread.java:183)
> > >
> > >
> > > I would be grateful for any assistance with deploying CAS to Weblogic
> > > correctly.
> > >
> > > Thank you
> > > Mark
> > >
> > >
> > > _______________________________________________
> > > Yale CAS mailing list
> > > cas at tp.its.yale.edu
> > > http://tp.its.yale.edu/mailman/listinfo/cas
> > >
> > >
> > >
> > >
> > >
> > > --
> > > -Scott Battaglia
> > > Lead Developer, JA-SIG Central Authentication Service
> > > http://www.ja-sig.org/products/cas/
> > > v: 732.445.0097 | f: 732.445.5493 | scott.battaglia at gmail.com
> > >
> >
> >
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20060829/01fada60/attachment.html
More information about the cas
mailing list