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 "&amp". 294 entries found.

You can also try this same search on Google.

AppFuse 1.1 Released!

This biggest feature in this release is Documentation. I finally found the time to write up some Tutorials on developing with AppFuse. They're on my wiki and also in the "docs" folder of the binary and source downloads. In writing this documentation, I went through almost all aspects of the code with a fine-tooth comb made sure it's doing what I want it to do (lots of improvements from this).

I was finally able to get things working with J2EE 1.4, which basically involved removing j2ee.jar from my MailUtil's classpath and just including activation.jar and mail.jar. If you're not there yet, simply change the paths for activation.jar and mail.jar in properties.xml (look for common.compile.classpath). You can use j2ee.jar instead of mail.jar and activation.jar with J2EE 1.3 and 1.4 B2.

I was also able to get all unit tests to pass on Tomcat 5, and the "setup-tomcat" target now supports Tomcat 5. I wasn't able to get "Remember Me" to work - see the tomcat-user mailing list for more details.

Included in this release are upgrades to Hibernate 2.1 Final and Display Tag 1.0 B2. For a complete changelog, view the README.txt in CVS.

For more information on AppFuse, check out the AppFuse Wiki Page or FAQ.

Posted in Java at Dec 12 2003, 02:32:25 PM MST

[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

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

Struts Menu 2.0 Released!

This release is a significant refactoring of the 1.x codebase. The source and site is now built using Maven. Menus can now be defined using Velocity templates and support has been added for looking up dynamic values. This means that if you have ${variableName} in your menu-config.xml (in a link), the tag library will look in all scopes for a variable with the name "variableName". The example app has been updated to improve documentation.

IMO, the Velocity templates is huge because it means "if it's possible with HTML" - it's possible with Struts Menu.

Changes (from http://struts-menu.sourceforge.net/changes-report.html):

- Renamed package structure to net.sf.navigator.
- Added support for using Struts' actions and forwards for links in menu-config.xml.
- Added support for using dynamic variables in menu-config.xml.
- Updated build process to use Maven for building/deploying.
- Refactored to use Velocity and allow dynamic variable substitution.

You can read the nitty-gritty details about the Velocity enhancements, check out the sample app or download this tag library for yourself.

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

AppFuse 1.0 Released!

I feel this release deserves the big 1.0 designation because it is an up-to-date representation of my learnings and my perceived best practices in building web applications. Of course, as I learn more, I will continue to push out new releases.

In this release, I did a lot of refactoring and enhancements to existing features. The DAO and Manager interfaces are no longer tied to Struts or Hibernate. Hibernate's Session object is now passed as an argument into Manager and DAO constructors, rather than method signatures. The DAOFactory was refactored by Bear Giles to use reflection to instantiate Hibernate DAO's. Now, if you add a new DAO, you don't have to edit DAOFactory and DAOFactoryHibernate. To insantiate a new DAO, the code is now:

LookupDAO dao = (LookupDAO) DAOFactory.getInstance(conn, LookupDAO.class);

...where conn is a connection object retrieved from ServiceLocator or ActionFilter. When you add new POJOs, you still have to add them to ServiceLocator (for JUnit tests) and hibernate.cfg.xml, which is kindof a pain. I'd like to figure out a way to tell Hibernate to just look in appfuse-ejb.jar.

<tangent>
I still don't have a Factory for Managers, and I don't know that there's a need for one, but it's something I might add in the future. Managers are still creating using: LookupManager mgr = new LookupManagerImpl(ActionFilter.getConnection());. One thing I've been thinking about is the ability to switch webapp frameworks - kindof like you can do with Persistence Frameworks and the DAO Pattern. It'd be cool to add a way to switch (at build time) to use WebWork or Tapestry. Maybe by replacing values for the controller in web.xml. It'd probably be a pain since I'd probably have to create new JSPs for the new frameworks - but it would probably be a great learning experience.
</tangent>

The Remember Me feature has been refactored so the username and password cookies are only available under the /appfuse/security url-pattern. I also changed the posting to "j_security_check" in LoginServlet from response.sendRedirect to an HTTP POST, using Jakarta Common's HttpClient. The reason I have a LoginServlet vs. just using action="j_security_check" in my <form> is to encrypt passwords.

I've developed 3 different applications using AppFuse (struts-resume is one of them), and I have found that it's a pain to upgrade to new versions of AppFuse. Because of this, I don't recommend upgrading unless you really need to. I will be upgrading struts-resume to AppFuse 1.0, but I doubt I'll upgrade it to any future AppFuse releases - it's just too much work for not much reward.

Posted in Java at Nov 30 2003, 06:35:24 PM MST Add a Comment

AppFuse won't work with J2EE 1.4 Final

I don't know why, but AppFuse's MailUtilTest won't run with J2EE 1.4 Final. It works fine with 1.4 Beta 2.

Posted in Java at Nov 26 2003, 10:09:12 PM MST Add a Comment

SSL switching with web.xml

Craig McClanahan explains how to force SSL using settings in your web.xml. Pretty cool stuff, I guess I didn't realize that you could have a <security-constraint> without having an <auth-constraint>. This sure seems a lot more straight forward than using SSLExt or a custom tag library.

Posted in Java at Sep 15 2003, 11:58:55 AM MDT 2 Comments

The wait begins...

Expected delivery date: August 8th

  • 3.06GHz Intel Pentium 4 Processor w/ HT
  • 512MB PC2700 333MHz DDR RAM SODIMM
  • 512MB PC2700 333MHz DDR RAM SODIMM
  • 60GB 7200rpm Ultra ATA Hard Disk Drive (Hitachi 7K60)
  • Toshiba SD-R6012 1X DVD-R/W Drive w/ DVD Recording Software
  • ATI Radeon 9000 Mobility 64MB (w/ TV Out)
  • Built-in 3D Sound System w/ 5.1 Channel S/PDIF
  • Integrated V.92 56K Fax/Data Modem
  • Integrated Realtek RTL8139C Fast Ethernet Controller & 802.11b Wireless LAN
  • Aviator ZX7 in Silver and Graphite
  • 17" WXGA WIDESCREEN High Contrast Active Matrix LCD Display
  • Internal Bluetooth Module
  • Internal Subwoofer Speaker Module
  • MS Windows XP Professional SP1 CD & Manual Pre-Installed & Configured
  • 3Year 24/7 Toll-Free Tech Support Platinum Service & Lifetime Support
  • Guaranteed shipment within 10 days of order

#1 reason to switch back? Speed, and lots of it. ;0)

Posted in General at Jul 25 2003, 04:26:43 PM MDT 12 Comments

Hypersonic vs. Alienware

As I mentioned a couple days ago, I'm looking to purchase a new laptop. Why? Because I might get a contract that requires me to provide my own machine. It's happened before, and on this contract my machine sucked when I started. Sure I could use my slow-as-molasses Powerbook (667 MHz, 1 GB RAM), but I'd rather buy a Windows laptop. Besides, it's not about the machine's productivity as much as my productivity on it. I'm faster on Windows, so I should buy a Windows machine to pack to client sites. Mini-Me (the Powerbook) will be adopted by Julie, where I'm sure it will be in good hands. I still plan on using it a fair amount, but she's been known to tell me "Keep your damn hands off my computer!" ;-)

So, to do some more research on the Alienware Area-51m and the Hibersonic Aviator ZX7, I sent each company an e-mail. The e-mail was pretty simple, and I just switched the order of things for each company:

I'm looking to purchase a new laptop and right now I'm down to making a 
decision between your 51m (http://alienware.com/system_pages/area-51m.aspx) 
and Hypersonic's ZX7 (http://hypersonic-pc.com/ZX7).  Can you tell me why 
I should buy your product over Hypersonic's?

About 10 hours later (a little slow, don't you think), I received the first reply - from Hypersonic.

Fair enough, Hypersonic has a Customer Satisfaction rating of 7.79, but less than 20 reviews in the last 6 months. Alienware, on the other hand, has a 7.78 Customer Satisfaction Rating. So they're very close there. However, on the lifetime rating, Alienware is 7.63 (275 reviews) and Hypersonic is 9.17 (48 reviews). When I first started this comparison, I liked the Alienware machine better because it has 802.11g and because I've heard of the company before. I'd never heard of Hypersonic, but the ZX7 did have built-in bluetooth, a 17" monitor and a (supposedly) kick ass sound system. I don't travel, and if I do, it's usually for pleasure and I can always take Mini-Me.

So I replied to the Hypersonic e-mail above.

And I recieved a reply 6 1/2 hours later:

All good answers to my questions. So I'm feeling pretty good about Hypersonic at this point, and still haven't heard from Alienware. And then I got a response from them, almost 30 hours after I sent my original e-mail. It took about 4 sentences for me to realize they were just sending me a standard form-letter, filled with arrogance.

In the end, both still sound good, but I like the Bluetooth, 17" screen and sound system on the Hypersonic. I decided last night that I should probably buy this now, instead of waiting for a new contract. I want one too bad to pass up the opportunity (and it's a business write-off). At the new house, Raible Designs' HQ will be in the basement, so we'll be relying on our 802.11b network to surf the web, check e-mail, etc. from upstairs. I moved to two computers years ago because Julie and I would fight over one. It's bound to happen again unless we have two wireless laptops. How's that for justification?! I'm saving our marriage! what a good husband

Posted in General at Jul 25 2003, 08:53:20 AM MDT 4 Comments

.NET's built-in tools and controls generate invalid XHTML and CSS

Mails we've received, forum discussions, and recent Splorp posts all complain that .NET's built-in tools and controls generate invalid XHTML and CSS. The workaround? Don't use the built-in tools and controls. The value of .NET without those built-in tools and controls? Not much.

.NET is Microsoft's platform for web services. It derives it power from XML, a web standard. A product based on one open standard should support others, not break them.

When Microsoft does the wrong thing, developers feel helpless. You are not helpless. You have a choice of development platforms. [Zeldman]

(emphasis mine) The choice is simple, use J2EE ~ where the flexibility is free! wink

Posted in Java at Jun 20 2003, 01:14:42 PM MDT 3 Comments