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.
You searched this site for "java". 1,588 entries found.

You can also try this same search on Google.

Use SiteMesh to decorate multiple webapps

Did you know it's possible to decorate multiple webapps with the same SiteMesh decorator? I learned how to do this from the SiteMesh mailing list:

  • Put sitemesh.jar in your container's classpath. You could put it into each webapp's WEB-INF/lib, but it looks like there's problems with that.
  • Create and deploy a webapp that contains the common decorator.
  • In each webapp's decorators.xml, add a "webapp" attribute to point to the webapp you deployed in Step 2.
    <decorators>
        <!-- load decorator from a different web-app deployed in the server -->
        <decorator name="main" webapp="some-other-webapp" 
            page="/decorators/main.jsp">
            <pattern>/*</pattern>
        </decorator>
    </decorators>
    

Try to do *that* with Tiles. ;-)

Posted in Java at Apr 12 2005, 10:05:19 AM MDT 12 Comments

More Tapestry+Ajax Components

Tacos is "library of useful Tapestry components", created by Viktor Szathmary. Today, he published a new release with support for Partial Page Rendering and Partial Forms. I especially like that Viktor incorporates the Fade Anything Technique as part of the components. Even better, these components work fine with JavaScript turned off. Well done Viktor! Too bad I can't use Tapestry at my day job. :(

Posted in Java at Apr 10 2005, 11:41:47 AM MDT 5 Comments

Maven 2 Alpha - looking good!

I saw that the Maven 2 Alpha was released today and decided to give it a spin. The two features in Maven 2.0 that look compelling to me are 1) speed and 2) transitive dependencies. I've been using Maven 1.x on my current project since January and I still don't like it. Why? It's dog slow on my PowerBook (but tolerable on my Windows box) and you have to specify a shitload of dependencies when developing an app with Struts+Spring+Hibernate.

Maven 2 looks good, and it does seem to startup as fast as Ant (at least on Windows). Just typing "m2" completes in about a second, and so does typing "ant". Typing "maven" takes about 3 seconds (even though it reports it only took 1 second). I look forward to seeing Maven 2 evolve. I wonder if we should rewrite our POMs for Maven 2 (we current have 11 sub-projects)? We'd probably be a pretty good test-bed, but I don't think Maven 2 supports all the 1.x plugins - does it?

I doubt I'll use Maven 2 with Equinox or AppFuse this year - mostly b/c I don't expect it to be released until 2006. I do like the looks of Ivy and I've considered re-writing AppFuse's monstrous build.xml file using JAM. If I were to use Ivy, I think I'd still release with all JARs in a local "lib" directory. The nice thing about Ivy is it would give users the option of checking JARs into source control (currently, it's required).

Even after using Maven for several months, I still like local JARs better than downloading. It does make a lot of sense in a multi-project environment though.

As for JAM, I don't like it for two reasons: 1) it uses the non-transitive dependency listing like Maven 1.x and 2) it requires you install JAM and set a $JAM_HOME. I'd prefer to keep AppFuse to one build tool - Ant or Maven (or both).

I suggested a large refactoring of the build process (and collapsing of the source trees) for AppFuse 1.9, but it was rejected by users for the most part. Their opinion: the build process works great, we like it - work on other stuff that's more important (code generation, tools support, etc.). Another thing that's suprised me about AppFuse users is the relatively small number of folks that have requested support for appservers other than Tomcat. To date, I don't think I've had a single Resin or Orion request, but I've had plenty of WebLogic, WebSphere and Sun App Server requests. The most compelling reason to use JAM for building/deploying/testing AppFuse is for its server support, but if I don't need it, why add the complexity?

I guess some things just work, and there's no reason to fix them if they aren't broken. Maven 1.x is not one of those things IMO. It's good to see the improvements coming in Maven 2.

Posted in Java at Apr 08 2005, 01:52:10 PM MDT 4 Comments

Cool Web Cam

A co-worker pointed out a pretty cool webcam today. It's called the Cupola Cam and it displays live shots from a camera in Littleton, Colorado. The coolest part is you wait in a queue for full-control of the camera, and then you can move it around to look at everything. Nice use of Java technology too (it's an applet).

Posted in Java at Apr 08 2005, 08:23:29 AM MDT 1 Comment

Useless Statistic

Speaking of statistics, here's some useless ones:

The first stat is pretty useless, but the 2nd is pretty cool considering there hasn't been a release since December.

Posted in Java at Apr 08 2005, 06:16:19 AM MDT 5 Comments

Open Source CMS based on AppFuse

If you're looking for AppFuse examples or a Java-based CMS (Content Management System) - you might want to checkout AtLeap.

Blandware AtLeap is a multilingual free Java CMS (Content Management System) with full-text search engine. Blandware AtLeap is a framework which allows you to rapidly start your own Web application.

The screenshot looks pretty cool. According to Andrey Grebnev (the project's owner), this project is based on AppFuse 1.5 with pieces from 1.6.

Posted in Java at Apr 05 2005, 02:54:52 PM MDT 1 Comment

Upgrading to Spring 1.2 RC1 and Hibernate 3.0

I spent an hour or so on Friday upgrading Equinox and AppFuse to use Spring 1.2 RC1 and Hibernate 3.0. The upgrade for AppFuse was relatively painless, but the upgrade for Equinox failed. Equinox uses HSQLDB version 1.7.1. The main reason I use the 1.7.1 version is to avoid the infamous "lock exception" that the new HSQL version throws in standalone mode. With version 1.7.1, it seems you could have more than one connection open to the file-based database w/ no problem. I really like this feature in 1.7.1 b/c it means you can run the app in Tomcat and browse the database at the same time.

So what's the problem? Why can't I just use Hibernate 3.0 with HSQL 1.7.1? The problem is I like using the following setting as part of my "sessionFactory" bean:

<prop key="hibernate.hbm2ddl.auto">update</prop>

This setting will update the schema when you change mapping files, but otherwise leave the data intact. Furthermore, it'll actually create the tables if they don't exist. Not so with Hibernate 3. With Hibernate 3, using "update" doesn't create the tables. Of course, upgrading to a newer version of HSQL fixes the problem, but then I get the lock problem. My eventual solution will probably be to hack Hibernate or HSQL, but for now I just won't upgrade Equinox. Another solution might be to look at some other embedded databases. Of course, I could also require users to install a database to run Equinox - but I like having the "no setup required" feature.

Regardless of the problems I experienced with HSQL and Hibernate 3, upgrading AppFuse was pretty painless. Here's the set of instructions I sent to the mailing list:

  1. Download Hibernate 3.0 and Spring 1.2 RC1.
  2. Create a lib/spring-1.2-rc1 and put the following files in it (NOTE: spring.jar now contains aopalliance.jar):
        acegi-security-0.8.1.jar
        commons-codec.jar
        ehcache-1.1.jar
        license.txt
        spring-mock.jar
        spring.jar
  3. Create a lib/hibernate-3.0 and put the following files in it:
        hibernate3.jar
        lgpl.jar
        lib/antlr-2.7.5H3.jar
            antlr.license.txt
            asm.jar
            c3p0-0.8.5.jar
            c3p0.license.txt
            cglib-2.1.jar
            dom4j-1.5.2.jar
            jta.jar
            jta.licence.txt
            oscache-2.1.jar
            swarmcache-1.0rc2.jar
  4. Change the versions for Hibernate and Spring in lib/lib.properties. Also, change the hibernate.jar property to reference hibernate3.jar instead of hibernate2.jar.
  5. In build.xml, change the "package-web" target to include all the Hibernate JARs instead of just specific ones:
    <lib dir="${hibernate.dir}/lib" includes="*.jar" excludes="jta.jar"/>
  6. Change web/common/taglibs.jsp to use uri="/oscache" for the oscache taglib.
  7. Search for "net.sf.hibernate" and replace it with "org.hibernate".
  8. Search for "orm.hibernate" and replace it with "orm.hibernate3" (for Spring).

The major difference for Hibernate is you no longer need odmg-3.0.jar, but you do need asm.jar and antlr-2.7.5H3.jar. Let me know if you find any issues with these instructions. You could also just download AppFuse from CVS.

NOTE: The CVS version of AppFuse has an XDoclet version that only supports generating Hibernate 2.x mapping files. I believe there is support for Hibernate 3 in XDoclet's CVS - but I haven't had a chance to upgrade yet.

Update: Here's more on the HSQL bug that's not really a bug (according to a comment on the post). Regardless of whether it's a bug or not, it'd be nice to have the 1.7.1 behavior as an option - it's a great feature for get-started-quick apps like Equinox.

Posted in Java at Apr 03 2005, 06:52:52 PM MDT 9 Comments

RE: Going to work for Microsoft

You know you're good when your April Fool's joke gets picked up by a major news site.

With a fair bit of attention being given to using older Web technologies to create new Net applications, Microsoft is apparently looking to make sure it is staying up to date. The company has hired Java specialist Matt Raible to help make sure that Ajax is in Visual Studio's cupboard of tools.

:-)

Posted in Java at Apr 02 2005, 08:47:23 AM MST 8 Comments

Going to work for Microsoft

I received a fair amount of feedback from yesterday's post. A few folks sent e-mails asking me to partner with them to start a company, and a couple of companies called claiming they could set me up with my "dream job". The call I didn't expect was from Ashwin Karuhatty of Microsoft. Ashwin is the Developer Evangelist that invited me to the Developer Summit in Redmond a few weeks ago.

He offered me a position with Microsoft being a Developer/Evangelist working on the Visual Studio Team to integrate Ajax-ish components into .NET. I've been doing a lot with Ajax stuff lately, and really enjoying myself, so I've accepted the position. I just submitted my two-weeks notice to my Project Manager and will become a Microsoftee on April 11. For the first 2 months, they're going to let me work out of my house, with an eventual move to Redmond, WA. I'm pretty excited about the move - both my parents and my sister live w/in 4 hours of Redmond. Sure it rains a lot there, but having family so close should make up for that.

If you have any suggestions for Ajax Components in Visual Studio, let me know!

Posted in Java at Apr 01 2005, 05:56:41 AM MST 35 Comments

Ajax components with Tapestry

From the Tapestry User Mailing List, I discovered a cool example of integrating an Ajax component in Tapestry. The code needed to add it looks nice and easy too. Hopefully this will set the groundwork for a plethora of Tapestry/Ajax components.

Posted in Java at Mar 25 2005, 10:06:54 AM MST 4 Comments