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.

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

StrutsCX - Updated Demo

I've updated my demo of StrutsCX. I haven't looked at StrutsCX much, but this release does look pretty polished. A quick glance tells me that it's now ready to be simply included in your Struts app with a single .jar file. Very nice! I might have to use it in Struts Resume to generate PDFs of Resumes.

Posted in Java at Dec 04 2003, 04:23:02 PM MST 2 Comments

[ANN] Apache Tomcat 5.0.16 Stable Released

I guess it happened yesterday, beginning upgrade at 3:10 MST... Done at 3:15 - let me know if you see any issues.

Later: There's issues all right. First thing is that the flag to allow symlinks used to be adding the following in your <Context> tag:

<Resources
  className="org.apache.naming.resources.FileDirContext"
  allowLinking="true" caseSensitive="true" />

And with 5.0.16, this doesn't work. Adding allowLinking="true" on your <Context> does allow symlinks, and should have been this way the whole time IMO. I also got a good ol' OutOfMemory error and I have a sneak suspicion it's not Roller (though Roller does though an exception when I do Weblog → Edit:

ERROR 2003-12-04 15:54:07,948 | HibernateStrategy:query | During QUERY
net.sf.hibernate.QueryException: could not resolve property type: weblogEntryId [select p from p in
class org.roller.pojos.RefererData where p.weblogEntryId=? and not title is null and not excerpt is
null order by p.totalHits desc]

Maybe this has something to do with the fact that my referers are not getting cleaned out every night. Anyway, back to my sneaky suspicion of OOM errors. I have two domains hosted on this site - raible.net and raibledesigns.com. The first just redirects to my family blog, but that's not the point. What I'm seeing in Tomcat's logs is that it tries to load all apps for both domains - and it pukes on a few. Time to play around with server.xml and see if I can get raible.net to just load it's own context.

Solution Found: You have to configure 2 different appBase's for each host.

Posted in Java at Dec 04 2003, 03:09:01 PM MST Add a Comment

Display Tag: Static Headers - Revisited

I get a fair amount of hits on this site for my Display Tag: Static Headers post. When I originally wrote it, back in August, it didn't work in IE. So I asked the experts. I got a solution from that - split the tables and wrap the data table with a div that has style="height: 400px; overflow: auto". This works in IE, but since it's not easy to hack the HTML that the displaytag generates, this is an awkward solution.

Since my old demo disappeared when I updated struts-resume, I created a new one. This example shows how to do static headers in both IE and Mozilla - and the IE solution actually works in both. It's admittedly ugly, but it works. The major problem with this approach is getting the width of the top (header) cells to match up with the bottom (data) cells. I got them close using "th, td { width: 25%}" in my stylesheet, but that doesn't line them up exactly. If anyone knows of a better solution, let me know and I'll update the demo.

Posted in Java at Dec 04 2003, 01:51:05 PM MST 4 Comments

The day before it hits

Abbie has been sick for about a week now. It started out as a runny nose, and watering eyes - nothing too bad. She's had a smile on her face and been laughing the whole time. This can be a real treat after she's sneezed, the boogers are streaming on to her chin - but she still wants to give you a kiss. Kisses at this age means she opens her mouth real wide and plasters her face against yours. As gross as it sounds, I think it's cute. Anyway, on Sunday she started to get quite cranky and began to earn her nickname we've always wanted to give her but never could - Crabby Abbie. On Monday, we noticed she was running a fever and took her into the doctor. It was a typically doctor's visit, nothing we can do, get lots of rest/fluids, etc. That night, after her afternoon nap, she was back to her happy ol' self again and it was hard to believe she still had a fever. Yesterday it was the same thing, smiling happy kid with a fever (100-101). Then last night, I started to feel it. You know that feeling in the back of your nose when you know you're getting a cold. It sucks, you know it's coming - and you're pretty much helpless to get rid of it. You pound down the Orange Juice, throw down some Vitamin C - and hope for the best. But I know it's coming... it's just a matter of time. Getting 5 hours of sleep last night will surely escalate the process...

Posted in General at Dec 03 2003, 07:08:31 AM MST 5 Comments

Users and Groups on Linux

Now that I've rebuilt my Red Hat 9 box with Fedora, and installed Out-of-the-Box - I really should get my user and group permissions setup properly. If I ever decide to host CVS, shell access or bug tracking for clients, it'd be nice to know my server is secure. Out-of-the-box installs everything as root (save CVS), so I'm constantly doing "chown -R matt $CATALINA_HOME" or "su" to simply deploy files to Tomcat.

How are these open source servers (i.e. SourceForge) setup? If I wanted to setup a SF-clone, I'm assuming I'd need to setup a "developers" or "clientName" group and then create specific cvs repositories for each client. However, I'm not looking to setup a SourceForge-like server right now - I just want to get my permissions right. I'm thinking of creating a "developers" group, and giving it rw rights to Tomcat, Ant, Anthill, etc. Then I'll make myself a user in this group, rather than having to "su" every time I want to do something. What would you do? How would you setup your "dev" box to be more secure with users and groups?

Posted in Java at Dec 03 2003, 05:45:23 AM MST 1 Comment

Filtering Roller Feeds by Category

Simon posted today that Pebble supports RSS Feeds by Category. Just so you know, Roller also has this feature, - just add "?catname=categoryName" after /page/$username. Here's all my current categories.

This is a great feature to have in your blogging software. Without it, javablogs.com would be getting all my posts, rather than just my Java and Roller categories.

Posted in Roller at Dec 02 2003, 09:20:13 PM MST 4 Comments