Matt RaibleMatt Raible is a writer with a passion for software. 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.

[ANNOUNCE] Hibernate 2.1 Final Released!

One of the benefits of being up at 3:30 in the morning is you get to get the announcements first! Hibernate 2.1 Final has been released. I'll upgrade my apps to it, though I'm not using any new features. I've basically had the same code since 2.0 - you gotta like that backward compatibility remains a priority.

Posted in Java at Dec 11 2003, 03:24:49 AM MST 2 Comments

Denver JUG: XSLT and New EJB 2.0 Certification

Tonight I attented the Denver Java User Group meeting. Tom McQueeney did a nice basic concepts meeting on XSLT. Tom's presentation was a nice refresher on XSL and I learned a few things I hope I can remember the next time I use it. I've used XSL a couple of times in the last few years, and for those applications that I still maintain - I'm very glad I did. The e-learning app I developed last year uses JSTL's XML Transformation tags to render assets with different HTML (i.e. Flash, QuickTime, Image). It's worked great, and has always been very easy to add a new asset type to the XSL stylesheet.

The main speaker tonight was Kathy Sierra, the founder of JavaRanch. Her presentation was supposed to be on the new EJB 2.0 Certification, but it turned out to be a explanation of how EJBs work. Only about 1/3 of the room (approx. 40 attendees) had used EJBs, so I guess that's why she went that route. She didn't ask if we weren't using them by choice. ;-).

She started off her presentation talking about how the brain works and how it fights all day long to forget stuff. Your brain has a built-in crap filter. It only remembers those things that it needs to survive. It will only automatically remember those events that spark high emotions - fear, humor, arousal - because the chemicals caused by the emotions help you remember better. So when you're studying for your Java Certification (or any certification), the brain is going "screw this shit, I can survive without it." Repetition is a way to convince your brain that it is important. Another way is to get involved with your learning - be the EJB. Kathy did a captivating one-hour presentation with a number of audience members who acted out how EJBs work.

It was a very humorous presentation and great fun. An EJB presentation that was fun - WTF?! At one point, I looked around the room and almost everyone was learning forward and smiling. This lady is a captivating speaker, one of the best I've ever seen. I was very impressed with her teaching/learning techniques and I might just have to buy her book, Head First Java. Another highlight of the evening was that I actually won a free book.

Later: I forgot to mention what Kathy said about upcoming Sun Certifications. A couple new ones are coming: Mobile Application Developer, Web Services and an update to the Web Component Developer exam. She mentioned that the EJB 2.0 exam would probably remain at 2.0 for at least another year - until all the vendors caught up and support EJB 2.1. She said the Web Services one is going to be hard as will the next Web Component Developer Exam. The Web Component Developer exam will cover JSP 2.0 and Servlet 2.4. She also mentioned that she was reading Pro JSP to help create the WCD exam. How's that for an endorsement?!

Posted in Java at Dec 11 2003, 12:17:08 AM MST 5 Comments

Upgrading Hibernate, Struts and Display Tag

Last night, I upgraded a number of AppFuse dependencies: Hibernate → 2.1-rc, Struts Nightly from 2 weeks ago → Dec. 2nd and the Display Tag → 1.0 B2. The upgrades weren't as smooth as I'm used to, so I thought I'd share my experience to help y'all when you upgrade.

First of all, I found that Hibernate has ditched the Java Caching System (JCS) for their own, appropriately called Easy Hibernate Cache. This means you can forget about including jcs.jar in your webapp, ehcache.jar is now required. I upgraded from Hibernate 2.0.3.

Struts has done some trimming of their own - getting rid of their dependency on commons-lang. I use commons-lang.jar in AppFuse, so I had to dig into the contrib directory and grab it from there.

I had several issues with the displaytag when upgrading (from 0.8.5), but managed to figure them all out. First of all, the displaytag.tld in the jar's META-INF directory had the following in it's <taglib> declaration:

<taglib xmlns:html="http://www.w3.org/1999/xhtml">

