[cas-user] how do I install cas 3.5.2 in tomcat 7? I don't find documentation.

131 views
Skip to first unread message

Carlos

unread,
May 23, 2014, 9:07:21 AM5/23/14
to cas-...@lists.jasig.org
Hi,

I had cas 3.5.2 in jboss 4 and now I'm moving to tomcat 7.

First of all I had to add the following to my catalina.bat because there was a problem:

set JAVA_OPTS = "-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false"

After that it started aprently correctly but the behaviour compared to JBOSS previous version is different. In the jboss version I could retrieve the authentication from SecurityContextHolder.getContext() in my FlowExecutionListener and it was AnonymousAuthenticationToken but in tomcat 7 I get null.

Pherhaps something related to threads managemnte different between both containers?

On top of that, I have seen that there are some cas client jars specific for tomcat and for the version 7 like:
- cas-client-integration-tomcat-common-3.2.1.jar
- cas-client-integration-tomcat-v7-3.2.1.jar

and I don't know how I have to use them and when it is necessary.

Is there any procedure to properly install cas webapp in tomcat 7.

Thanks.

--
You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

Misagh Moayyed

unread,
May 23, 2014, 9:14:23 AM5/23/14
to cas-...@lists.jasig.org
No secret sauce really. If you are following the maven overlay process, all
you'd have to do is to grab the produced war and deploy it over to tomcat's
webapps.
mmoa...@unicon.net To unsubscribe, change settings or access archives, see

Scott Battaglia

unread,
May 23, 2014, 10:27:32 AM5/23/14
to cas-...@lists.jasig.org
Are you looking to deployer the server or integrate the client? You mention both in the email.


On Fri, May 23, 2014 at 8:51 AM, Carlos <co...@uoc.edu> wrote:
Hi,

I had cas 3.5.2 in jboss 4 and now I'm moving to tomcat 7.

First of all I had to add the following to my catalina.bat because there was a problem:

set JAVA_OPTS = "-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false"

After that it started aprently correctly but the behaviour compared to JBOSS previous version is different. In the jboss version I could retrieve the authentication from SecurityContextHolder.getContext() in my FlowExecutionListener and it was AnonymousAuthenticationToken but in tomcat 7 I get null.

Pherhaps something related to threads managemnte different between both containers?

On top of that, I have seen that there are some cas client jars specific for tomcat and for the version 7 like:
- cas-client-integration-tomcat-common-3.2.1.jar
- cas-client-integration-tomcat-v7-3.2.1.jar

and I don't know how I have to use them and when it is necessary.

Is there any procedure to properly install cas webapp in tomcat 7.

Thanks.

--
You are currently subscribed to cas-...@lists.jasig.org as: scott.b...@gmail.com

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

Carlos

unread,
May 26, 2014, 4:30:57 AM5/26/14
to cas-...@lists.jasig.org
Actually, I only want to install the server but I have seen that in the cas-server-webapp pom.xml there is a dependency to the client and pherhaps it needs to be adapted to the tomcat 7 jars.

<dependency>
<groupId>org.jasig.cas.client</groupId>
<artifactId>cas-client-core</artifactId>
<version>3.2.1</version>
</dependency>

I suppose as well that it is necessary because the /services url makes the server acting as a client.

However, when I have to casify the applications that are going to use the SSO I will have to configure those applications as a client and some of them (not too many) are running in Tomcat and in the documentation there is no mention about the case of tomcat 7.

Regarding the authenticationToken. It is possible that the thread architecture of tomcat requires any tweak to make the authentication token available in any part of the flow? I'm getting null in my authenticationHandler and it is supposed that the AnonymousAuthenticationFilter has already executed in that stage.
In fact, in jboss 4 it is working as expected.

Another difference regarding Jboss is that if I try to do a
redirection to a page in a FlowExecutionListener with:

HttpUtils.forward("/WEB-INF/view/jsp/default/ui/casAccountTemporalyDisabledView.jsp");

where

public static void forward (String relativeUrl)
{

HttpServletRequest request=getCASHttpRequest();
HttpServletResponse response=getCASHttpResponse();

RequestDispatcher rd = request.getRequestDispatcher(relativeUrl);
try {
if (response.isCommitted())
rd.include(request, response);
else
rd.forward(request, response);
} catch (ServletException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
//redirect to warning page
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

I get the following error message in tomcat but not in jboss. So I wonder if I'm missing something:

2014-05-26 10:26:02,224 DEBUG [org.jasig.cas.web.FlowExecutionExceptionResolver] - <Ignoring the received exception due to a type mismatch>
java.lang.IllegalStateException: No puedo llamar a sendRedirect() tras llevar a cabo la respuesta
at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:482)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.sendRedirect(FlowHandlerAdapte
r.java:324)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.sendExternalRedirect(FlowHandl
erAdapter.java:408)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handleFlowExecutionResult(Flow

Any help would be appreciated.

Thank you in advance!
Reply all
Reply to author
Forward
0 new messages