Hi All,

I have a web application deployed with CAS server: same physical host.

Now I've this configuration in the web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;
    xmlns="http://java.sun.com/xml/ns/javaee";; 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";;
    
xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";;
    version="2.5">
    <display-name>My Web Application</display-name>
    <context-param>
        <param-name>serverName</param-name>
        <param-value>https://myhost:8443</param-value>
    </context-param>
<!--
    <filter>
        <filter-name>CAS Single Sign Out Filter</filter-name>
        
<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
    </filter>
   
 <filter-mapping>
        <filter-name>CAS Single Sign Out Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->
    <listener>
        
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
    </listener>
    <filter>
        <filter-name>CAS Authentication Filter</filter-name>
        
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
        <init-param>
           
 <param-name>casServerLoginUrl</param-name>
            <param-value>/SSO/login</param-value>
        </init-param>
        <init-param>
            <param-name>renew</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>gateway</param-name>
            <param-value>false</param-value>
        </init-param>
    </filter>
   
 <filter>
        <filter-name>CAS Validation Filter</filter-name>
        
<filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
        <init-param>
            <param-name>casServerUrlPrefix</param-name>
            <param-value>https://myhost:8443/SSO</param-value>
        </init-param>
    </filter>
    <filter>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
   
     
<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>CAS Authentication Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>CAS Validation Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


... CUT...

</web-app>

Since the web-app and the CAS server application are on the same physical 
server I'm wondering if is possible to change the "serverName" context-param 
and the "casServerUrlPrefix" w/ the hostname of the server programmatically 
with java code, for example: InetAddress addr = InetAddress.getLocalHost(); 
String hostname = addr.getHostName();

The container is tomcat 7.0.12.
CAS server 3.4.2.


Regards,
Cesare
-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to