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.

RE: Display Tag Library - donate it!

Shortly after posting my donate plea yesterday, I sent a similar message to the struts-user group and cc'd Ed Hill. Lo and behold, I got the following reply from Ed:

I would gladly support any efforts to continue (restart) development on my taglib. I've reserved some sourceforge space myself, but have not moved things over yet. Alas, it currently does what I need it to do and other priorities have well taken priority.

If someone steps up to volunteer to be the pumpkin keeper (sorry, Perl cultural reference), I will do what I can to help (redirect my web site on my personal machine to the new home, etc...)

I don't subscribe to the struts-user list, so if you would please forward this on to encourage any discussion, I would appreciate it.

Thank you!

Cool, I'll see what the struts-user list says today (I only subscribe to this 150+ message-a-day list at work), and see if I can find a pumpkin keeper.

Posted in Java at Jan 23 2003, 04:51:45 AM MST Add a Comment

Display Tag Library - donate it!

If you need a slick JSP Tag Library for sorting and paging data, the display tag library is a great library to use. However, it's got issues - just like any piece of software. I've fixed a couple on my own, but it definitely needs some work - and integration with Struts (i.e. for getting messages, or referencing forwards) would be awesome.

The problem is that Ed Hill doesn't seem to be working on it anymore - and there hasn't been a release since May 2002! Since I do have the source it wouldn't be hard to create a project at SourceForge for it. It would be great to get some input from Ed though. Last year, I think he even did a presenation on JSP Taglibs at Java One! I know there's lots of Struts developers that use the <display> tag - I wonder if they'd be interested. I think I'll send this to the mailing list (and cc Ed) and see what happens.

Posted in Java at Jan 22 2003, 10:01:36 PM MST 1 Comment

Commons Lang: StringUtils

My new favorite method is the equals method on Commons Lang's StringUtils class. It takes the check for null out of your logic and can help you create cleaner code. Before using it you might have to write something like this:

if (request.getParameter("checkbox") != null 
    && (request.getParameter("checkbox").equals("true"))) {

With StringUtils.equals(String, String), you get a little less coding:

if (StringUtils.equals(request.getParameter("checkbox"), "true")) {

If you're using Struts or some other library that already depends on commons-lang, why wouldn't you use it? Possibly performance reasons, but I doubt it causes much of a hit.

Posted in Java at Jan 22 2003, 06:05:51 AM MST 4 Comments

Using XDoclet to generate your validation.xml?

Are you using XDoclet to generate the validation.xml file for Struts' Validator Framework? If you're using Struts and you're not using the Validator - you should be IMO. It makes both client-side and server-side validation soooo simple. Using XDoclet to generate the key file (validation.xml) makes implementation a piece of cake. We have Erik to thank for this wonderful addition to XDoclet. Much appreciated sir!

I'm guessing that not many people are using this feature b/c it works kinda funky right now. It disregards the order of your properties in your ValidatorForm and generates entries in alphabetical order. This is great except the client-side (JavaScript) piece of the Validator uses the order to determine which fields to validate first. This has caused a slight headache for me on my project, so I fixed it. Checkout XDoclet's JIRA for the bug and the patch. Hopefully it'll get committed soon, but in the meantime, I'll continue using my patched Apache module that allows me to generate ActionForms from POJOs and orders my validation.xml correctly.

Posted in Java at Jan 21 2003, 10:12:23 PM MST 6 Comments

xPetstore v2.2 Released!

I haven't looked at it much or used it at all, but it sounds good.

xPetStore is a WODRA (Write Once, Deploy and Run Anywhere) implementation of Sun PetStore application based on the following opensource tools/framework:
- XDoclet
- Struts
- SiteMesh

If you're writing web applications (and you're using Struts or Webwork) and you're NOT using XDoclet (or one if it's derivatives - i.e. Middlegen), you're wasting your time (IMHO). Of course, I also believe that if you're not using Ant to build your java-based project, you're really wasting your time.

