This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>me.fernando.jakarta.demo</groupId> | |
<artifactId>jakarta-wildfly-demo</artifactId> | |
<version>1.0-SNAPSHOT</version> |
This file contains hidden or 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
import jakarta.ws.rs.ApplicationPath; | |
import jakarta.ws.rs.core.Application; | |
@ApplicationPath("/") | |
public class JAXRSConfiguration extends Application { | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" | |
version="5.0"> | |
<display-name>jakarta-wildfly-demo</display-name> | |
<default-context-path>/</default-context-path> | |
</web-app> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" | |
version="5.0"> | |
<display-name>jakarta-wildfly-demo</display-name> | |
<default-context-path>/</default-context-path> | |
</web-app> |
This file contains hidden or 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 me.fernando.jakarta.demo; | |
import jakarta.enterprise.context.RequestScoped; | |
import jakarta.inject.Inject; | |
import jakarta.mvc.Controller; | |
import jakarta.mvc.Models; | |
import jakarta.ws.rs.GET; | |
import jakarta.ws.rs.Path; | |
import jakarta.ws.rs.QueryParam; | |
import jakarta.ws.rs.core.Response; |
This file contains hidden or 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
<%@ page import="java.time.format.DateTimeFormatter" %> | |
<%@ page import="java.time.format.FormatStyle" %> | |
<jsp:useBean id="currentDate" type="java.time.LocalDate" scope="request" /> | |
<jsp:useBean id="user" type="java.lang.String" scope="request" /> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<!DOCTYPE html> | |
<html> |
This file contains hidden or 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
// Exemplo alternativo da implementação | |
import org.eclipse.krazo.engine.Viewable; | |
@GET | |
public Viewable welcome(@QueryParam("user") String user) { | |
var currentDate = LocalDate.now(); | |
this.models.put("currentDate", currentDate); | |
this.models.put("user", user != null && !user.isBlank() ? user : "Guest"); | |
return new Viewable("welcome.jsp"); |
This file contains hidden or 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
<%@ page import="java.time.format.DateTimeFormatter" %> | |
<%@ page import="java.time.format.FormatStyle" %> | |
<jsp:useBean id="currentDate" type="java.time.LocalDate" scope="request" /> | |
<jsp:useBean id="user" type="java.lang.String" scope="request" /> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<!DOCTYPE html> | |
<html> |
This file contains hidden or 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
SHOW TIMEZONE; | |
SELECT name FROM pg_timezone_names WHERE name LIKE '%America%'; | |
SET TIMEZONE = 'America/Sao_Paulo'; | |
CREATE TYPE offer_type AS ENUM ('BUY', 'SELL'); | |
CREATE TABLE bitcoin_trade ( | |
id SERIAL UNIQUE NOT NULL, | |
description TEXT, | |
value DECIMAL(16, 2), | |
satoshis BIGINT, | |
last_price DECIMAL(16, 2), |
This file contains hidden or 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
# => Run configuration script via ./jboss-cli.sh | |
# Start the server in admin-only mode | |
embed-server --std-out=echo | |
# Show runtime info | |
version | |
batch | |
# JSP Tuning |
OlderNewer