JSP custom tag



Similar to ASP, which uses C#, JSP is the one with uses Java behind. To deploy those applications we need a servlet container, like Apache Tomcat or JBoss EAP – Undertow. JSP dynamic web content, as XML. Together.


We need a servlet container so in this case, we can use Jetty for the demonstration. Eclipse Jetty is a Java HTTP (Web) server and Java Servlet container, I will talk more about it on another post.

JSP Custom TAG

One of the most interesting features in my opinion about JSP, which is a nice feature btw, is the possibility to create custom tags HTML based on the HTML rules – ofc. Just follow the template below with the attributes you need.


<?xml version=”1.0″ encoding=”UTF-8″ ?>

<!DOCTYPE taglib
PUBLIC “-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN”

<description>JSP Tag library for CPS application </description>
<display-name> Any content</display-name>


JSP Html 4 vs Html 5

Jsp will validate the HTML version on the begin of the page. Please use plain simple JavaScript in case you need validation.


JSP Specification

We can see the specification here


[1] https://download.oracle.com/otn-pub/jcp/jsp-2.2-mrel-oth-JSpec/jsp-2_2-mrel-spec.pdf?AuthParam=1549126534_f78333269b1bd20bab4bfcb8700cd010

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 )

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