Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

JSTL Tips o' the Day

Here's a couple of tips to help you in your JSP development with JSTL:

  • The <c:out> tag has a default attribute you can use to provide a default value when the value in your the variable you're trying to write is null. This is much easier than using if statements. Example: <c:out value="${user.firstName}" default="None Given" />.
  • You can populate dynamic values in a key from your ResourceBundle using the <fmt:param> tag. For instance, if you have a message with a link in ApplicationResources.properties - and you want to populate it with a struts-forward, it's easy with JSTL:

    ApplicationResources.properties:

    mainMenu.link=Click <a href="{0}">here</a> to return to the Main Menu.
    
    In your JSP:

    <fmt:message key="mainMenu.link">
      <fmt:param><html:rewrite forward="mainMenu"/></fmt:param>
    </fmt:message>
    

Usually I try not to put any HTML in ApplicationResources.properties, but I don't think a minimal amount hurts anything. Of course, you could put all the HTML in your JSP, so mainMenu.link changes to "Click {0} to return to the Main Menu." and your JSP changes to:

<fmt:message key="mainMenu.link">
  <fmt:param>
      <html:link forward="mainMenu">here</html:link>
  </fmt:param>
</fmt:message>

Enjoy!

Posted in Java at Nov 30 2003, 06:14:20 PM MST 1 Comment
Comments:

Here's a JSLT question I have not been able to answer or figure out. If I want to do a bitwise shift of an in within an test expression, how do I do it? Suppose I want to write:
<c:if test="${0 == (myval >> 3) }" >
Basically shifting myval 3 to the right and testing for 0. How do I do it? I have tried all sorts of things with no support using EL syntax.

Posted by dsuspense on December 01, 2003 at 06:41 PM MST #

Post a Comment:
  • HTML Syntax: Allowed