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

You can also try this same search on Google.

Locking Records in Webapps

Our tester, Roberto, started working at my day job today. This means that I've been hacking and interacting with Bugzilla all day. It's great to have someone to validate our code meets the requirements (BTW, all our requirements are kept in Bugzilla - how's that for dynamic requirements?!) So, as far as satisfying my desire to be a productive American, today has been a good day. After I ride home (~20 miles) tonight, I'll feel on top of the world. Anyway, back to the point of this post.

One of the bugs that Roberto entered was that a user could login using two separate browser sessions (same user), and blah, blah, blah. I'm sure anyone who's worked with webapps has seen this. You open a page up in both browsers, click "Save" in the first, and then "Save" in the second. The second browser overwrites the first one's changes. I've seen this bug many times, but I've never solved it, nor even tried.

I'm curious to know if any of you have solved this? I think Hibernate has a way of locking an object - but will that solve this issue? I'm willing to implement a quick solution, otherwise, I'll argue the bugs validity until I'm blue in the face. Hmmm, I wonder if I can simply use Struts' Tokens feature to solve this problem? Please hook me up if you've solved this problem in your webapps.

Posted in Java at Apr 21 2003, 05:07:24 PM MDT 4 Comments

Use XForms now with XMLForm

Remember XForms (the next generation of HTML Forms)? How about XMLForm? From their homepage:

This is a standalone servlet toolkit inspired by Apache Struts / JavaServer Faces and W3C XForms. The toolkit is derived from Apache Cocoon and a best effort will be made to maintain the features in sync with the Cocoon module.

For an introduction to the concepts, see: XML Forms, Web Services and Apache Cocoon

XMLForm uses W3C XForms based markup and automated server-side binding to JavaBeans, XML/DOM, JDOM and DynaBeans data models. It also allows easy deployment of REST style Web Services, with maximum code reuse between human facing and machine interfaces.

Wow! Sounds very cool. Thanks to Vic for the link.

Posted in Java at Apr 05 2003, 11:19:01 AM MST Add a Comment

Struts Training: Week 5

I'm dialed in and listening to Don Brown presenting on Struts and XML/XSL. Don is a lucky guy - he's presenting from Hawaii this morning, where I'm assuming he lives. The bad part for him - it's 5:30 in the morning there. Don is one of the developers of Stxx and has also developed a Cocoon plugin for Struts. He works for DigitalNet and currently is working on a contract for the Navy. Hmmm, wonder if they're hiring - I'm willing to bet that Julie would consider moving to Hawaii! Enough dreaming - onto the presentation.

The following are types of XML/XSL Extensions for Struts:

  • XSL-based
      - stxx
      - StrutsCX
  • XML pipeline-based
      - Cocoon Plugin

stxx: features
  - replaces JSP with XSL
  - in action, create XML manually, or get it from another source
  - stylesheet selection based on criteria like browser type
  - automatic serialization of ActionErrors, resources, and request objects
  - extendable to support any object serialization or XML transformation technology
  - supports both Struts 1.0 and Struts 1.1

Pretty cool - for Struts 1.1, there's a Stxx plugin, and you use a .dox extension to indicate it needs transformations. In a stxx-transformations.xml, you define "transformations" that define XSL stylesheets, where to run at (client|server), and mimeTypes (html|xml|pdf). Sweet - maybe I can use this sucker for struts-resume! I wonder how Stxx compares with StrutsCX. Since Stxx can be plugged-in and can co-exist with JSPs, it might be the right path for me.

Advantages of Stxx: Simple, use of caching makes tranformations quick, can be used with Velocity or Cocoon, lighweight, very extendable.

Disadvantages: XML pipeline very limited, poor scaling of message resources (if ApplicationResources.properties in huge - i.e. > 1MB), requires all data to be gathered in Action (MVC-push).

Compared to StrutsCX - Don says that it's very similar, except that StrutsCX supports the Validator. As for the Cocoon Plugin, it supports all the features of Cocoon. Describing the features of this plugin seems pointless as I would just be describing features of Cocoon. For the Cocoon PlugIn, you define it the same as a regular plugin, and then change your path to point to an XHTML-compliant JSP. Apparently, Don has modified the struts-example app to use the Cocoon PlugIn, so hopefully I can provide a link to the download.

Here are some resource links from Don's presentation that might interested you:

As for my presentation on Remember Me and XDoclet, you can find those slides here. The slides (and lab) uses a simple JSTL-based app I whipped up last weekend. I'm planning on hooking it into a database eventually to allow online editing of a presentation, but I probably won't do that until I give another presentation.

Posted in Java at Apr 05 2003, 09:35:09 AM MST Add a Comment

Bad Cables?

I'm still experiencing issues with my Internet Connection, and I'm still blaming my ISP. Especially since I went out and bought a new router and everything. Now I have internet access, but it's intermittent and flaky. It's so flaky, in fact, that anytime I've needed to ssh into this site's server or check in to CVS at SourceForge, I've had to dial-up. However, an ingenious idea hit me this morning. Since the original problem was a bad cable between my ISP's bridge and my router, maybe more cables could be bad. So I stuck one of my wireless cards in my box, and Voila! I'm surfing like the wind again. I guess I'll have to stop at a store and see if they have an "ethernet cable tester".

I'm off to work. I'll be broadcasting my presentation (via WebEx) from there today since I didn't trust this connection up until now.

Posted in Java at Apr 05 2003, 07:42:24 AM MST 1 Comment

[ANNOUNCE] Struts Resume and AppFuse 0.7 Released!

There's nothing like tootin' your own horn. What's even worse is checking all this stuff into CVS and then uploading it on a dial-up connection. Anyway, here it is - the latest and greatest version of struts-resume and (finally) a version of appfuse. AppFuse is basically struts-resume w/o any resume stuff. There's not much new that's visible for struts-resume, the only real things are User Administration (no add, just list/delete/assign roles) and a smart-menu that stays expanded based on your previous selections. Here is a full list of what's new in 0.7 (both apps):

Features in 0.7
===============
- Upgraded to Hibernate 2.0 Beta 4.
- Upgraded to Struts 1.1 nightly build (2003.03.26) to fix Validator issue.
(http://tinyurl.com/87xa)
- Upgraded DBUnit to 1.6-dev to fix batchStatement error in Ant task.
(http://tinyurl.com/8ei2)
- Upgraded Canoo WebTest from build265 to build276.
- Upgraded XDoclet to nightly build (2003.03.28) for Hibernate 2.0
compatibility. Apache module is still customized for POJO -> ActionForms.
- Upgraded Display Tag Library to version 0.8.5.
- Renamed "test-canoo" task to "test-jsp".
- Added "db-load" as a dependency to running unit tests to get a fresh
database each time.
- In LoginServlet.java and BreadCrumbFilter.java, pre-pended contextPath
to authURL (i.e. "j_security_check") to get absolute path.
- Added User Administrator to list/edit/delete users. This feature
includes using indexedProperties on a form - still using XDoclet, but using
a subclass of UserForm, called UserFormEx to hold the getter/setters for
the indexedProperties.
- Wrote more Cactus and Canoo Tests to verify Resume editing and User
Administration functioned properly.
- Added icons to success and error messages template (common/messages.jsp).
- Implemented role-based Permissions on menu by adding
permissions="rolesAdapter" to in menu.jsp.

I've put a line through the renaming of "test-canoo" to "test-jsp" because it's in the README (part of the download) and I don't want to re-upload just because of one stinkin' line.

Tomorrow, I'm actually presenting for the Struts Training class, so I won't be able to give a full review. One of the gents who wrote Stxx will be presenting first at 8:30 MST, and then I'm up for my preso. I'm going to do some short and sweet stuff on Remember Me and XDoclet with Struts. If you're interested, you can do the labs I put together. I'll post the slides when I'm done presenting.

Posted in Java at Apr 04 2003, 11:56:25 PM MST 3 Comments

How do I implement password rules?

Does anyone know of any open source packages or techniques for implementing password rules. For instance, I need to implement the following rules for password in my application:

Passwords must be made up of at least three (3) of the four (4) following 
classes of characters: Lowercase letters, Uppercase letters, Numbers, Special 
Characters.

I can probably whip up some JavaScript for this, but I'd need server-side code to catch if JavaScript is disabled. I'm guessing this is not possible with regular expressions.

Posted in Java at Apr 04 2003, 10:36:31 AM MST 7 Comments

Struts FAQs

Every Struts Developer should probably read Sciosorks Struts FAQ. Good stuff there. Bookmark it and use it.

I rode my bike into work for the first time this year. I got lost, so it took me 20 minutes longer than it should have. Door-to-door: 1:45. I wonder how long it'll take me to get home tonight.

Posted in Java at Apr 02 2003, 11:01:05 AM MST Add a Comment

Dial-Up: 28.8

That's right, I'm posting this message on dial-up since my ISP can't fix my internet connection. Today they said they'd send someone out in a week. That sucks - dial-up for a week. Oh well, productivity will rise, blogging and reading of blogs will decline - which can't really hurt. The choke hold will come when one of my friends sends me the 1MB attachments that they're used to sending. The worst part is that I'm doing a WebEx presentation for the Struts Training class this week and I have to go into my office to do it, rather than in the comfort of my own home. Luckily, the guys I work for are letting me use my work computer - thanks gents!

Posted in Java at Apr 01 2003, 10:49:26 PM MST Add a Comment

Cool TagLib Document

I found this gem on the strut-user list tonight.

* TaglibDoc
    This is a JavaDoc-like set of html and css files for browsing the
    taglib documentation.  Here's what this target does (I ran this
    about 15 minutes ago):

      http://struts.sourceforge.net/struts-atlanta/taglibdoc/

* TaglibReport
    This target will generate a grid-like view of the taglibs and their
    attributes so that you can see every tag in a typical package side
    by side.  This helps when comparing which tags implement a certain
    attribute, by allowing you to view them side by side and not have to
    look up each tag by hand. (also about 15 minutes ago)

      http://struts.sourceforge.net/struts-atlanta/taglibreport/

Project by Mohan Kishore, posting by James Mitchell.

Posted in Java at Mar 30 2003, 07:23:25 PM MST 2 Comments

StrutsCX Article

The stats on the bottom right of this site are definitely wrong. At the time of this writing, it says I've had 4,351 hits today. Yeah right. I did, however, discover that I have been linked to in a major article and I'm getting a fair bit of traffic from that. The article is called Generate Web Output in Multiple Formats and Languages with StrutsCX and is hosted by DevX.com.

Why did the author include a link to this site? Because I'm hosting a demo of the StrutsCX application. I hope to use ideas from this app when I develop the XSL/XML rendering of resumes for my struts-resume app that I may/may not ever finish. I do plan on finishing it someday, but since I'm my own client - there's no deadline, no pay, and little motivation. But it is very cool to have my own reference application that I can play with to try new stuff. I definitely dig that. I can guarantee that as soon as I get indexed property validation working, it'll be in there - and that will also motivate adding many child items (i.e. skills, education, etc.) to the resume item.

Posted in Java at Mar 30 2003, 12:30:10 PM MST Add a Comment