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 2.0 Book

As I mentioned earlier, I've been asked to write a couple chapters in technical book. Since I've been given permission to tell you the name and publisher, here goes. The book is Professional JSP 2.0, an update to Professional JSP 2nd Edition (@amazon.com). I'll be writing two chapters, one on Security and how it relates to web applications, and one on Struts. I hope to complete and submit an outline for both chapters today, and I'll post it here when I'm finished. I was also thinking of contacting all the recent Struts Authors I know (Ted Husted, Chuck Cavaness, and Sue Spielman) to get there advice on the most mis-understood areas of Struts.

My hope is that I won't be writing just another Struts book/article, but rather a summary of the best parts about Struts and things I like (i.e. Validation, XDoclet, DispatchAction, ModuleExceptions). I also plan on sending an e-mail to the Struts User Mailing List in hopes of getting feedback from them. The bad news is that I have a week to write the first draft for each chapter. The good part about that is that it'll force me to focus and get the job done. I'm planning on spending a lot of time at the DU Library, where I've spent many hours in the past cranking out long essays. I plan to do all writing and development on Mini-Me (my Powerbook), b/c I think it'll produce nicer screenshots. As you might've guessed, I'm hoping to use struts-xdoclet as my sample app for both chapters. I plan evolve it more and more even after the book is published though (scheduled for early next year).

Thanks to Lance for the hookup with Wrox.

In other news, I got an interesting e-mail this morning. It said:

I saw your resume and found it impressive. Are you interested in working in Europe?

Posted in Java at Nov 29 2002, 07:21:56 AM MST Add a Comment

Struts-XDoclet 0.2 Redux

Just in case you downloaded struts-xdoclet-0.2, there was a classpath issue in the build script that I just fixed.

Posted in Java at Nov 27 2002, 01:10:52 PM MST Add a Comment

Struts Roadmap

Are you a developer using Struts? If so, you might want to checkout the Struts Roadmap. You'll notice that in 1.2.x, they plan to Encourage the use of XDoclet and other code generation technologies to streamline development. Cool - but being that's it's been over a year between 1.0 and 1.1 (still not released), I wouln't hold your breath for this. I think Struts would really shine if it could be easily integrated with a persistence mechanism (or framework, whatever you want to call it). Of course, this goes for any UI Framework - the easier it is to develop with, the more fans you'll get. Then again, if you're lucky enough to not have to worry about the persistence layer - who cares!

Posted in Java at Nov 27 2002, 01:07:40 PM MST Add a Comment

Using XDoclet on Large Projects

Kurt emerges from his sabbatical (12 days is a long time in blogsphere) and mentions a little tidbit I'd like to comment on:

Last week I attending a TC JUG meeting where the topic was Struts 1.1: The Good, the Bad and the Ugly.
...
Interestingly the speaker didn't like XDoclet because he felt that on large development teams the config files should be managed outside of the source code during the design phase. Since I have never worked on a large team (not that I won't want to) I don't know if his concern is valid. Interesting comment though.

(I added the bold.) First of all, I have only recently (last 6 months) found XDoclet, and all the projects I've been on (in my entire life) have always had less than 5 coders. I've been on teams as large as 20, but the module I was working on never involved everyone. In my experience, the design phase never really consists of writing very much code or configuration, but rather a bunch of UML diagrams and static HTML prototypes.

