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.

The Debate is flawed: Struts vs. WebWork

Personally, I think the debate between Struts and WebWork is irrelevant. This is because I don't think that the Web Application frameworks are the problem. I spend most of my days getting persistence to work. Granted it's gotten a whole lot easier with Hibernate, but I've spent a lot of time tackling that learning curve in the last couple of months. Thanks to Dave Johnson and Gavin King for guiding me up the curve. I spend about 30 minutes each day writing Struts-related code, if that. More time is spent writing tests, CSS, JavaScript (the most time) and DAO's/Managers.

So the problem is my brain. If I could just get the damn thing to work right - it wouldn't matter which framework I chose, because I'd just know it. No learning curve == awesome productivity.

The WebWork guys claim to have this. Therefore, I'm interested. However, who's hiring WebWork gurus? Heh - I know - what I really need to do is learn WebWork and then I can offer an unbiased opinion. Right now, no one is offering an unbiased opinion. Patrick is heavily invested in Struts, as am I. Heck, I've written a chapter about it and I've used it on many project. Jason is invested in WebWork as he's a committer.

Baaah, I'm just gonna learn .NET - that's where the Florida Jobs are. Struts .NET and WebWork .NET - maybe I should work on getting those started. ;-) The post is meant to be read with a smile on your face - I don't want to start yet another flame war.

Posted in Java at Mar 03 2003, 04:13:58 PM MST 2 Comments

Another Example App and Job Hunting in Florida

I released another example app today - security-example 1.0. This is basically the example app for the "Web Application Security" chapter I wrote for Wrox. There's nothing ground-breaking in it, and in fact, it's just a stripped down version of struts-resume. It'll probably only be useful for those folks that buy the book. For those that choose not to, but still want an example, I invite you to download struts-resume. Regardless, here's the release notes for security-example 1.0:

Features in 1.0
===============
Allows user to login using different Tomcat Realms.  Sample realm configurations
are located in metadata/web/tomcat-context.xml.  Wrox's Professional JSP 2.0, 
Chapter 13, describes how to setup a MemoryRealm, a JDBCRealm, a JNDIRealm
and a JAASRealm.  

Retrieves user's information from a MySQL database using a Filter and Container
Manager Authentication.

"Remember Me" Feature using cookies.

Encrypted passwords using native Tomcat feature or programmatically.

Advanced build/deploy process using Ant and XDoclet.

SSL-based login, optional switch back to regular http after logging in.

For more information, and a further developed example application with these
same features, see struts-resume at http://www.raibledesigns.com/downloads.

It feels good to finish up these example apps for the book. I'll keep developing struts-resume, but I'm going to take some time off to enjoy my evenings/weekends and tone down my moonlighting for a week or two.

My latest and greatest passion will be trying to find a job/contract in Florida. I realized this evening that this doesn't necessarily mean that I have to work for a company in Florida - I could telecommute. However, it is tough to convince companies/clients that this is a good thing. In general, I think I get a lot more done telecommuting (I did it for all of 2002) - but I definitely enjoy an office environment more. Being motivated and inspired to do your job, and collaborating with co-workers can be huge for morale. On Friday, a co-worker and I integrated some stuff we'd been working on for weeks, and it felt awesome once we got it working. The best part - we'll still be pumped about it tomorrow when we give a demo.

I did some research today and conducted a search for Java User Groups in Florida. I found that there were two folks interested in starting groups in West Palm Beach (where we want to live) and in Ft. Lauderdale. The only existing user group I found was the South Florida Java Users Group.

Their February Meeting looks OK, but if I lived there, I'd probably pass. It doesn't seem like they're getting nearly the caliber of speakers we're getting in Denver. To me this says a few things: (1) it could be an opportunity to inspire a JUG to get (or help them get) better presentations, (2) it's gonna suck to move to Florida from a vibrant Java Community, or (3) it's gonna be tough to find a gig there. I think I'd better buck up and only focus on #1. Wish me luck - know anyone that's hiring (my resume)? ;-)

Posted in Java at Mar 02 2003, 10:28:25 PM MST 2 Comments

Struts Resume on Tomcat 4.1.18 LE

