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 "struts". 749 entries found.

You can also try this same search on Google.

Back in Denver

We arrived back in Denver last night after a nice winter-weather week at the cabin. It's nice to be home and sleep in our own bed. Julie agrees and would add that it's nice to have indoor plumbing again. I hate the fact that I have all this e-mail to plow through and respond to. I like the fact that I'm super motivated to learn new stuff. So motivated that I ordered a few books from Amazon. I hope I can suppress my desire to play on the computer (i.e. blogging, open source) and just learn for the next month or so. On my agenda: Spring, WebWork and a Java 1.4 Programmer Certification. 1 month, 2000 pages - if I can restrain my internet addiction, it should be a breeze.

In other news, I'm pumped to see that IDEA is available for $249. My question is - does that give me a license for both a Windows and OS X install?

Posted in Java at Dec 27 2003, 01:49:15 PM MST 7 Comments

AppFuse 1.2 Released!

This is primarily a bug fix release. Here are the details from the release notes:

  • Backed out Http Post for Remember Me. It was not redirecting user to the page they originally requested. Using reponse.sendRedirect does send the user to the proper location. Turned on password encryption (SHA) to protect any passwords that end up in log files. Turned off encryption in Tomcat.
  • Changed configuration parameters in servlet context to be in a hashmap.
  • Improvements to StrutsGen tool to generate list screen as well and to fill in more missing elements.
  • Changed to close Hibernate session when object not found in BaseDAOHibernate.
  • Fixed bug in UserAction.save: when creating a new user, role defaults to "tomcat" regardless of what the user chooses.
  • Dependent packages upgraded:
    • Hibernate 2.1.1
    • Struts Menu 2.1
    • WebTest Build 379

Download (~11.9 MB for src, ~4.3 MB for bin) or View Release Notes.

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

Posted in Java at Dec 21 2003, 08:07:27 AM MST

Struts Menu 2.1 Released!

This release is primarily a bug-fixing release, but I also added a couple of enhancements. The first is the variable substitution now uses JSTL, which means two things.

  • You must use a JSP 1.2 container and include the standard tag library in your project for this to work.
  • You can now use "dot" notation in your variables. For example, ${user.name} will now work.

Other enhancements include added support for standalone menus in the Explandable List Menu (no items, just a <Menu>) and highlighting of the last menu clicked.

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

  • Changed dynamic variable feature to use JSTL's ExpressionEvaluator. To substitute request parameters, you must use ${param.paramName}, rather than just ${paramName}.
  • Fixed UseMenuDisplayerTag to allow config in menu-config.xml to override the default (as documented).
  • Fixed DisplayMenuTag to continue rendering menu items when Action or Forward lookups fail.
  • Added support for highlighting the last menu selected in the Expandable Menu.
  • Added support for standalone links/menus (no children) to Expandable Menu.
  • Added struts-menu.tld to the binary distribution.

A complete CVS changelog can be found at: http://struts-menu.sourceforge.net/changelog-report.html.

Demo: http://raibledesigns.com/struts-menu
Download: http://tinyurl.com/2aq6k

I realize the JSTL stuff could backfire if users are stuck on an old container. Hopefully, you can simply continue using 2.0 if that's your situation.

Posted in Java at Dec 20 2003, 08:34:56 AM MST 1 Comment

JSF 1.0 - Proposed Final Draft Spec and Beta Reference Implementation

From Craig McClanahan on the struts-dev mailing list:

I'm pleased to announce that the Proposed Final Draft version of the JavaServer Faces 1.0 Specification, and a corresponding Beta release of the Reference Implementation, is now available at:

http://java.sun.com/j2ee/javaserverfaces/download.html

Please send any feedback and comments strictly about JavaServer Faces to [email protected].

I'm also finishing up an update to the Struts-Faces Integration Library, and will be making it available (via nightly builds) very soon. Feel free to ask any questions about how to use Struts and JavaServer Faces here on the STRUTS-USER list.

