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.

JSP's Evolution

There's another interesting discussion taking place over on the struts-dev list again. Man, I'm glad I subscribed (again) to this list last week! It started out as a discussion of JSP vs. Velocity and Craig (McClanahan) provided an interesting evolution of JSP (and comparison to Velocity).

Velocity:
========

(Note -- it's assumed that the Customer collection has been stored in the
VelocityContext by some preceding business logic.)

  \#foreach $result in $results {
    <tr>
      <td>$result.ID</td>
      <td>$result.Name</td>
    </tr>
  }

JSP 1.1 (with Scriptlets):
=========================

  <%
    Customer custs = ...;
    for (int i=0; i < custs.length; i++) {
  %>
    <tr>
      <td><%= custs[i].getId() %></td>
      <td><%= custs[i].getName() %></td>
    </tr>
  <%
    }
  %>

JSP 1.1 (with custom tags):
==========================
(Note -- it is assumed here and in the following examples that the Customer collection has been stored by some preceding business logic.)

  <logic:iterate id="cust" name="custs">
    <tr>
      <td><jsp:getProperty name="cust" property="id"/></td>
      <td><jsp:getProperty name="cust" property="name"/></td>
    </tr>
  </logic:iterate>

JSP 1.2 + JSTL 1.0:
==================

  <c:forEach var="cust" items="${custs}">
    <tr>
      <td><c:out value="${cust.id}"/></td>
      <td><c:out value="${cust.name}"/></td>
    </tr>
  </c:forEach>

JSP 2.0 + JSTL 1.0:
==================

  <c:forEach var="cust" items="${custs}">
    <tr>
      <td>${cust.id}</td>
      <td>${cust.name}</td>
    </tr>
  </c:forEach>
</pre>

I can't wait for JSP 2.0 - it's going to make everything so much easier. Once again, we have exciting times for the Java world. With the power of JSP 2.0 and XDoclet, deadlines should be a non-issue. Now we just have to figure out the best way to use them, and the fastest way to pump out a Struts project. Wouldn't it be awesome if you you could add a new column to a table, build your project using Ant and XDoclet and whalla, all your classes are updated! That would be cool - and I think it's possible. Now I just have to figure out how - and fast!

Posted in Java at Nov 22 2002, 06:05:23 PM MST 6 Comments

Struts Logo Needed

Any of your designer-types want to contribute a logo candidate for Struts? They're looking for one!

Posted in Java at Nov 22 2002, 05:05:53 PM MST Add a Comment

JSP 2.0, Struts and Security

I've been asked to write some chapters in an upcoming JSP book that covers JSP 2.0 (JSR 152) and Servlets 2.4 (JSR 154). I'm thinking of doing a chapter on Struts and a chapter on Security. In the Struts chapter, I'd like to cover developing a Struts application using Ant, XDoclet and Middlegen - but I don't know if Middlegen supports Struts 1.1, nor if the generated JSPs can be modified to use JSP 2.0 syntax. I'd hate to spend a lot of time contributing to these projects to make my struts-based app work. So I'm asking you (the developers) what kind of app you'd like to see me develop?

For the Security chapter, I was thinking of developing an app that has form-based authentication, a Filter to look up the user's information, password encryption and an SSL login.

For the Struts chapter, I want to develop an app that developers can use to 1) learn about Struts and JSP 2.0 and 2) also has code they can use in their own projects. I'm torn because I really want to redo this photo album software (the site doesn't appear to be rendering images right now), but I want it to be useful. Hopefully by using XDoclet extensively, it doesn't matter what I write - the build and generation process will be useful.

My biggest hurdle to overcome in all this - it's due in 3 weeks! That should be a nice ball of stress that will keep me from sleeping night after night. Any advice or suggestions are welcome.

To see what JSP 2.0 is all about, check out the JSP 2.0 Early Access Release and here is a short and sweet article of changes.

Posted in Java at Nov 22 2002, 07:44:22 AM MST 3 Comments

The Future of Struts