I have found (in my brief work on struts-xdoclet) that I need to change values in my web.xml to test different settings (i.e. a servlet's init-param). However, since I'm coding some of these values in my classes, in order to change and test, I have to re-compile and deploy. Of course, I could just change the values in web.xml after I've deployed, but that's just a workaround.

A better solution, which I hope to implement, is to put certain values in my classes as tokens (i.e. @encrypt-password@) and then I can use Ant's replace task to specify this value from the command line. That way, I can set the default in my build.xml file and change it by either 1) specifying the property in build.properties, or 2) specifying it from the command line (i.e. ant -Dencrypt-password=true).

I'd be very interested in hearing anyone's war stories on this topic (managing config files in a large team).

Posted in Java at Nov 27 2002, 12:31:26 PM MST 2 Comments

Struts Consultants

The Struts Committers are thinking of removing the Struts Consultants listing. I've been listed on this page since last year, but it really hasn't done anything for me. I get a few hits per day from it, but I've never got any clients or work from it. My gigs always seem to come the old fashion way - through connections. The reason I'm writing this post is because of a message this morning, from Ted Husted (a Struts Committer):

We originally setup the page because people kept asking. So if we 
take it down, we need to keep something up saying that we don't do 
that. Rather than waste a page, we might just add a section to the 
Powered By page.

Then what about the Powered By page? 

I think we need one, but we might want to restrict it to sites 
that are willing to write up some sort of case-study to go with 
the listing, so it would be more than just a URI. I'm thinking of 
a site preface page with a screen shot or two that talks about how 
the site came to be written, and then finally a link to the site 
itself. 

Realistically, people are looking for war stores and testimonials 
here, rather than just a link list. So this would become a "Struts 
Showcase" section, rather than just a Powered By directory.

Of course, there would still be a list, but it could include an 
introductory paragraph (from the site preface page), and link to a 
page about the site, and then to the site itself. (Or not, if it 
is an internal site with a really good write-up :)

I can work something up a couple as examples. We might also try 
twisting dIon's arm for something regarding the Pizza Hut site. I 
also remember a good post WRT the http://www.ipayment.co.za/ site. 
Application Servers, The Malamute Registry, BaseBeans 
(www.proj.com), Bug Track, FixaFest, Julianne Griffith, Raible, 
IPIP, Roller, and WindSurfing look like other likely suspects =:0)

How about if we start by reducing the PB list to these twelve I 
can then try to get a case study page up for one of my things to 
get that ball rolling. 

* http://www.application-servers.com/ 
* http://amalregistry.webhop.org/ 
* http://www.proj.com/ 
* http://www.bug-track.com/ 
* http://www.fixafest.nu/ 
* http://www.ipipi.com/ 
* http://www.juliannegiffin.com/ 
* http://www.pizzahut.com.au/ 
* http://www.raibledesigns.com/ 
* http://www.rollerweblogger.org/ 
* http://www.ipayment.co.za/ 
* http://www.windsurfpassion.com/

-Ted.

Cool - I feel the love! You can follow this thread here. Hopefully, by creating struts-xdoclet, this site will serve as a war story the development and evolution of a struts webapp. I encourage any of you to jump in and help, or at least send features/ideas that you'd like to see implemented.

Posted in Java at Nov 27 2002, 08:26:45 AM MST Add a Comment

Struts-XDoclet 0.2

I've posted an updated version of struts-xdoclet. I spent most of the day trying to get my build.xml and directory structure in line with Erik Hatcher's. He is planning on releasing a sample app based on his Ant book later this week, so I want to be relatively similar in our approaches. His app is a best-practices app for using Ant, JUnit and Lucene - while mine is more geared for Struts, Security and UI/Persistence Generation. I don't know if I'll commit to saying it's a best-practices app, but it's filled with a number of things I've learned in my Struts projects. I'd like to think of it as a kickstart app - kind of like struts-blank.war, but with more meat.

One of the things I discussed with Erik today was that I'd like to add the ability to choose Castor, Hibernate, EJB, or DAO with some switches in the build script. Yeah, that'll only take me until March to get done, so don't hold your breath! His response was to take a look http://www.keelframework.org/. The idea of it, supposedly, is being able to take the same business logic and swap out UI and persistence tiers easily. I guess it was started by the Expresso Team. Hmmm, I don't know if that is good or bad. I shied away from Expresso when I saw that they promoted putting a bunch of HTML into your Java classes.

Posted in Java at Nov 26 2002, 08:33:07 PM MST Add a Comment

Form-Based Authentication

I posted the following message to the tomcat-user group yesterday:

On Tomcat 4/5, I am able to use the following configuration in my 
web.xml:

<login-config>
  <auth-method>FORM</auth-method>
  <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/login.jsp?error=true</form-error-page>
  </form-login-config>