I discovered some issues with struts-resume 0.6. Thanks to Thomas Fabbricante for the tip. The first bug I found is that you need to change the following line in your database.properties file:

hibernate.connection.url = jdbc:mysql://localhost:3306/struts-resume?autoReconnect=true   

to:

hibernate.connection.url = jdbc:mysql://localhost:3306/resume?autoReconnect=true

As for running struts-resume on Tomcat LE, you'll first need to put mail.jar and activation.jar in $CATALINA_HOME/common/lib - or you can comment out the mail-related stuff. These files include metadata/web/struts-resume.xml (JNDI Mail Session) and web/WEB-INF/classes/log4j.properties (SMTPAppender configuration). Then it all seems to work great! Sweet - that was a lot easier than I thought it'd be. I'll release a 0.6.1 in order to update the database.properties.sample to have a valid db url.

Update: I've uploaded the files for 0.6.1, you can download them here. Alos, here's a demo and a project link for your clicking pleasure.

Posted in General at Mar 01 2003, 05:02:53 PM MST Add a Comment

Struts Training: Week 1

I was invited to attend Basebean's Struts Training today. Vic Cekvenich was nice enough to give me a password to attend, and I agreed that I would blog about it. I also agreed to help out on the MVC Programmers mailing list. I don't know that I'll do the labs, but I am interested in doing them - especially since the examples run on Resin 3.0. So I'm sitting in right now and they're doing some introductions. More to come soon. It's about a 1 and 1/2 hour class this morning - should be fun.

The first 20 minutes have been mostly about open source and it's benefits. I'm thinking - most of the students already know this don't they? Maybe not. I guess my perspective is skewed since I've been involved in open source for so long. Before I started using it, I guess I kinda scoffed at it - so I suppose the intro is good.

The second 20 minutes has been about "why projects fail" and the importantance of requirements. I can definitely understand this - as I've been on a couple projects with a bad requirements-gathering process. So far, this class has been a little disappointing as I haven't learned anything yet. The students seem very interested in the first two topics though - so I guess it's satisfying them. I'm sure I'd be more satisfied if I'd already done the labs (the students have).

Now onto Project Management and CMM. Didja know you can get certified as a Project Manager from PMI.org. IMO, a Project Manager can single handedly make or break a project. I agree with Vic that "the best person to have certified on a project" is the PM. The PM on my current project rocks, and it's made the project soooo much easier. You can track your project's ROI at softwarereality.com.

Don't these student's have mute on their phones? I've heard kids crying and dogs barking so far ;-) No one's heard me sneeze yet - and I've done it 3 times!

Vic recommends the following:

  • When starting a project, create the entire application as an HTML mockup. I agree with this - it's awesome for getting requirements solidified.
  • Mockup the outputs - i.e. Reports in Excel. For reports, he recommends using iReport. After a quick review - it looks like a report designer that creates an XML file that can be fed to Jasper Reports.

NetLedger.com is a recommended UI for complicated forms. Rumored to have a free login.

Tip: When you have bad requirements, surf the web. Programming on your project will just frustrate you. My advice: contribute to an open source project - then you'll keep your skills up to par. Or, read blogs - you'll learn something there too.

Now we're learning how to setup an IDE (Eclipse) and deploy/test and example app. Looks like the sample app (webPIM) uses JSTL's Fmt tag. Cool, I've never used it, I should probably do the labs. Teaching students how to use an IDE for Struts Development is definitely the easiest way to go, but using Ant is the real-world way - right?

The next lab covers configuring Tiles and developing a sample layout. I noticed it was a big confusing for the students that the tiles definitions file is named layout.xml and the base Tiles template is named layout.jsp. I usually name my tiles definition file tiles-config.xml.

Posted in Java at Mar 01 2003, 09:49:51 AM MST Add a Comment

RE: A Better Way to Validate

Hmmm, Patrick seems to be doing the same thing I am - generating ActionForms from POJOs with XDoclet. I wonder if he's using my patch or if he's found another way?

Also, he asks if there's a better way to validate:

My ideal way to validate would be to add xdoclet tags right to my domain model to handle validation.

I guess I'm here to brighten your day then - this is exactly what I'm doing with struts-resume. Check it out: User.java contains @struts.validator tags that are pushed into the generated ValidatorForm via a custom struts_form.xdt (xdoclet) template. Enjoy!