There's an interesting discussion taking place on the struts-dev mailing list right now. Here's a couple excerpts:

I'd be really interested in your thoughts on the XDoclet work I've done, especially in the Struts Validator realm. I'm generating validation.xml completely, and also all the form bean definitions in our system. I also use XDoclet to process form beans for a one-time starter code generation of a JSP page (templated to our specific look and feel) for a specified form bean, as well as the resource properties that can be used as a starting point for the application resource properties for the field labels. Its amazing amount of generation just on the Struts-side of things, but we use XDoclet for even more than that too. [ Erik Hatcher ]
...
I think it is time to start packaging tools and generators with Struts to help the developer -- either as standalone packages included for convenience, or integrated into the architecture of the package. It would be interesting to explore how XDoclet fits in to this vision. [ Craig McClanahan ]

What exciting times! I can't wait to use XDoclet to generate the validation.xml file for Roller - should be a great learning experience. I don't plan on writing a Struts ActionForm again now that we have XDoclet. Also, I have an update on Roller and XDoclet: Dave found this problem with XDoclet and Castor. It will be fixed in XDoclet 1.2 beta 3. So we wait...

Posted in Java at Nov 20 2002, 09:51:01 AM MST Add a Comment

XHTML Strict and Forms

Did you know that with XHTML Strict, a <form> element can't have a name attribute? Actually, the only required attribute is action. But, if you do want to identify your form, then you have to use the id attribute. The problem with this is that many of us web developers are used to referencing a form (with Javascript) with document.formName. So as a service to my readers, if you do decide to XHTML 1.0 Strict, you will need to reference your forms (in Javascript) using one of the following syntaxes. For the sake of this example, pretend our form is named "webForm":