</login-config>

However, I know that there are app servers out there that do not support
this - the form-error-page MUST be a different JSP.  So I'm wondering,
is there a value I can grab in my login.jsp that tells me the URL of the
protected resource the user is trying to get to?

I tried <%=request.getRequestURL()%>, but that gives me .../login.jsp -
and I am expecting welcome.do.

I know iPlanet used to set a cookie and I could use that as described
here.

Thanks,

Matt

Craig McClanahan responded with the following answer - which was just the information I was looking for:

There is no portable mechanism to acquire the request URL that was originally requested, nor any guarantee that this is even possible. All you know is that the container has detected that a protected URL was requested, and that there was no currently authenticated user.

So the lesson learned is that if you want to make your webapp portable across different app servers, use two separate pages for the login and login-error pages.

Posted in Java at Nov 26 2002, 05:38:44 AM MST 2 Comments

Struts-XDoclet 0.1

I did a bunch of work today to get struts-xdoclet off the ground. Basically, all that exists write now is the generation of struts-config.xml and web.xml from xml files in a merge directory. There are no .java files in this project yet.

I'm posting this to you in hopes of getting some validation of the directory structure and Ant-based build/deploy process. The deploy task originally worked as Erik Hatcher suggests in his book, but whenever I tried to redeploy, it would give me errors when trying to remove a .jar file - so I resorted back to a simple copy to $CATALINA_HOME/webapps. The build.xml file I put together is based on what I found in struts-blank.war (for 1.1), roller's build process, my own experience and good ideas from the Ant book.

I've also configured form-based authentication and I plan to add a bunch of optional modules (i.e. SSLExt for SSL Switching, password encryption) to the mix.

I'm still searching for a sample-app idea for the persistence layer (i.e. authors and books). I'd like to do something that folks can use, so I'd definitely like to include an admin section for administering user's and their properties. Maybe even offer features such as registration (might be a bit difficult using tomcat-users.xml, but not so bad with JDBCRealm or an LDAP server), and password recovery.

You can download the first cut of this - which should build and allow you to login - at http://www.raibledesigns.com/struts/.

Next steps include the security modules I mentioned above, and generating validation.xml and persistence classes from a POJO. I'm still undecided on using Castor or Hibernate for the persistence layer. Dave (Johnson) seems to think Hibernate has some great stuff, and he's used Castor for a while, so that's probably the direction I'm leaning towards. It would be great do be able to do both.

Posted in Java at Nov 25 2002, 05:45:04 PM MST 4 Comments

Photoshop 7 Shortcuts

Zeldman gives a link to Photoshop 7 Keyboard shortcuts for Windows. On the Mac, substitute COMMAND (the Apple key) for CTRL and OPTION for ALT.

I'd probably know a lot more of these if I was still continuing my quest for a Photoshop Certification. I still want to get it, but the Java/Struts/XDoclet realm is more inspiring and more fun right now. I haven't touched the Photoshop 7 Bible in about a month! Maybe I'll get back into it, but I probably won't finish it this year.

Posted in The Web at Nov 25 2002, 02:42:21 PM MST Add a Comment

Writing a Technical Book

Graham Glass offers some great suggestions on how he writes a book (tip of the hat to Matt Croydon). This is extremely valuable information for me, as I will be writing a couple chapters over the next few weeks. If I can follow in his footsteps, I'll be set!

A typical chapter takes me 3 or 4 days to write, including the source code for the examples, which I think is pretty fast. In addition, the high level book structure takes about a day.

The thing I'm struggling with right now is what persistence layer to use on my example Struts application. I'd like to use either Hibernate or Castor, but since I've never implemented either from scratch, I don't want to spend more time learning than implementing. And I'd like to generate the entire persistence layer - which seems possible with both. I'd like to use Middlegen, but then I'll have to use JDO or EJB's for my persistence layer. While JDO might be appropriate, EJBs are probably over-kill for an example app. The nice thing about Middlegen is that it will generate the JSP and Struts classes for me too.

Posted in General at Nov 24 2002, 05:04:23 AM MST 2 Comments