Hashtag Jakarta EE #28

Welcome to the twenty-eighth issue of Hashtag Jakarta EE!

The CFP for JakartaOne Livestream 2020 is open! It will close on July 31, so submit sooner rather than later. We will be reviewing abstracts continuously.

I am happy to announce that my talk Jakarta EE 9 and Beyond is scheduled for EclipseCon 2020. All speakers are given the option to record their talks in advance for this year’s all virtual conference. Given that the planned release date for Jakarta EE 9 is September 16 and pre-recorded talks must be submitted by September 7, this talk will be a live session.

On Wednesday, July 15, there is a new Jakarta EE Update call. Check the Jakarta EE Community Calendar for details.

Tip: Click on in the lower right corner to add this calendar to your Google Calendar. That way, you won’t miss out on anything.

Trying out Jakarta EE 9

It is only a couple of weeks since the Jakarta EE 9 milestone was released, and the implementations supporting it are releasing builds frequently adding more support.

I have added a simple servlet here that you can now run on Tomcat, GlassFish, and Jetty. More implementations to come…

package com.demo.simple;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(name = "hello", urlPatterns = {"/hello"})
public class SimpleHello  extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
     
        resp.setContentType("text/html;charset=UTF-8");
        resp.getWriter().println( "Hello Jakarta EE 9!");
    }
}

The pom.xml file has the

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.demo</groupId>
    <artifactId>simple-hello</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>simple-hello-1.0-SNAPSHOT</name>
    
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </properties>

    <build>
        <finalName>simple-hello</finalName>
    </build>
  
    <dependencies>
        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>9.0.0-RC2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    
</project>

If you haven’t made your Jakarta EE 9 Milestone cupcake yet, take a look at this awesome video by Markus Karg in his blog post, Jakarta EE 9 M1 Sneak Peak to be inspired.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.