JSP 2.0 Examples - Hello World Using a Tag File


This JSP page invokes a custom tag that simply echos "Hello, World!" The custom tag is generated from a tag file in the /WEB-INF/tags directory.

Notice that we did not need to write a TLD for this tag. We just created /WEB-INF/tags/helloWorld.tag, imported it using the taglib directive, and used it!


Result: Hello, world!