Quick servlet



Gonna show how to do a small servlet here.


Basically the main part is to extend HttpsServlet

public class StarterServlet extends HttpServlet {

private static final long serialVersionUID = 1L;

public void init(ServletConfig servletConfiguration) throws ServletException {


System.out.println(“SERVLET STARTED!”);

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


PrintWriter printWriter = response.getWriter();

printWriter.println(“Hello world”);

Creating the war file

jar -cvf myapp.war *


cp myapp.war /home/fdemeloj/jboss-eap-7.3/standalone/deployments

Accessing it


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s