Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8168539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:33:43+00:00 2026-06-06T20:33:43+00:00

How do I change my XML file below to have CAS return to the

  • 0

How do I change my XML file below to have CAS return to the right Spring back. If user goes to https://wcmisdlin07.uftmasterad.org:8443/MemberInquiry/requests/add.html and is not login then it goes to the CAS server but returns to https://wcmisdlin07.uftmasterad.org:8443/MemberInquiry not https://wcmisdlin07.uftmasterad.org:8443/MemberInquiry/requests/add.html how can I fix this

<?xml version="1.0" encoding="UTF-8"?>
<b:beans xmlns:b="http://www.springframework.org/schema/beans"
    xmlns="http://www.springframework.org/schema/security"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <http entry-point-ref="casEntryPoint" use-expressions="true">
        <intercept-url pattern="/" access="permitAll"/>

        <intercept-url pattern="/index.jsp" access="permitAll"/>
        <intercept-url pattern="/cas-logout.jsp" access="permitAll"/>
        <intercept-url pattern="/casfailed.jsp" access="permitAll"/>

        <intercept-url pattern="/secure/**" access="hasRole('ROLE_USER')" />
        <intercept-url pattern="/requests/**" access="hasRole('ROLE_MEMBER_INQUIRY')" />

        <custom-filter ref="requestSingleLogoutFilter" before="LOGOUT_FILTER"/>
        <custom-filter ref="singleLogoutFilter" before="CAS_FILTER"/>
        <custom-filter ref="casFilter" position="CAS_FILTER" />

        <logout logout-success-url="/cas-logout.jsp"/>
    </http>

    <authentication-manager alias="authManager">
        <authentication-provider ref="casAuthProvider" />
    </authentication-manager>

    <user-service id="userService">
        <user name="rod" password="rod" authorities="ROLE_SUPERVISOR,ROLE_USER" />
        <user name="cpilling04@aol.com.dev" password="testing" authorities="ROLE_MEMBER_INQUIRY" />
    </user-service>

    <!-- This filter handles a Single Logout Request from the CAS Server -->
    <b:bean id="singleLogoutFilter" class="org.jasig.cas.client.session.SingleSignOutFilter"/>
    <!-- This filter redirects to the CAS Server to signal Single Logout should be performed -->
    <b:bean id="requestSingleLogoutFilter" class="org.springframework.security.web.authentication.logout.LogoutFilter"
        p:filterProcessesUrl="/j_spring_cas_security_logout">
        <b:constructor-arg value="https://${cas.server.host}/cas-server-webapp/logout"/>
        <b:constructor-arg>
            <b:bean class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler"/>
        </b:constructor-arg>
    </b:bean>

    <b:bean id="serviceProperties"
        class="org.springframework.security.cas.ServiceProperties"
        p:service="https://${cas.service.host}/MemberInquiry/j_spring_cas_security_check"
        p:authenticateAllArtifacts="true"/>

    <b:bean id="casEntryPoint"
        class="org.springframework.security.cas.web.CasAuthenticationEntryPoint"
        p:serviceProperties-ref="serviceProperties" p:loginUrl="https://${cas.server.host}/cas-server-webapp/login" />

    <b:bean id="casFilter"
        class="org.springframework.security.cas.web.CasAuthenticationFilter"
        p:authenticationManager-ref="authManager"
        p:serviceProperties-ref="serviceProperties"
        p:proxyGrantingTicketStorage-ref="pgtStorage"
        p:proxyReceptorUrl="/j_spring_cas_security_proxyreceptor">
        <b:property name="authenticationDetailsSource">
            <b:bean class="org.springframework.security.cas.web.authentication.ServiceAuthenticationDetailsSource"/>
        </b:property>

        <b:property name="authenticationFailureHandler">
            <b:bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"
                p:defaultFailureUrl="/casfailed.jsp"/>
        </b:property>
    </b:bean>
    <!--
        NOTE: In a real application you should not use an in memory implementation. You will also want
              to ensure to clean up expired tickets by calling ProxyGrantingTicketStorage.cleanup()
     -->
    <b:bean id="pgtStorage" class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl"/>
    <b:bean id="casAuthProvider" class="org.springframework.security.cas.authentication.CasAuthenticationProvider"
        p:serviceProperties-ref="serviceProperties"
        p:key="casAuthProviderKey">
        <b:property name="authenticationUserDetailsService">
            <b:bean
                class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper">
                <b:constructor-arg ref="userService" />
            </b:bean>
        </b:property>
        <b:property name="ticketValidator">
            <b:bean
                class="org.jasig.cas.client.validation.Cas20ProxyTicketValidator"
                p:acceptAnyProxy="true"
                p:proxyCallbackUrl="https://${cas.service.host}/MemberInquiry/j_spring_cas_security_proxyreceptor"
                p:proxyGrantingTicketStorage-ref="pgtStorage">
                <b:constructor-arg value="https://${cas.server.host}/cas-server-webapp" />
            </b:bean>
        </b:property>
        <b:property name="statelessTicketCache">
            <b:bean class="org.springframework.security.cas.authentication.EhCacheBasedTicketCache">
                <b:property name="cache">
                    <b:bean class="net.sf.ehcache.Cache"
                      init-method="initialise"
                      destroy-method="dispose">
                        <b:constructor-arg value="casTickets"/>
                        <b:constructor-arg value="50"/>
                        <b:constructor-arg value="true"/>
                        <b:constructor-arg value="false"/>
                        <b:constructor-arg value="3600"/>
                        <b:constructor-arg value="900"/>
                    </b:bean>
                </b:property>
            </b:bean>
        </b:property>
    </b:bean>

    <!-- Configuration for the environment can be overriden by system properties -->
    <context:property-placeholder system-properties-mode="OVERRIDE" properties-ref="environment"/>

    <util:properties id="environment">
        <b:prop key="cas.service.host">wcmisdlin07.uftmasterad.org:8443</b:prop>
        <b:prop key="cas.server.host">wcmisdlin07.uftmasterad.org:8443</b:prop>
    </util:properties>