Hmmm, while over at the WebWork site, I stumbled upon this Eclipse + Resin + WebWork + Hibernate tutorial. I don't know if it's such a good idea to call your persistence layer directly from your servlets is it? Shouldn't that be in a Business Delegate - or am I losing focus of KISS and trying to follow too many patterns? Patterns give me more opportunities for Unit Testing. The only way to test this servlet would be something like Cactus, right? As always, to each his own... ;-)

Posted in Java at Jan 19 2003, 10:24:25 PM MST 1 Comment

Struts 1.1 is on its way

Struts is definitely due to release 1.1 very soon. I've been using nightly builds for the last year - all very stable. There was a vote posted to the struts-dev mailing list tonight on releasing 1.1b3 as 1.1RC1 and it looks like it will pass. According to the committers, I'd expect an RC2 (with bug fixes only) in early February and a final release at the end of February. Luckily, all my clients have been confident in me and have not cared what version of Struts I was using - just that it worked. When I've found problems, I've patched them - good ol' open source. I haven't found any issues in quite some time - and when I have, the committers usually fix them the same day. Gotta love that kind of customer service. Show me a company that can do that with commercial software and I'll be impressed.

Posted in Java at Jan 17 2003, 11:21:11 PM MST Add a Comment

ConvertUtils and Indexed Properties

Now I have a new issue with ConvertUtils. I've resorted to creating a Form, rather than generating one from a POJO using XDoclet. In this form, I've added indexed properties, so that properties can be accessed and retrieved with an index.

So now I have getPropertyList() and setPropertyList(ArrayList) on my form. I also have getPropertyList(int index) and setPropertyList(int index, Property prop). However, when I add these methods, my ListConverter.convert method quits working! So now when I call:

BeanUtils.copyProperties(cmcfForm, c);

it returns null for the ArrayLists on my form? I don't get why, esp. since the methods have different signatures. It works fine if I remove the indexed methods.