This is obviously invalid, and I had to unjar, fix, and re-jar to get around this. I believe that this has been fixed on SF. I also found that this new version requires commons-collections 2.1. Struts must ship with an older version, so I simply replaces Struts' commons-collections with the one from the displaytag download.

The newer commons-collections is around 500 KB smaller - wierd, eh?

Lastly, I had to configure the ResponseOverrideFilter in my web.xml in order to get export functionality with Tiles. I had to tweek a LOT of CSS for this upgrade, but at least it's done now and hopefully I won't have to do it again for quite some time.

I also attempted to run AppFuse (with all these upgrades) in Tomcat 5.0.16 with no luck. With Hibernate 2.0.3, it was giving me an IllegalStateException when registering a new user. This process sets "Remember Me" cookies and redirects to the LoginServlet, which does a post to j_security_check and redirects to the originally requested page. Works fine in Tomcat 4.1.x, but not in 5.0.16. With Hibernate 2.1-rc1, I had to include jta.jar in $CATALINA_HOME/common/lib and now it still fails, but I get no errors whatsoever (those are always fun, aren't they). Also, still no luck with using J2EE 1.4.

Posted in Java at Dec 10 2003, 03:31:50 PM MST 1 Comment

Beautiful Snow in Denver

Last night we got around 5 inches of snow at our house. Beautiful stuff, I love it. Too bad I'm not on the slopes - Breckenridge got 9 inches. Here's some clips from the local news:

Last night in Cherry Creek Today's Forecast

Posted in General at Dec 09 2003, 08:26:02 AM MST 2 Comments

Zeldman Blocked

They have fairly strict firewall rules at my current project, but I've been able to get to all the sites I've ever attempted. That's why this error amazed me this morning:

Forbidden by rating check

You are not permitted to access the URL http://www.zeldman.com/ due to the policy of your organization.

So much for getting any good web design tips while I'm at work... ;-)

Posted in The Web at Dec 08 2003, 10:39:03 AM MST Add a Comment

DB2 with Hibernate and Tomcat

At my current project, we're using AppFuse for our baseline and (currently) Tomcat and MySQL for our databases. Soon we'll be migrating to DB2 for our database. I'm assuming everything will work smoothly with Hibernate, but there's probably some Ant things I will need to modify. For instance, with MySQL, I currently create a new database with the following script:

create database if not exists appfuse;
grant all privileges on appfuse.* to test@"%" identified by "test";
grant all privileges on appfuse.* to test@localhost identified by "test";

Is this possible with DB2? It's no biggie if it isn't - at my Comcast gig earlier in the year, we tied AppFuse/Hibernate into Oracle and simply didn't use the db-create nor db-init (creates tables) tasks. I use Hibernate's <schemaexport> task to create the tables - hopefully this will work in DB2. As for Tomcat, has anyone successfully configured DB2 with Tomcat's DBCP? We'll eventually be migrating to Websphere 5, hopefully it's not a big leap from Tomcat 4.1.27.

I haven't done any research on this yet, just wanted to put out some feelers and get any helpful advice before I start banging my head against the wall (hopefully I won't have to).

Posted in Java at Dec 08 2003, 10:01:55 AM MST 6 Comments

Weekend Update

After talking with Apple's Tech Support for an hour today, the verdict is in: my PowerBook's hard drive is hosed. They're sending out a dispatch from Airborne Express, should be here on Tuesday. I package it up and send it back, should take around 5 business days to fix. I like Dell's Support better, they send someone to your house to fix the problem the next day. Since this is my primary development machine at my current client, it should make for an interesting week.

This site was down for most of the night last night - this time due to a core dump from the JVM. At least I'm more attentive to this site than the folks at javablogs, which has been down all weekend. I think it's time to quit hosting so many demos on this site. Currently there are 5, and they can't be helping my memory issues. I'll leave Roller and the Wiki on this site, and moving the others to my home server. I wonder if I can use the balancer in Tomcat 5.0.16 to redirect traffic to my demo server. My upload speed is only 200K, but that's probably enough for these small and simple demo apps (i.e. struts-resume, displaytag editable table, struts-menu, strutscx and my quick-n-dirty training app. I don't know if this will help, 54,000 hits/day (3000 visits) probably doesn't help much (I wonder how many of those are real people).

