{"id":1592,"date":"2016-10-04T15:54:09","date_gmt":"2016-10-04T13:54:09","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=1592"},"modified":"2016-10-04T15:54:09","modified_gmt":"2016-10-04T13:54:09","slug":"java-spring-jstl-tag","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=1592","title":{"rendered":"Java Spring &#8211; Jstl tag"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#Prerequistes\"><span class=\"toc_number toc_depth_1\">1<\/span> Prerequistes<\/a><\/li><li><a href=\"#Configuration\"><span class=\"toc_number toc_depth_1\">2<\/span> Configuration<\/a><ul><li><a href=\"#tag\"><span class=\"toc_number toc_depth_2\">2.1<\/span> tag<\/a><\/li><li><a href=\"#How_to_use_it\"><span class=\"toc_number toc_depth_2\">2.2<\/span> How to use it<\/a><\/li><\/ul><\/li><\/ul><\/div>\n<h1><span id=\"Prerequistes\">Prerequistes<\/span><\/h1>\n<p>Please read : <a href=\"?page_id=1549\">Java spring &#8211; quickstart<\/a><\/p>\n<h1><span id=\"Configuration\">Configuration<\/span><\/h1>\n<h2><span id=\"tag\">tag<\/span><\/h2>\n<p>create the following tag in src\/main\/webapp\/WEB-INF\/tags\/displayHello.tag :<\/p>\n<pre lang=\"html\">\r\n<%@tag description=\"mytag description\" pageEncoding=\"UTF-8\"%>\r\n<%@attribute name=\"message\" type=\"java.lang.String\" required=\"true\" %>\r\n\r\ndisplay message from tag : ${message}\r\n<\/pre>\n<h2><span id=\"How_to_use_it\">How to use it<\/span><\/h2>\n<p>In your jsp file, import it :<\/p>\n<pre lang=\"html\">\r\n<%@taglib prefix=\"template\" tagdir=\"\/WEB-INF\/tags\" %>\r\n<\/pre>\n<p>Then you can call it :<\/p>\n<pre lang=\"html\">\r\n<template:displayHello message=\"hello world !!\"><\/template:displayHello>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 Prerequistes2 Configuration2.1 tag2.2 How to use it Prerequistes Please read : Java spring &#8211; quickstart Configuration tag create the following tag in src\/main\/webapp\/WEB-INF\/tags\/displayHello.tag : display message from tag : ${message} How to use it In your jsp file, import it : Then you can call it :<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1547,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1592","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1592"}],"version-history":[{"count":1,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1592\/revisions"}],"predecessor-version":[{"id":1593,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1592\/revisions\/1593"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/1547"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}