avbravosecurity
  • Introduction
  • Guia de uso
    • Proyecto Seguridad
    • Control de Sesiones y Seguridad
    • Pagina Index.xhtml Session
    • Pagina welcome.xhtml
    • Pagina ViewExpiredException.xhtml
    • Pagina admin.xthml Session
    • LoginController
    • SessionController
  • Api
    • Métodos
  • Configuracion
    • Configuracion
Powered by GitBook
On this page
  • Clonarlo
  • Desarrollarlo desde Cero
  • Dependencias
  • Configurar Web.xml

Was this helpful?

  1. Guia de uso

Proyecto Seguridad

PreviousGuia de usoNextControl de Sesiones y Seguridad

Last updated 6 years ago

Was this helpful?

Clonarlo

Se puede clonar desde

Desarrollarlo desde Cero

Creamos el proyecto de seguridad

Dependencias

Arhivo pom.xml

Agregar repositorio

       <repositories>
         <repository>            
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
        </repositories>

Agregar dependencias

<dependency>
        <groupId>com.github.avbravo</groupId>
        <artifactId>avbravosecurity</artifactId>
        <version>0.1</version>
    </dependency>


<dependency>
        <groupId>com.github.avbravo</groupId>
        <artifactId>avbravoutils</artifactId>
        <version>0.11</version>
    </dependency>

Configurar Web.xml

Configurar el archivo web.xml

Agregar en Web.xml

<error-page>
        <exception-type>javax.faces.application.ViewExpiredException</exception-type>
        <location>/viewExpiredException.xhtml</location>
    </error-page>

Crear el archivo faces-config.xml

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
              xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
    <application>
        <factory>
            <exception-handler-factory>com.avbravo.avbravoutils.exceptions.MyExceptionHandlerFactory</exception-handler-factory>
        </factory>
    </application>
</faces-config>
https://github.com/avbravo/seguridad.git