Sweet! It's almost time to try JSF in a webapp. I'd love to offer a web layer for AppFuse in JSF. But then again, I'd like to offer WW2 and Tapestry options too. I just need to figure out how to give the developer that option when building. The main problem is it'd probably be a pain in the ass to maintain all 4 implementations. But then again, that's what unit tests are for!

In other news, a nice patch has been proposed for the DisplayTag that would give it JSTL's EL support.

Posted in Java at Dec 20 2003, 05:40:02 AM MST 1 Comment

[ANNOUNCE] Ant 1.6 Released!

Big news baby - the best Java tool in the world has a new release. I don't know that I'll use any of the new features (such as antlib, macrodef, presetdef, ssh tasks), but I do love to upgrade. Downloading now...

Later: It looks like Canoo's WebTest is not compatible with Ant 1.6. Reverting back to 1.5.4.

C:\Source\appfuse\test\web\web-tests.xml:29: Task must be of type "Step": invoke at 
C:\Source\appfuse\test\web\login.xml:1:  is of type org.apache.tools.ant.UnknownElement

Line 29 is: <canoo name="login">. I've notified the webtest mailing list, hopefully there will be a resolution shortly.

Posted in Java at Dec 18 2003, 08:17:01 PM MST 3 Comments

Struts 2.0

There's a flurry of e-mails about Struts 2.0 dancing around on the Struts Developers Mailing List. Looking at the Overview or the ReadMe, you can see that there's some major (revolutionary) changes being discussed. The Struts Bandwagon is alive and well. The proposal is called Jericho (since it tries to tear-down the walls within the Struts architecture) and proposes to open-up Struts by:

  • Declaring interfaces for all core components.
  • Providing working base implementations for all core components.
  • Encapsulating alll path references within "Location" objects (fka ActionForwards) and referring only to Locations from all other objects.
  • Providing additional extension points from core components so that the "Inversion of Control" pattern is fully realized. (e.g., a populate method for the FormHandler.)
  • Providing "POJO" signatures that encapsulate servlet/portlet behavior so that applications can be freed of servlet/portlet semantics, if so desired. This strategy would also be applied to optional packages like Validator and Tiles.
  • Retain optional access to servlet/portlet objects so that applications can be free to do whatever they need to do.

Also under consideration - adding Struts Menu to the core. Good stuff my friends, good stuff.

Also noticed on the mailing list - Tomcat is not the Servlet/JSP reference implementation (news to me):

There is a (mis)conception, for example, that Tomcat is the RI for the servlet and JSP APIs. That is not the case -- the official RI is the "J2EE SDK" available at http://java.sun.com/j2ee/1.4/download-dr.html. It happens to *include* code from Tomcat, but this is the real RI.

Posted in Java at Dec 18 2003, 11:24:32 AM MST 4 Comments

Hibernate's AdminApp - a demo of WW2 and Hibernate

After looking at Hibernate's AdminApp, as well as other WW2 apps - I've noticed something. WW2 developers don't seem to give a rats ass about referencing their POJOs in their Actions, or using Hibernate directly in their actions. At first glance, I think to myself, "boy that sure makes things easier." But then again - doesn't that tightly couple your web layer to your persistence layer?

I can understand the POJO reference in Actions - I'm about to give up on doing a parent/child relationship with Hibernate where the children are converted to ActionForms and then converted back (Hibernate loves to tell me "a different object with the same identifier value was already associated with the session: 1").

It would be SO much easier (with this particular problem) if I could just toss up POJOs to my view. The thought of importing "persistence.User" into my Action makes me cringe though. I don't know why, it just does. I need to get out of this patterns mindset I've been in for the last couple of years and get back to what really matters - simple, easy to learn, and fast to develop. I'm tired of banging my head against the wall with Struts and Hibernate.... I've been doing it for two days. It's not Hibernate, and it's not Struts, it's me... (thud, thud, thud).

Posted in Java at Dec 17 2003, 02:35:09 PM MST 15 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

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

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