</b:beans>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:33:44+00:00Added an answer on June 6, 2026 at 8:33 pm

    Just add a SavedRequestAwareAuthenticationSuccessHandler to your casFilter which saves the request in the Request cache before authentication occurs and then redirects to the original destination. If no DefaultSavedRequest is found it redirects to the defaultTargetUrl which is the root of the application.

     <b:bean id="casFilter"
        class="org.springframework.security.cas.web.CasAuthenticationFilter"
        p:authenticationManager-ref="authManager"
        p:serviceProperties-ref="serviceProperties"
        p:proxyGrantingTicketStorage-ref="pgtStorage"
        p:proxyReceptorUrl="/j_spring_cas_security_proxyreceptor">
        <b:property name="authenticationDetailsSource">
            <b:bean class="org.springframework.security.cas.web.authentication.ServiceAuthenticationDetailsSource"/>
        </b:property>
    
        <b:property name="authenticationFailureHandler">
            <b:bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"
                p:defaultFailureUrl="/casfailed.jsp"/>
        </b:property>
    
        <b:property name="authenticationSuccessHandler">
           <b:bean class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler"
                p:defaultTargetUrl="/"/>
       </b:property>
    
    </b:bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a need to change the spring applicationContext.xml file that is used based
I recently changed my password and have to change my maven settings.xml file to
I have a XML file like the below: <clients> <client> <id>YYYY</id> <name>XXXX</name> <desc>ZZZZ</desc> <trade_info>
i have created xml file with the code shown below, XElement xml = new
I have an xml file which looks like the below example <Ids> <Id> <set>ai</set>
If I have a XML file, whose value I want to change, as shown
I have 1 ListView and 2 buttons in layout.xml file as shown below: <ListView
I am trying to change an XML file from one format to another and
How may I modify a XML file without any change like attributes ordering, tag
I have an XML file containing seed data that I'm trying to load into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.