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.

JSP 2.0 Article in July JDJ

I got the July issue of JDJ today. In it I found a good article on JSP 2.0 (printable, less ads version). Things I learned from the article:

  • JSTL 1.1 will introduce 16 standardized EL functions:
    - fn:length(): Get the length of a collection or a string.
    - fn:toUpperCase(), fn:toLowerCase(): Change the capitalization of a string.
    - fn:substring(), fn:substringBefore(), fn:substringAfter(): Get a subset of a string.
    - fn:trim(): Trim whitespace from a string.
    - fn:replace(): Replace characters in a string.
    - fn:indexOf(), fn:startsWith(), fn:endsWith(), fn:contains(), fn:containsIgnoreCase(): Check if a string contains another string.
    - fn:split(): Split a string into an array.
    - fn:join(): Join a collection into a string.
    - fn:escapeXml(): Escape XML characters in a string.
  • The tag libraries in JSTL 1.1 have new URIs (for example, http://java.sun.com/jsp/jstl/core instead of the JSTL 1.0 equivalent http://java.sun.com/jstl/core_rt). The new JSTL 1.1 tag libraries accept request-time expressions for their attributes, and delegate to the JSP container to evaluate EL expressions.

Good stuff to know. I'm ready to start developing JSP 2.0 apps - I hope the Tomcat dev team releases a stable build soon. Or maybe I should just look into using Resin...

Posted in Java at Jul 10 2003, 09:54:44 PM MDT 4 Comments

Compression Filter Issues - EOFException

I'm having some issues with implementing a Compression Filter in my day-time project. It works fine via the browser (and in AppFuse/Roller), but not in one of my Webtests. I think this is because my response doesn't have anything in it, but who knows. From my log file:

CompressionFilter.doFilter(87) | Unzipped size: 0
CompressionFilter.doFilter(106) | Zipped size: 20

And then the lovely error message from my testcase:

[canoo] java.io.EOFException
[canoo]     at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:200)
[canoo]     at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:190)
[canoo]     at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:130)
[canoo]     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
[canoo]     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
[canoo]     at com.meterware.httpunit.WebResponse.defineRawInputStream(WebResponse.java:617)

I'm thinking I need to close a stream or something, but since it works fine via the browser - I'm stumped! Any ideas are appreciated. I can post the testcase if necessary.

Update: Richard Hill on the Webtest mailing list hooked me up with the solution. It turned out to be a bug in the JDK, which causes issues in HttpUnit. Here's the solution I used to workaround it.

Posted in Java at Jul 10 2003, 04:59:51 PM MDT 2 Comments

Changing Struts' bean:message to JSTL's fmt:message

I converted AppFuse to use JSTL's <fmt:message> tag instead of Struts' <bean:message> tags this morning. It was pretty easy. Here's the steps I took:

1. First, I added the following to metadata/web/seb-settings.xml:

<!-- Define the basename for a resource bundle for I18N -->
<context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>ApplicationResources</param-value>
</context-param>

2. Then I added the format tag to web/common/taglibs.jsp:

<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

3. Finally, I did find/replace with <bean:message/<fmt:message.

4. I also had to change my title and header keys in web/WEB-INF/tiles-config.xml to remove the . from the bean names. In other words, I converted title.key and heading.key to titleKey and headingKey and also made the appropriate changes in web/layouts/baseLayout.jsp.

Easy as Pie!

Posted in Java at Jul 10 2003, 07:59:29 AM MDT 35 Comments

NewsMonster 1.0 and Mozilla Application Development

I got a couple of treats from the XUL Announce mailing list this morning:

Kevin A. Burton (of Apache Jetspeed fame) has released NewsMonster 1.0 - a cross-plattform weblog manager with a brain - that runs inside Mozilla 1.0 (Netscape 7.0 or greater) on OS X, Linux, or Windows and showcases the power of XUL and Java.

Too bad it doesn't run on Mozilla Firebird. Oh well, I use NetNewsWire and believe it's the best aggregator out there.

O'Reilly has published an in-depth look at Mozilla's new roadmap titled "The Future of Mozilla Application Development" by David Boswell and Brian King.

If I could instantly learn anything right now, it would be XUL, Velocity and WebWork - in that order. I don't know what good this knowledge would do me, but it sure would be nice to learn stuff w/o even trying.

Posted in Java at Jul 10 2003, 06:43:59 AM MDT 2 Comments