Posted in Java at Feb 28 2003, 10:14:32 AM MST Add a Comment

Struts-Resume 0.6 Released!

After spending the last two nights burning the midnight oil, I have finished struts-resume 0.6. Not much new and exciting, but it definitely a more solid application now. Hopefully, I'll have a demo running in short order. [Project Homepage]

Posted in Java at Feb 28 2003, 07:39:46 AM MST Add a Comment

Ant Rocks (but you already knew that)

I have a few different side projects I'm working on right now. The first two, struts-resume and security-example are for the Wrox chapters and the third, AppFuse is the kindling I'm using to build these projects. Basically, I'm using AppFuse as a starting point for developing webapps. I think I've got most of what I want done for a baseline, so I'll be removing some struts-resume specific code from appfuse and calling it 1.0. For security-example, I'll be removing even more code.

The slick thing, and the reason for this post, is that I've been doing all my development on one project - appfuse. When I want to update struts-resume or security-example, I simply execute an ant command, and it updates whatever files have changed since I last updated. Ant figures out automagically which files have changed. I love it. I did a few updates and I'll be uploading the struts-resume 0.6 release tonight. Here's what I did to update the app from appfuse.

$ant new -Dapp.name=struts-resume -Ddb.name=resume
Buildfile: build.xml

clean:
     [echo] Cleaning build and distribution directories
   [delete] Deleting directory D:\source\appfuse\build
   [delete] Deleting directory D:\source\appfuse\dist

new:
     [echo] Creating new application named 'struts-resume'...
     [copy] Copying 17 files to D:\source\struts-resume
     [copy] Copied 1 empty directory to D:\source\struts-resume
     [copy] Copying 1 file to D:\source\struts-resume

BUILD SUCCESSFUL
Total time: 27 seconds

Now all I have to do is commit it to CVS (BTW, you can get struts-resume from SourceForge CVS) and execute and dist. I could FTP to SF using Ant too I suppose (I have Erik's book sitting right here), but I'll just hope someone sends this task (or page number) to me. ;-)

Posted in Java at Feb 28 2003, 12:25:30 AM MST 1 Comment

Taglibs Standard 1.0.3 Released

I've just noticed that a new version (1.0.3) of the JSTL reference implementation has been released containing some minor bug fixes. [Simon Brown]

Hmmm, no release notes eh? Makes you wonder if it's worth the upgrade/headache. I'll be in for it for quite some time with my struts-resume project. I'm using 17 different OSS packages - it'll be a maintenance nightmare to keep up. That is, until I break down and do some Maven integration.

Posted in Java at Feb 27 2003, 11:35:11 PM MST 2 Comments

Validation - We need a common framework!

Jason doesn't like my Validator that matches two fields. I was just trying to help the Struts Community out by solving a problem that many have asked for. Oh well, I guess those WebWork folks will take any opportunity to bash on Struts ;-).

This is just another example of Struts making the common things hard. I'm more and more glad we went with Webwork, and once Xwork 1.0 / Webwork 2.0 are here, I'll be in nerdvana. [Jason Carreira]

Personally, I still think the Commons Validator is easier - you don't have to write any .java files in most cases (except for my extension, which will hopefully soon be added). I do like the ExpressionValidator - that looks cool. All in all, I think I'd bash on WebWork a little more - but I don't know enough about it. Where's the book ;-)

BTW, this post was sent (and edited!) via NetNewsWire. Very cool - but no titles.

Posted in General at Feb 27 2003, 05:31:50 PM MST 2 Comments

How do you manage your Constants?

I'm sure most of you Java Developers have a methodology for handling your "constant" values. I've seen a couple of different techniques, and I'd like to see what everyone else is doing. Currently, I use a Constants.java file that has a bunch of public final static String lines in it. I got this technique from the struts-example app when I first started working with Struts. I recently came across (can't remember where) a technique where the Constants.java file was an Interface and it was simply implemented. How are you handling this in your apps?

Secondly - do you ever use these Constants in your JSPs, or do you just use the actual values? I use the actual values - less typing.

Posted in Java at Feb 27 2003, 09:40:01 AM MST 5 Comments