My PowerBook dying sucks, but hopefully it will get me off the computer at night, and I can enjoy more time with my family. Yesterday, I spent most of the day working for an old client, but I did get everything done I hoped to, so that's a nice feeling. Julie, Abbie and I went to Kiddie Kandids to get Holiday Pictures taken - 5 hours later (3 hour wait), we had them in our hands and it was well worth the wait. I'll scan one and post it soon. Today, we're getting/assembling our tree, and I'll snap a pic for Russ. This year, Christmas will be spent at the cabin, but a tree (and lights) is still essential in my book.

Posted in General at Dec 07 2003, 02:15:14 PM MST 4 Comments

Is my PowerBook hosed?

OK, it might a bit of a foolish experiment, but it sounded easy enough on my way back from lunch. I figured since I could use my PowerBook as a Firewire Drive on my other PowerBook, doing the same on Windows XP should be a breeze. It seems that's not the case. I "initialized" the disk on Windows XP and it didn't show up as a drive letter - so I tried to back out. Now my PowerBook won't boot. I tried resetting the PRAM, running Disk Utility from the Panther CD, and even running DiskWarrior from my iPod - all with no luck.

The good news is that when I boot from my iPod, I can see my hard drive and access its files - it just seems like the Master Boot Record got overwritten by Windows. Here's my post on Apple's Discussion Board.

If nothing else, this is a nice way to get me off the computer for the weekend. Rather than spending all night trying to fix it, I'll wait until Sunday and take it to the Apple Store (pending an easy solution). If all else fails: backup, archive and install should work. This is my primary dev machine at my client, so I will need it for Monday morning.

Shucks, and it sounded like it would be sooooo easy... ;-)

Posted in Mac OS X at Dec 05 2003, 05:44:06 PM MST 5 Comments

[JSPWiki] Sweet Java/HTML/XML syntax coloring

I found a very nice plugin for JSPWiki this morning: the Java to HTML converter.

This tool converts Java source code (files and snipplets) to HTML, RTF, TeX and XHTML with syntax highlighting. It is Open source under the GPL.

I've found that it works for Java, XML and HTML. Here's a couple of examples (I've hooked it into Roller's JSPWiki support):

Java


/**
@return Returns the id.
* @hibernate.id column="id"
*  generator-class="native" unsaved-value="null"
*/

public Long getId() {
    return this.id;
}

HTML


<html>
  <head>
    <title>HTML Test</title>
  </head>
  <body></body>
</html>

XML



<?xml version="1.0"?>

<!DOCENGINE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
    <class
        name="org.appfuse.persistence.User"
        table="app_user">

        <id
            name="id"
            column="id"
            type="java.lang.Long"
            unsaved-value="null"
        >
            <generator class="native">
            </generator>
        </id>

    </class>

</hibernate-mapping>

The one thing I don't like is that it centers the code using <center>, adding "center table {width: 100%}" to your stylesheet fixes the issue. I also tried to upgrade Roller's JSPWiki.jar to 2.1.86-alpha (to get XHTML support), but I was getting all kinds of stacktraces from OSCache and it just didn't work. Java2Html also has an Ant Task to convert Java source to HTML. Java2HTML has the same thing, but this new one supports different styles.

NOTE: The above syntax coloring produces invalid XHTML, so this site won't validate for awhile.

Posted in Java at Dec 05 2003, 01:02:08 PM MST 4 Comments

J2EE Patterns Catalog

J2EE is simple to learn, simple to develop - especially when Sun recommends you follow a mere handful of patterns. Heh.

Posted in Java at Dec 04 2003, 08:53:25 PM MST 9 Comments