Update: I solved my problem by removing the getPropertyList(int index) method. I had to add some funky stuff in the reset method of my Form to ready it for Struts auto-population, but it works. Specifically, I had to create an ArrayList for my child, and then populate it with empty child forms. This allowed setPropertyList(int index, Property prop) to work as expected. FYI - I don't think this is a Struts thing, but how webapps work. Anyway, I'm happy with how this works - as I know have indexed properties working for display and saving. Now I have to figure out saving parents/child in Hibernate (I've done it with struts-resume and MySQL, just not with Oracle). I've posted my problem to the Hibernate mailing list if you're really interested in my problem.

Next up, indexed property validation using the Validator. Should be oh so fun...

Posted in Java at Jan 16 2003, 11:03:31 AM MST Add a Comment

Struts and XHTML

There's an interesting thread over on the struts-dev mailing list. It started out debating whether to use comments (<!-- -->) or CDATA (<![CDATA[ ]]>) to hide Javascript code. I think this discussion was started by something I suggested yesterday on the struts-user list. Craig McClanahan had this to say:

What I also don't understand is why anybody is worried about generating XHTML markup for the current generation of popular browsers, none of which implement it correctly ... but that's a different issue.

What do you think? I think the best reason for generating XHTML (at this point) is that adding an XHTML doctype at the top of a page makes IE and Mozilla "snap" to standards-compliant mode. Rather than writing tweeks for each browser - the same code works in both. This is a real lifesaver when doing CSS positioning and DOM-based Javascript in pages. It's also really nice to be able to validate code.

Posted in Java at Jan 16 2003, 06:31:44 AM MST Add a Comment

Java-based Forums and Free Software

I've always thought that Jive was a great product, especially when I first found it. It was free then, now it costs $450. It it worth it - yes! But it's tough to recommend this to clients when there are free alternatives. Here's one courtesy of Mathias Bogaert:

Discovered mvnForum, a JSP 1.1/Servlet 2.2 based forum application (GPL), which looks kinda neat...check out their demo.

I have this same problem at work. I told my project manager that I knew of three Bug Tracking systems: Bugzilla, JIRA and Scarab. I currently use Bugzilla for a client and I'm familiar and happy with it. I also use JIRA for Roller and XDoclet, and think it's a great piece of software. Even though I've never used Scarab, I installed it thinking that it was better than Bugzilla, and also b/c the guys from Apache are moving to it. After wrestling with the setup a bit, I got it working. Scarab's main goal seems to be ease of setup - they should take some lessons from Atlassian. Actually, we all should - I had JIRA downloaded/installed/running in under 5 minutes. Anyway, back to the point - I showed Scarab to my project manager and he went off to investigate. An hour later he came back and said he just didn't get it. I didn't have the bandwidth to investigate, and since I've never used it - we're going to use Bugzilla. I prodded and poked and tried to get JIRA; I even downloaded and installed the 30 day trial. No joy, free is what they want.

Speaking of free software, I'm inspired to do some work on Roller - especially with all the stuff that Dave and Lance have done lately. Also, my RSS feed seems to refresh old stories in Radio's aggregator, so I'm due for an upgrade. I hope to add some of the following features over the next week or so (when do we release 0.9.7?):

  • Encypted password support - both programmatically and using Tomcat's Realm. The way I've done this in the past is to create a LoginServlet that my form-based authentication maps to. This servlet does the encryption and redirects to j_security_check. I'll also include an option for an SSL-based login. Both password encryption and SSL will be off by default - and changes will be allowed in web.xml.
  • Remember Me. You're gonna love this - I sure do.
  • Remember Me in Comments. It's definitely needed if you do a lot of commenting. The question is - do you automatically do it - or allow users to say "forget me." Auto is easiest.
  • Add support for e-mailing comments and subscribing to comments when posting a comment.
  • Dig into XDoclet and make the upgrade to 1.2 Beta 2 - fixing the bug we have with Castor. I hope I'm familiar enough with how XDoclet works to make this happen. I looked through the code today and it should be working from what I can tell.
  • Upgrade to Struts 1.1 Beta 3.

Sheez! I just created a whole bunch of work for myself didn't I? Hmmm, now how do I schedule all this and get it done in a week? A late night, an early morning, a weekend? I can't decide... Oooh, here's an idea - Julie and Abbie are leaving for Florida next Thursday (I'm joining them Friday) - I could do it next Thursday night. Hopefully I can get it done sooner, but hopefully a lot of this can wait until then.

Posted in Java at Jan 15 2003, 09:47:48 PM MST 1 Comment

Found: Hibernate based personal image server

I found the pixory personal image server on the hibernate-devel mailing list this morning. It looks like a regular web-based photo album, but seems to offer client side tools as well. You can checkout the screenshots if you want to get right to it.

Pixory is a personal image server based on Hibernate and HsqlDB.
-------------------------------
Pixory allows you to store your photos on your own pc but to access, compose into albums, and share them anywhere on the internet. It's your personal online photo sharing service, running on your computer using your broadband internet connection. Pixory is a client and a server, a lightweight web application for browsing photo collections on your hardrive; an album server to your friends and family or anyone on the internet. It simplifies accessing and organizing photo collections on your home network.

Today was a pretty awesome day in my development life. This morning started off great with the "remember me" feature, and I also implemented the Nested tag library from Struts. It was great - took me all of about 5 minutes to implement and get nested, indexed iterating of child objects in a form. I ended the day with disappointment as I tried to save this form. That's when I discovered that XDoclet wasn't generating getter/setters for my indexed getter/setters. I might actually have to put a form in my source tree to get this functionality. So far, all my ValidatorForms are still generated from POJOs, which Hibernate uses. Not all my POJOs are run though XDoclet -- some are generated using Hibernate's Reverse Engineering Tool. It actually seems to take less time to write the mapping file than to mark up the POJO with XDoclet tags. If you generate it with the RET, it's like taking candy from a baby.

Speaking of babies, I started to learn a new language tonight. I call it Abbie-blah - it consists of making grunts and groans and sticking your tongue out. I swear I had an intellectual conversation with Abbie - I had her smiling like you wouldn't believe. Fun times.

Posted in Java at Jan 14 2003, 09:40:12 PM MST 3 Comments