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.

Tabbed Menus - now with DHTML!

I did some work this evening to adapt Adam Kalsey's Tabbed Menu demo to fit my own design. He simply changes the <body>'s class based on which tag the user has clicked on. While this seems reasonable, I'd rather do the menu-selection on the client-side. This allows a developer to integrate this menu into their app with no server-side coding needed. So here's a demo with a client-side (DHTML) method of selecting menus. Clicking on an item just sets a cookie and then reloads the page.

This client-side approach should make it much easier to integrate this menu into struts-menu.

Posted in The Web at Jun 02 2003, 07:25:14 PM MDT 7 Comments

Tomcat/Oracle Connectivity Problems

I had a problem that I thought I fixed a while back. The problem was that our firewall between Tomcat and Oracle would close our database connection after 90 minutes of inactivity. We first solved this problem by using a Servlet/Ant Task/cron job combination to ping and use the DBCP connection pool we'd configured in Tomcat. This worked, for a little while. Then we realized we had to also ping the JDBCRealm, so we used a login test (via WebTest) and added this to our Ant Task/cron job. Again, this worked for a couple of months, until a QA Expert came on board and starting using WAPT to load test our app. Then we began having issues with many connections being opened (20+), then they were closed by the firewall, and when the app would try to re-use these connections, they wouldn't respond, and the app would enter into the "dithering idiot" mode. We finally figured out a solution, rather than workarounds, and here it is:

// In the file:
$ORACLE_HOME/network/Admin/SQLNET.ORA

// Add the following line to check every 10 minutes
SQLNET.EXPIRE_TIME=10

Posted in Java at Jun 02 2003, 09:25:58 AM MDT Add a Comment

Cold Beer in the Sun

nice contraption Via Slashdot - How to keep your beer cold in the sun. I'd like to buy one!

Posted in General at Jun 01 2003, 08:05:07 PM MDT Add a Comment

Today was a good day

Today I woke up at 6:00 and met a friend in Castle Rock (south of Denver). We were up early to ride our mountain bikes in the Elephant Rock ride. We did the 26-mile Canyon Course, which was mostly pavement and dirt roads. It was much easier than the some of the single tracks in the foothills. I live in the foothills and it's only about 10 miles to some of the best mountain bike riding in the country - right in my backyard! It rocks. So we finished the ride in 2.5 hours, had a beer and then the storm hit. The temperature dropped about 20 degrees in 15 minutes, the rain came down in sheets, and the wind picked up to about 10-20 miles/hour. We were done, and very happy about that. A lot of people were still our riding in it. I actually know a couple of folks - it'll be interesting to see there take on it later this week.