document.getElementById("webForm);
// assuming it's the first form on the page.
document.forms[0]; 
document.getElementsByTagName("form").item(0);

Of course, if you're trying to get the value <input> tag within your form, and that input has an id attribute, you can just get that using document.getElementById("inputId");.

You ask - what insired you to post this? Well, the Struts enhancement to produce XHTML-compliant code from the tag libraries. It was closed yesterday, and they seemed to have missed this - in other words, the <form> still has a name attribute. It'll be interesting to see how they resolve this. I'm hoping that Struts is not tied to the name attribute at all, and the fix just requires a bunch of fixes to Javascript that is written (by the tags).

Posted in Java at Nov 20 2002, 03:41:06 AM MST Add a Comment

BasicPortal

Dave mentions BasicPortal today. I've kept watch of this project, and I can't comment on it because I haven't downloaded and looked at the source. However, I do know that the original author of it, Vic Cekvenich of BaseBeans Engineering wrote the first Struts book. I was subscribed to the struts-user mailing list at the time, and this book got horrible reviews and a lot of do not buy warnings from developers. I have seem Vic advertising many mini-training sessions across the country re: Struts and BasicPortal though, and apparently those have been really good. He was probably just rushing his book to market too fast and you know what happens when you rush a product and it needs further development.

Posted in Java at Nov 19 2002, 03:14:14 PM MST 1 Comment

XDoclet 1.2, the migration continues...

This evening, I continued trying to migrate Roller to the lastest version (1.2 beta) of XDoclet. The last time, I made it pretty far, but discovered that the action-mappings weren't being generated in <struts-config>. This time, they showed up, but only a couple of them. I did a little digging and discovered that the two Actions extended org.apache.struts.action.Action, whereas most of the Action classes in Roller extend org.apache.struts.actions.DispatchAction. This used to work just fine with XDoclet 1.1.2, but appears to be broken in the lastest release. So I filed a bug in XDoclet's JIRA and now I sit and wait. I want to just dig into the XDoclet code and fix this, but since it was working in 1.1.2, I'm guessing it was either intentional (and I can fix my problem via Roller's build.xml or a simple oversight and someone can fix it quickly.

Posted in Roller at Nov 17 2002, 06:50:24 PM MST Add a Comment

How I started Raible Designs

Lance sent me an e-mail and asked, "I've been thinking of asking you about running your own business. How do you find new contracts and manage your time?" I replied to his e-mail and before I knew it, I had a story. I tend to enjoy weblogs that talk about their experiences and history, so here's a little enjoyment.

In the fall of 1998, I was working as a contractor for IBM Global Services at CoBank. I worked with a guy who wanted me to help him write a ASP-based dating application. Since I was fluent in ASP, we negotiated a rate and began moonlighting on the project after work. To facilitate me working on the project, I had to purchase a computer (Compaq Presario 5020, 64MB RAM, 300Mhz Celeron), and after the first few payments rolled in, I figured I'd better start a company for tax purposes. The project ended up fizzling out halfway through when the guy decided to re-write the whole thing in Servlets/JSP - probably a good decision, eh? With the income from the project, I was able to pay for the computer, file the paperwork for the business, and start Raible Designs, LLC.

In the midst of that project ending, someone at CoBank knew someone else that needed a website. So my first website (www.ccasla.org) for hire was born. I left CoBank for eDeploy.com and worked there for 2 years (through May 2001) as Director of Web Development. I kept doing Raible Designs stuff on the side for about 5-10 hours per week. You can find some early examples at Karen's Discount Bridal, Raskin & Makofsky and The Swan Ecosystem Center. In mid-April 2001, on the same day that I received my shiny new Dell P4 8100, the 2nd round of layoffs happened at eDeploy. There were only 3 rounds (of layoffs), and they announced the doors would be closing 2 weeks later.

So after frantically searching for a job for 2 weeks, I met with Chris Buzzetta from ICSynergy. Funny thing is that a co-worker of Julie's actually hooked me up with the interview - and everything went smooth at pie. One of ICSynergy's suggestions was that you have your own company - or at least work as a 1099 - so having Raible Designs was a big bonus at this point. I started a project with ICS at Douglas County and found myself in the world of Ant, CVS, Javadocs, and all kinds of other good stuff. In early June, I was tasked with developing a UI Framework for the County's J2EE projects, and thankfully stumbled upon Struts. In July 2001, I converted Raible Designs to an S Corp because I was now doing it full time and needed to enhance my company benefits. The DC project ended in late October. BTW, if you need a great accountant for your business, I highly recommend Lisa David of L & B Accounting.

After leaving Douglas County, I searched like a madman for weeks, but to no avail. I sent out resumes, attended User Group meetings, and e-mailed all my friends looking for a new client/job. I wanted to stay working for Raible Designs, but also needed to keep the income flowing. After finding virtually nothing, I hunkered down and satisfied a bunch of certifications (MCSE/MCDBA 2000, SCWCD, BEA Developer). In mid-December, my e-mails to friends paid off and the former CEO of eDeploy (Robert Gadd) sent me an e-mail. He said he was starting a new e-Learning company, needed a developer to produce their web-based product, and that he wanted to hire me. So it's been 11 months now, and I'm still working for Robert's company. He's been the best client in the world, and the relationship is half the fun. I've kept a close relationship with ICSynergy in the meantime, and they've helped me to get certified as a J2EE and Portal Instructor for Sun. I talked with Martin (ICS's head honcho) today and they might even have a new project for me soon.

So to make a long story longer, I find new contracts the same way that most folks find new jobs. I send out resumes (this hardly ever works), I talk to friends and I talk to old co-workers. I think the best way is to get your name out and get people familiar with what you do. Hopefully, blogging will help facilitate this even further. My partnership and friendship at ICSynergy have certainly helped a lot, and I'll be very grateful if I get my next project through them. I think more partnerships like this are definitely needed. Attending user group meetings certainly doesn't hurt. I've found that my domain name is too hard to remember though, so I bought javawebapps.com (pointed to raibledesigns.com) today. I doubt it's up yet.

As for managing my time, it's now getting very difficult with Julie and Abbie at home with me. It doesn't help that my office is in one of our common rooms, and privacy is not possible. My father recommended to spend as much time with my kids as possible, so I doubt I'll move out into a real office, but I should get my own room - with a door that closes. For the most part, I've had great success with early mornings (4 a.m.) and late nights before a release. I definitely manage my time best when I'm working on something I really like. Of course, then I work too much, and maybe that's not good time management either.

Hope this helps. Feel free to post comments or ask me any further questions.

Update: One important thing I forgot to mention. While I was working at Douglas Country, the Tech Lead on my project was Brian Boelsterli. Brian was a Principal of ICSynergy at the time, and has always been a great friend. He and I used to carpool to Castle Rock everyday, and I learned a ton from him about being an Independent Consultant, a good programmer and a good father. I eventually asked him to be my Mentor, to which he kindly accepted. I couldn't ask for a more valuable resource - he's always been full of great advice. So I encourage you to get a mentor if you know of one - all you have to do is ask.

Posted in General at Nov 14 2002, 03:36:07 PM MST 7 Comments

MiddleGen

I read about Middlegen in the Ant book I just finished. It sounded pretty cool, and now I've been encouraged to look at their site. It claims to generate EJB (CMP 2.0), JDO (1.0), or JSP/Struts (1.0) code and config files from a database. Too bad it doesn't generate Struts 1.1 code - maybe soon. It does have a GUI, but can also be run just using Ant. There are samples in the book that is oh so good. Too see it in action, check out this good ol' viewlet.

Posted in Java at Nov 14 2002, 01:35:51 AM MST Add a Comment

Denver JUG Meeting and Struts

The Struts Framework I managed to attend the DJUG meeting tonight (as I wrote this, time slid past midnight - oh well, it looks better on a new day). I arrived early for the Basic Concepts meeting and stayed for the Main Event. Both sessions were focused on Struts - the first being a very basic overview of MVC and Struts, and the second highlighted the newest features (i.e. Declarative Exception Handling, Validator, DynaActionForms). Like I said earlier, I wanted to meet Sue in person, so that's why I got there early. I introduced myself and she actually seemed to remember me (from the e-mails). I confirmed that she really did remember me (or she faked it quite well) at the end when she signed a copy of her book (that I won) - she asked me if I spelled my name with one "t" or two? Cool! BTW - do you know anybody named "Mat?"

When the DJUG Prez asked if anyone was looking for work, I raised my hand and said a few words about this site and Roller. I doubt anyone will find this site though; I didn't see anyone writing my domain name down, and how the heck do you spell "Raible?" So to offer a little Google love, here are a few different versions: Rabel, Riable, Raibel, Raybel, Rable, Raybell. If I was really bold, I guess I could send an e-mail to the DJUG Mailing List. I think I'll have to pass though, I'm just not that forward of a guy.

The meeting was packed, probably a 100 people showed up - most they've had in long time from the way they were talkin'. It was at DU, my Alma Mater, so it was fun to visit the ol' stompin' grounds. I had Mini-Me with me and found the DU Wireless network, but it required VPN software to get in (and my old id/pass didn't work to d/l the software).

Sue was a good speaker and did manage to impress me with her Struts knowledge. I didn't know that she is a contributing author of the JSP and Servlets column at O'Reilly's OnJava.com, nor that she's got a list of seemingly great publications. I tried to give her a tip about XDoclet, but she said she already knew about it and was planning on mentioning it in her preso. Doh! She really put me in my place. The best part of her presentation (for me) was the declarative exception handling, which I tried to implement on my current project, but it was too immature and buggy at the time. I think it's time to re-examine and refactor.

As a service to my readers, and possibly to readers from the meeting, here is a whole posse of good Struts links:

I'd love to see some weblogs published by Sue or Chuck (Cavaness) - it'd be great to see more Struts Evangelists in the blogging community. The next meeting should be good. Marc Fleury, founder of JBoss fame is going to be speaking.

Posted in Java at Nov 13 2002, 06:58:45 PM MST 3 Comments