1 Reply Latest reply on Apr 26, 2013 5:24 AM by vstorm83

    How to set custom session timeout message in gatein

    anishantony

      Hi all

       

      In gatein i applied the 'session timeout' and it is posible to redirect into the login.jsp page when the session is over. But here i need a little bit modification is that when the session is over i need to show a custom message in login.jsp like "Session Timeout". Is it possible by using gatein?

       

      Thanks

      Anish Antony

        • 1. Re: How to set custom session timeout message in gatein
          vstorm83

          You can use GateIn extension machanism to customize login.jsp. Read more about how to make GateIn extension in the doc. We also have sample in the GateIn source code (https://github.com/gatein/gatein-portal/tree/3.6.0.Beta01/examples/extension)

           

          To override default login.jsp, you can place your customized login.jsp in the extension war, and add needed configuration xml. Remember to add this config:

          <external-component-plugins>

                              <target-component>org.exoplatform.web.filter.ExtensibleFilter</target-component>

              <component-plugin>

                <name>JSP filter Plugin</name>

                <set-method>addFilterDefinitions</set-method>

                <type>org.exoplatform.web.filter.FilterDefinitionPlugin</type>

                  <init-params>

                    <object-param>

                      <name>JSP Filter</name>

                      <object type="org.exoplatform.web.filter.FilterDefinition">

                       <field name="filter">

                         <object type="org.exoplatform.web.filter.RedefinableResourceFilter"/>

                       </field>

                       <field name="patterns">

                         <collection type="java.util.ArrayList" item-type="java.lang.String">

                            <value>

                              <string>.*/.*\.jsp</string>

                            </value>                

                         </collection>

                       </field>

                      </object>

                    </object-param>

                  </init-params>

                </component-plugin>

                    </external-component-plugins>