This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package siapen.utilitarios; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.SecureRandom; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.KeySpec; | |
import java.util.Arrays; | |
import java.util.Base64; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package siapen.utilitarios; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.KeySpec; | |
import java.util.Base64; | |
import java.util.Random; | |
import javax.crypto.SecretKeyFactory; | |
import javax.crypto.spec.PBEKeySpec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The code below should do the same as this | |
Faces.sendFile(JasperExportManager.exportReportToPdf(jasperPrint), nomeDownload + ".pdf", false); | |
/*ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
JasperExportManager.exportReportToPdfStream(jasperPrint, baos); | |
ExternalContext ec = fc.getExternalContext(); | |
ec.responseReset(); // Some JSF component library or some Filter might have set some headers in the buffer beforehand. We want to get rid of them, else it may collide. | |
ec.setResponseContentType("application/pdf"); // Check http://www.iana.org/assignments/media-types for all types. Use if necessary ExternalContext#getMimeType() for auto-detection based on filename. | |
ec.setResponseContentLength(baos.size()); // Set it with the file size. This header is optional. It will work if it's omitted, but the download progress will be unknown. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:ui="http://java.sun.com/jsf/facelets" | |
xmlns:p="http://primefaces.org/ui" | |
xmlns:pe="http://primefaces.org/ui/extensions"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package siapen.utilitarios; | |
import java.text.ParseException; | |
import java.time.LocalDate; | |
import java.time.ZoneId; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
public class Feriados { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ui:composition xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:ui="http://java.sun.com/jsf/facelets" | |
xmlns:p="http://primefaces.org/ui" | |
xmlns:c="http://java.sun.com/jsp/jstl/core" | |
template="/WEB-INF/template.xhtml"> | |
<ui:define name="title">Transferência de Internos</ui:define> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2017-06-09 19:10:14,303 SEVERE [org.firebirdsql.gds.impl.GDSFactory] (ServerService Thread Pool -- 63) Can't register plugin (skipping): org.firebirdsql.gds.impl.GDSFactoryPlugin: Provider org.firebirdsql.gds.impl.wire.WireGDSFactoryPlugin not a subtype: java.util.ServiceConfigurationError: org.firebirdsql.gds.impl.GDSFactoryPlugin: Provider org.firebirdsql.gds.impl.wire.WireGDSFactoryPlugin not a subtype | |
at java.util.ServiceLoader.fail(ServiceLoader.java:239) | |
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) | |
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376) | |
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) | |
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) | |
at org.firebirdsql.gds.impl.GDSFactory.loadPluginsFromClassLoader(GDSFactory.java:123) | |
at org.firebirdsql.gds.impl.GDSFactory.<clinit>(GDSFactory.java:75) | |
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:110) | |
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.cre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package siapen.generators; | |
import java.io.Serializable; | |
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import javax.inject.Inject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package siapen.jpa.interceptor; | |
import java.io.Serializable; | |
import java.util.Iterator; | |
import org.apache.commons.lang3.ObjectUtils; | |
import org.hibernate.CallbackException; | |
import org.hibernate.EmptyInterceptor; | |
import org.hibernate.type.Type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<filter> | |
<filter-name>loginFilter</filter-name> | |
<filter-class>filtro.AuthFilter</filter-class> | |
</filter> | |
<filter-mapping> | |
<filter-name>loginFilter</filter-name> | |
<url-pattern>/*</url-pattern> | |
</filter-mapping> |
NewerOlder