Quick Start

To integrate the module you need to:

  • configure the servlet filter, session listener and struts actions adding the following configurations into the web.xml web application descriptor
    <filter>
      <filter-name>action</filter-name>
      <filter-class>net.smartlab.web.auth.ActionFilter</filter-class>
    </filter>
      
    <filter-mapping>
      <filter-name>action</filter-name>
      <url-pattern>*.do</url-pattern>
    </filter-mapping>
      
    <listener>
      <listener-class>net.smartlab.web.auth.SessionListener</listener-class>
    </listener>
    
    <servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>net.smartlab.web.ActionServlet</servlet-class>
               .
               .
               .
            <init-param>
        <param-name>config/auth</param-name>
        <param-value>/WEB-INF/struts-auth.xml</param-value>
      </init-param>
    </servlet>
  • add the smartweb-auth.jar library to the application classpath;
  • create an auth schema and the needed tables;
  • populate the database with default values;
  • add the security.xml configuration file to the application classpath;

Please verify the resulting file is still conformant to the web application descriptor DTD.

Here you can have a look at a simple preconfigured example.

Learn more

If you want more informations on the module design and features please refer to the overview page.

For more detailed informations on module usage and configuration please refer to the user guide page.