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.

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

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

Handling Time Consuming Requests

Domininic says, "I am try to find a good way to have an intermediate page load up while my Struts Action performs a large database query and then XSLT transformation." Ask and ye shall receive. I received the following e-mail from Alec Missine a while back. The attachment has a method of implementing a TCR. Let me know how it works as I haven't tried it myself.

----- Original Message -----
From: Alec Missine
To: [email protected]
Sent: Monday, January 07, 2002 3:59 PM
Subject: processing time consuming requests (was: wait page primer)


There's been some interest to the message I posted last month on the subject. The war file was too big though, so I compressed the stuff as much as I could. I also added some javadoc and UML diagrams.

The attached Struts-based application prototypes the wait page support for a time-consuming request (TCR). When a TCR (e.g., a database search) starts, the appropriate wait page is being sent to the browser after the request's ETC (Estimated Time to Complete) expires.

In the meantime, the corresponding action (the database search) is being started in the background thread on the server. If the default ETC is used (ad infinitum) or the action completes before the request's ETC expires, there is no wait page at all - the browser gets the result page right away, while the background thread is still busy closing the resources.

The wait page has javascript that polls the server to update the wait page with the TCR's progress. When the TCR completes, the wait page is being replaced with the appropriate result page.

This implementation has been tested on Apache Tomcat 4.0 with an Oracle 8.1.6 database as a data source. Presently, the application provides read-only access to all database tables for all database schemas through extensive use of the java.sql.DatabaseMetaData object. The next release will support insert/update/delete functionality.

Alec

Attachments: tcr.zip (114 KB)

Hope this helps!

Posted in Java at Nov 13 2002, 07:17:28 AM MST 6 Comments

Struts Kick Start

Kevin Bedell and James Turner have setup Struts Kick Start; A site devoted to discussion and support of the Struts web application platform, centered around the SAMS book.

Tomorrow night at the Denver Java User Group, Sue Spielman explains how to use Struts to build Enterprise Applications. I think I know most of what will be presented, but it never hurts to attend a Java User Group meeting. We'll have to see how Abbie and Mom feels about Daddy taking off for a few hours (Julie has the flu, so I doubt I'll make it). I actually contacted Sue a few weeks back about contracting prospects. She responded quickly and opportunities seemed promising after exchanging a couple of e-mails. But alas, I haven't heard from her since.

Posted in Java at Nov 12 2002, 09:13:45 PM MST Add a Comment

Struts now produces XHTML?!

I logged this bug many moons ago (December 19, 2001) - and tonight it appears to have been fixed!! This is sweeter than all getout in my opinion. This means that adding <html:html xhtml="true"> to the top of your JSP when using Struts will render XHTML-compliant markup. I haven't tested it yet - thanks David Graham!

Posted in Java at Nov 11 2002, 06:13:02 PM MST Add a Comment