Display element in JSP only if model element not null

How to display element in JSP only if model element not null

To do that you can use the or _ tags to make conditional rendering in Java Server Pages (JSP) using the JSP Standard Tag Library (JSTL) like in the following code snippet:

<div>
	<c:if test="${not empty podcast.twitterPage}">
		<a href="${podcast.twitterPage}" target="_blank" class="icon-twitter-producer producer-social"></a>
	</c:if> 			 		
	<c:if test="${not empty podcast.fbPage}">
		<a href="${podcast.fbPage}" target="_blank" class="icon-facebook-producer producer-social"></a>
	</c:if> 			 		
	<c:if test="${not empty podcast.gplusPage}">
		<a href="${podcast.gplusPage}" target="_blank" class="icon-google-plus-producer producer-social"></a>
	</c:if> 
</div>

Podcastpedia.org on GitHub

How to get the title of a remote web page using javascript and NodeJS

This post presents how to use web scraping with Cheerio in a NodeJS backend to retrieve the title of a bookmark added in bookmarks.codingpedia.org Continue reading

How to use Showdown in Angular and NodeJS

Published on February 21, 2017

Sharing coding bookmarks

Published on February 11, 2017