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.

Server move should be completed

If you're seeing this post, then chances are that www.raibledesigns.com is resolving correctly for you. It's still not working for me from work, but that could be a proxy server / local DNS server issue. I've moved from the server that crashed all the time to a new one that is hopefully more stable. Thanks Keith!

Also, thanks to the folks that have e-mailed me offering their hosting services - it's greatly appreciated. Hopefully, things will run smoothly on this server and I won't have to move anywhere else. I installed JRockit at work today on both Windows and Linux, and it works so well (not to mention awesome monitoring tools), that I'm going to try to use it on this site. It's a 40MB download (same as Sun's JDK ??), but installs in under a minute.

The only error messages polluting my log file these days is the following. It seems harmless, but that means that we should probably not even be logging it. Anyone know of a solution?

2003-05-07 16:00:10,244 SimpleLog4JLogSystem.logVelocityMessage(181) | 
    VelocimacroProxy.render() : exception VM = #refererDisplayUrl() : 
    ClientAbortException:  java.net.SocketException: Broken pipe

Posted in Roller at May 07 2003, 05:14:03 PM MDT 4 Comments

Comments Fix

I committed a small enhancement to Roller's CVS tonight. Twisty Comments should now be FIFO instead of LIFO. Most commenting features are designed this way, including Roller's other two options (popup and single-page). Thanks to Keith for testing out twisty comments and inspiring me to fix this bug.

Posted in Roller at May 05 2003, 10:33:46 PM MDT 2 Comments

Adding Cool Comments to Roller

Cool Comments (a.k.a. Twisty Comments) have been added to Roller's CVS. Grab it if you're brave and help me work out the bugs. I've published a how to on Roller's Wiki. It should work on IE 5.5+/Win and Mozilla/all (what a great browser). Doesn't seem to work on Safari, Camino or Opera, which is fine as it degrades nicely. My degraded comments page needs some work though - all the items in my menu are centered. Oh well, must be a missing <td> or some other closing element - I'll deal with it later.

Posted in Roller at Apr 28 2003, 10:25:53 PM MDT 5 Comments

Cool Comments have arrived!

I got the idea the cool comments you now see from Joe Hewitt. It wasn't too bad to implement, but there's still lots of quirks. Many of which you can see. The hardest part was figuring to implement XML loading in Mozilla. Joe is using the following method:

gMediaDoc = document.implementation.createDocument("", "media", null);
gMediaDoc.addEventListener("load", onMediaLoaded, false);
gMediaDoc.load(aURL);

Which works great when the file is on a filesystem, with a .xml extension. I couldn't get Roller to accept a .xml for my comment page's "link" attribute, so I had to resort to a lot of web research, and I came up with the following:

gMediaDoc = document.implementation.createDocument("", "", null);
var xmlHttp = new XMLHttpRequest();
xmlHttp.overrideMimeType("text/xml");
xmlHttp.open("GET", aURL, false);
xmlHttp.send(null);
gMediaDoc.loadXML(xmlHttp.responseXML.xml);
onMediaLoaded();

The loadXML method is provided by Erik Arvidsson's XML Extras. Thanks Erik! There's quite a bit of work to enable inline comments, but I promise to document a how to before it's released to the general public. Here's some problems I hope to fix before that.

  • Alignment - it'd be nice if I could make the div in-line, so I could put a comments link as before - with other text on either side of it. Either that, or make it inherit the parent's text-alignment. It'd be cool if the pictures below had the comments link right below them.
  • URL Prefix - I suppose I could pass in the context + username to solve this one. While it was working normally for me to use $userName/comments for the URL while developing this, I had to use "/page/rd/comments" on this site. I think it's something to do with the <base href="" /> being set.
  • Loading - it takes a few seconds for the templates to load. If you click on the comments link before they've loaded, you'll get a JavaScript error, and be routed to the default comments page. The window's status bar will say "Done initializing comment templates..." when comments are ready for action.
  • No Preview. I don't think this is a big deal, but it probably wouldn't be too hard to add.
  • Missing label from "Remember Me" checkbox. I'm not sure why this is happening, but the text is there!

That's all the enhancements I can think of for now. Tell me what you think and feel free to give these suckers a test drive.

Update: Strange - I'm seeing some errors that I didn't earlier. In IE6/WinXP, I get a JavaScript error ["Access is Denied" error (Line 149, Char 5)]. Also, I can see the "Remember Information" label here, whereas I couldn't on the machine I implemented this on (Win2K/IE6). Strangely enough, Julie's machine is Windows 2000/IE6, and these errors occur on hers as well. Looks like I have a lot more work to do!

Posted in Roller at Apr 28 2003, 06:22:43 PM MDT 13 Comments

Roller from CVS

The site is now running the latest and greatest version of Roller from CVS. Let me know if you see any issues, and as always, feel free to play around with my demo user (user: test, pw: roller).

Posted in Roller at Apr 27 2003, 03:04:05 PM MDT 1 Comment

Very Fricken Cool!

Dave made some CSS improvements to Roller's Wiki - and I must say it looks very nice! Nice work Dave - I dig it! It's cool to see how the Roller Wiki has quickly become a great documentation engine for this project. Especially with Dave's recent screenshots and user guide enhancements.

Posted in Roller at Apr 27 2003, 02:39:58 PM MDT 1 Comment

RE: This site's performance

I tried to switch my JVM to BEA's JRockit last night, but had no luck - Tomcat wouldn't start, so I switched back to Sun's JVM. However, I was running 1.4 and I switched to 1.4.1. Performance seems to be better, and there aren't very many errors in my catalina.out file (this is a symlink to the file) since last night. I guess we'll have to see how the site holds up throughout the day. I didn't install Jikes because it's an RPM and I believe Keith has to install those. Also, after Chris's comments, I'm a little less inclined to make the change.

I also have a few questions for Dave regarding both #showTrackbackURL($entry) and #showLinkbacks( $day ). First, how is the Trackback URL supposed to be used? Are folks expected to use this to link to an entry of mine (vs. a permalink), or what? Why should I display it like Lance does? Secondly, the showLinkbacks($day) macro is not present in any of my local *.vm files. Maybe I deleted it by accident. Which template should it be in?

Later: So if I understand this correctly, a Trackback is basically a way of telling someone you've referred to them, and your entry will show up in their comments. Whereas as a Linkback is a feature that checks referrers for URLs linking back to your site? Now I just need to find out where my #showLinkbacks() macro disappeared to.

Posted in Roller at Apr 24 2003, 07:57:33 AM MDT 3 Comments

Roller Bugs?

I'm encountering the following bugs with Roller's 0.9.7.1 - once I make sure I can reproduce them with the latest build, and the "x2" theme, I'll enter them as bugs (then hopefully fix them).

  • News items - newsfeed.vm has some issues and won't render newsfeeds correctly. I seem to be the only one using these, but I believe a fix is still in order. This is only a bug with the new velocimacros. I had it working yesterday, and then Dave updated weblog.vm and website.vm, and now it's broken again. I reverted my newsfeeds back to the old $macros.showAllNewsfeeds.
  • Linkback - I can get linkback to work, but I can't get it to display after each day - it only shows up at the bottom of all my entries. It might be an HTML issues - I'll have to validate this site as XHTML and do a bit of cleanup to confirm this is actually a bug.
  • Joe Hewitt comments - I have the display working, but posting doesn't. Actually, the post works, but the redisplay doesn't. I'll have to post a few comments on Joe's blog to verify that his comments system works like I expect it to. Maybe I should check-in what I have working and someone else can hack around with it?

I doubt I'll get to verifying/fixing these for a few days. Today is our 3 year anniversary, tomorrow will be another ride-home-day/late arrival (last night I got home at 8:00) and Thursday night I'm going to the Jimmy Buffett concert. As for today being our anniversary - it's been an awesome 5 years since I met Julie - getting married to her was the best decision I ever made, and having Abbie was the best decision we ever made. Life just keeps getting better, what luck!

Posted in Roller at Apr 22 2003, 07:13:27 AM MDT Add a Comment

Cool idea - highlight entries by category with CSS

This sounds like a cool idea - and should be easy to get working with Roller. However, I'm stumped on making this work. Hopefully someone can help me out with the following macro:

#foreach( $entry in $entries )
#if ($entry.getCategory().startsWith("Java"))
<div style="border-left: 2px solid red">
#else
<div style="border-left: 2px solid blue">
#end

Once I get this working, making my category menu use the same colors will be a great way to indicate which categories I've posted to.

Posted in Roller at Apr 20 2003, 05:45:03 PM MDT 1 Comment

Upgrading to Roller 0.9.7

I'm starting the upgrade to Roller 0.9.7. Don't stand by with too much earnest - if I get interrupted by Julie and Abbie - they have priority. I'll let you know when I'm done.

Later: I might as well keep a record of what I do to upgrade so it'll be easier next time - and maybe I'll eventually write a script to do it all.

1. I dumped the mysql database from this site using mysqldump. I then created a database locally and imported it.

2. I ran the 0.9.6 to 0.9.7 upgrade script for mysql. I encountered a few errors as I was partially on 0.9.7 already.

3. I edited the log4j.properties file to e-mail me errors and to cut down on Velocity and Hibernate logging. I also got rid of the "R" appender, as that was writing a roller.log file that is essentially the same as Tomcat's log file. I also added timestamping to the log messages.

# Properties for configuring Log4j for this application
# This is the configuring for logging displayed in the Application Server
log4j.rootCategory=INFO, stdout, mail

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d %C{1}.%M(%L) | %m%n

# Configuration for receiving e-mails when ERROR messages occur.
log4j.appender.mail=org.apache.log4j.net.SMTPAppender
[email protected]
[email protected]
log4j.appender.mail.SMTPHost=localhost
log4j.appender.mail.Threshold=ERROR
log4j.appender.mail.BufferSize=1
log4j.appender.mail.Subject=[www] Roller Application Error

log4j.appender.mail.layout=org.apache.log4j.PatternLayout
log4j.appender.mail.layout.ConversionPattern=%d [%t] %c %x - %m%n

# If programmed properly the most messages would be at DEBUG 
# and the least at FATAL.

# Options are: DEBUG, INFO, WARN, ERROR, FATAL
log4j.logger.org.roller=ERROR
log4j.logger.org.apache.velocity=ERROR
log4j.logger.org.apache.commons=ERROR
log4j.logger.org.apache.struts=ERROR

# All hibernate log output of "info" level or higher goes to stdout.
# For more verbose logging, change the "info" to "debug" on the last line.
log4j.logger.net.sf.hibernate.ps.PreparedStatementCache=ERROR
log4j.logger.net.sf.hibernate=ERROR

4. Whoa! There's a new look to the index.jsp page. I corrected a small bug in the link around the combined rss badge.

5. I changed oscache.properties to have a "cache.path" that was prudent for my installation.

6. Added home.jsp and changed "main" forward in struts-config.xml to have a path="/home.jsp" so users will be directed to this page, rather than the index.jsp.

7. Onto synchronizing my current web.xml with the new one. Added <welcome-file-list>, <error-page>'s and security settings for my private weblog. Sweet, JSTL has been added so I don't have to add these taglibs or jars. I changed the <form-error-page> to "/login.jsp?error=true". Funny thing is, I never see the login page anymore since I'm using the "Remember Me" feature.

8. Added all custom images from my about page to the "images" directory. Also moved my custom favicon.ico from backed up directory to new roller installation directory.

9. Next, I synched up the settings from my roller-config.xml file with the new one. FYI, e-mailing comments is off by default.

10. Now I guess I need to convert all my pages to use the new macros. I'll do this after upgrading the codebase here. It's kindof a pain to upgrade the codebase, as you've already seen. One of my problems is I have symlinks all over the place in my "roller" directory, so rather than re-creating them, I just upload a .jar of roller, unzip it, and cp -r roller/* webapps/roller/. over my last installation. Crossing my fingers now.

After upgrading code: It looks like I changed the wrong forward, rather than "main", I should've changed "home.page" to home.jsp. I'll let you know if I spot anything crazy while attempting to do my macro migration.

Update: After the macro migration, the only issue I've found (so far) is that #showWebsiteTitle() adds spaces on both ends, and since I'm writing this using JavaScript (for the title image), it's screwing things up. I reverted back to $macros.showWebsiteTitle() and everything works as expected. Now I just have to figure out how to get trackback setup. I tried this, but it didn't work for me. Also, I can't seem to get #showAllNewsfeeds(true 1) to work.

Posted in Roller at Apr 20 2003, 11:10:26 AM MDT 3 Comments