After escaping the storm, I drove home, dropped my bike off for a tune-up (I had to bribe the guy with a 12er to get it done so I can commute this week) and played with Abbie for most of the afternoon (Mom slept after being up with her all last night - she's teething). We just got back from an hour walk, and I can her (Abbie) waking up from her nap in the other room, so I'd better go.

Posted in General at Jun 01 2003, 05:02:16 PM MDT Add a Comment

Hibernate PlugIn for Struts

I don't know that there's a need for a Hibernate PlugIn for Struts, but I wrote one today just for kicks. Pretty simple stuff that only requires you to have hibernate.cfg.xml in your WEB-INF/classes directory, and to add the following to your struts-config.xml.

<plug-in className="org.appfuse.webapp.util.HibernatePlugIn"/>

Then create the file org.appfuse.webapp.util.HibernatePlugIn as follows:

public class HibernatePlugIn implements PlugIn {
    //~ Instance fields ========================================================

    private Log log = LogFactory.getLog(HibernatePlugIn.class);

    //~ Methods ================================================================

    public void init(ActionServlet servlet, ModuleConfig config)
    throws ServletException {
        try {
            SessionFactory sf =
                new Configuration().configure().buildSessionFactory();

            if (log.isDebugEnabled()) {
                log.debug("Hibernate configuration completed.");
            }
        } catch (HibernateException h) {
            log.fatal("Error configuring Hibernate!", h);
        }
    }

    public void destroy() {}
}

This doesn't seem to have any advantages over using a StartupListener, but it would be pretty sweet if it was included with Struts (or Hibernate), so you could simply put it in struts-config.xml and be done with it.

Posted in Java at May 31 2003, 11:31:41 AM MDT 2 Comments

Hotels.com powered by Struts!

This is kind of a cool announcement - giving more credibility to Struts. Personally, I think all the leading web application frameworks are great - and can probably be learned in a week or two (or a few days/hours!) - so it's not about which one you're using, it's about if you're using one or not. If you are - you're on the right path. If not, you're probably wasting a lot of time developing your own.

I am proud to announce the successful launch of a major vacation packaging site whose presentation tier has been built entirely with Struts:

http://packaging.hotels.com/packaging/index.do

We have made extensive use of the Struts MVC framework, custom tags, and I18N components, with some custom modifications. It has proven itself to be a stable and robust platform, able to amply handle the needs of both our users and management.

I would like to applaud everyone who has worked on the Struts project; it has been shown yet again to be an excellent framework for a commerical web application.

James Childers hotels.com Packaging Team

Posted in Java at May 30 2003, 10:59:40 AM MDT 1 Comment

nforms.net - Cross-browser XForms engine

nForms.net is a javascript implementation of an Xforms engine. Xforms is the next generation mark-up language for generating web-based forms. nForms is a zero-deployment solution that adds browser support for xforms elements into your current html applications.

Looks cool - unfortunately it doesn't seem that it will be released as open source.

Posted in The Web at May 30 2003, 09:27:02 AM MDT 1 Comment

Anthill and Maven

I did a little more research this morning - this time trying to find out if Anthill could play nicely with Maven. Here is the answer I received from the anthill mailing list:

We've recently implemented a Maven builder for Anthill Pro -- it's not 
released yet but will be part of version 2.1.

We will probably implement a Maven builder for Anthill OS sometime soon 
as well.

In the meantime, check out how some people have gotten Maven builds to 
work with Anthill in the past -- 

http://lists.urbancode.com/pipermail/anthill/2002-December/000543.html

Cool! Thanks Maciej!

Posted in Java at May 30 2003, 07:48:48 AM MDT 3 Comments

Can I Mavenize my release process?

I sent the following e-mail to the maven-user mailing list this morning:

Since the deployment of my project's site was so easy using  "maven
site:deploy", I suspect that's there's an easy way to  "package" my app and
upload it to SourceForge.

For packaging, here's what I had in mind.

1. Creates a "dist" directory.
2. Copies the following directories/files into dist:
   bin/*
   conf/*
   target/lib -> dist/lib
3. zips and gzips contents of dist for distribution.
4. Uploads zip and gzip to upload.sf.net
5. (Optionally) Creates a branch in CVS for this release.

In the midst of writing this post, I actually got an answer! Using "maven dist", I created distributions in target/distributions. This directory contains moblogger-*.jar, LICENSE.txt and a docs folder. A little more work and I'm sure I can get a "lib" directory with all the required .jar's for running moblogger, as well as the bin and conf directories. If any of you have examples of dist-ing your project to SourceForge using Maven, please let me know.

Here's a good question for you: Is it possible to create entries in moblogger.jar/META-INF/MANIFEST.MF that point to the other .jar files required to run moblogger? I'd love to simply be able to run:

java -jar moblogger.jar conf/agentsettings.xml

Rather than how it is now (java -cp [each jar listed here] net.sf.moblogger.agent.MoblogAgent conf/agentsettings.xml). The MANIFEST.MF file generated by Maven gives me the impression that this is possible. Consider the following entry in this file:

Extension-List: jaf,mail,commons-lang,commons-logging,ftp,jdom,log4j,q
 uartz,smack,xerces,xmlrpc,junit
jaf-Extension-Name: jaf
jaf-Implementation-Version:
jaf-Implementation-URL: http://www.ibiblio.org/maven/jaf/jars/activati
 on.jar

When I try this now, I get:

Exception in thread "main" java.lang.NoClassDefFoundError: org/quartz/SchedulerFactory

I'm assuming that it might be possible to change the Implentation-URL to something to point to the local file in the same directory. If not, is it possible to add these JARs into my moblogger.jar? Or will this violate some JARs licenses?

Posted in Java at May 30 2003, 06:27:12 AM MDT Add a Comment

Mavenizing Moblogger

I did some work to Mavenize Moblogger this evening. The biggest plus thus far? The Moblogger.zip file when from 1.9 MB to 45 KB - that rocks!! I got jar and site:generate working just fine, but there's no unit tests, so probably a fair amount of work needs to be done there. Regardless, I'll try to check it in tonight so others can start pitching in. The hardest part? Learning to type maven instead of ant.

Update: Deploying the moblogger site was a piece of cake (maven site:deploy). Thanks to the Flock developers for providing a nice template for Mavenizing an app.

Posted in Java at May 29 2003, 06:58:23 PM MDT Add a Comment