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 "java". 1,588 entries found.

You can also try this same search on Google.

Tomcat 5 - Figured it out

Remember the Tomcat woes I was experiencing on Monday? Well, I think I've figured it out! It wasn't too hard, all I had to do was read the error message ...

java.lang.ClassNotFoundException:
    org.apache.webapp.admin.ApplicationServlet

... and go looking. Sure 'nough, this class is not there, nor are any of the other classes for the admin webapp! So I've logged the bug and now I wait. Maybe this is intentional, but I doubt it.

Later: The workaround I'm using is that there's a milestone build from October 14th that has the admin app intact and no errors on startup.

Posted in Java at Nov 30 2002, 10:22:45 AM MST Add a Comment

Help me rename struts-xdoclet

I've decided that I need a new name for struts-xdoclet. "Struts-XDoclet" is just too hard to say - try it, you'll see. Four syllables is just too many. Since I intend for it to be a Struts/XDoclet Jumpstart Kit, I'd like something that tries to signify that, but then again, I like POGN - Plain Old Good Names. SXJK is just as hard to say as Struts-XDoclet. I was thinking SASSY (Struts App Start ... nothing for S and Y) might be a good one - but doesn't really explain much. It'd be cool to name it Abbie, after my daughter, but I don't think sxd (hey, that might be a good one) will be that earth-shattering, and if I'm going to name something after Abbie - it better be good! I just asked Julie and her idea is to name it "struggle" - that's not bad. It eliminates the struggle in building a new webapp. Please comment your suggestions if you have an opinion.

Posted in Java at Nov 30 2002, 04:41:25 AM MST 8 Comments

JSP 2.0 and Servlets 2.4 Research

I'm going to record a few items from my JSP 2.0 and Servlet 2.4 research tonight. I hope you don't mind.

From JSR 152 (JSP 2.0):

We plan to incorporate two main new features into JSP, and a few incremental features. Additionally we expect to incorporate erratas and clarifications as well as opportunistic improvements.

The two key features are the use of JSP to author custom actions, and adding expression language support into the container. The main goal of this JSR is to deliver these new features into the JSP specification in a timely manner. This goal will likely limit what other features can be incorporated.

So (to me) this means that if you know JSTL, you already know half of JSP 2.0. And the best part of JSP 2.0? One main theme of this update of the JSP specification is that we want to simplify, not complicate, the view of a JSP that most users, specially page authors, have.

From JSR 154 (Servlet 2.4):

Servlet 2.4 will be a relatively small upgrade to the existing API. Since the technology is highly popular, we have a large number of small requests for enhancement to the API that we would like to be able to accommodate. Over and above that, Servlet 2.4 will address the following areas in a portable manner:-

* Modularization of the deployment format

The goal is to achieve a level of modularity with the deployment format which is not currently possible using the current DTD based deployment descriptor. The intent is to enable this modularity to manage the organization of deployment information of related technologies that use the web container as the underlying platform. These frameworks include dependencies on other J2EE components, JSP technology, JavaServer Faces, JAXM, JAX-RPC and other frameworks that build on servlet semantics.

Hmmm, this almost sounds like the module idea in Struts. Does this mean they want to allow sub-applications (or modules) within a web application? After a little research, it appears that the 2.4 spec will allow you to add new namespaces to your web.xml file, and therefore, you can extend the deployment descriptor for your own needs. Look for vendors to use this, as well as UI Frameworks like JSF. The top of your web.xml will resemble the following on 2.4 container:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://
    java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

Also on the list:

* Enhancements to the security model
     - Provide a facility for logging out of web applications portably
     - Clarify, possibly by adding API or deployment syntax, the relationship between HTTP session state and authentication state

* Smallish enhancements to the filter and listener models
     - Provision of deployment syntax for declaring API dependencies between elements in a filter chain
     - Addition of request and response level listeners and event notifications.

Cool, sounds like good stuff. Logging out of web applications portably? You mean there's more we can do than invalidate the session? I wonder what else there is to logging out? Maybe it'll remember the last page the user was on? No such luck (but you can do that with Cookies). It appears that there's a strong effort to encourage vendors to implement single sign-on for webapps. Tomcat is the only one I know that does this now. HttpSession has a new logout method - if the servlet container implements single signon, the logout logs the client out of all web applications on the servlet container and invalidates all sessions associated with the same client. I guess this is cool if you have more than one webapp on your server. Now we just need an API to allow webapps to talk to each other on the same container. I guess you could call this HTTP, but I want something better than that. Another interesting item I found is that you'll be able to use a servlet as your welcome-file, which is currently not allowed in the 2.3 spec.

So how do these new specs influence how you write your webapps? It doesn't seem like there's much that's new, and certainly no ground-breaking features. So learn Struts, so you'll have a headstart on JSF, and learn JSTL, so you'll know the expression language used in JSP 2.0. If you've been put off by writing tag libraries, it'll be easier with JSP 2.0, as you'll be able to use JSP fragments as a type of tag library. Lastly, if you're not using container-managed authentication (i.e. BASIC, FORM), you might want to consider it. The thing I like most about container-managed authentication is that you can bookmark pages in an app, and then get right back to them by entering a login/password - this is how it should be vs. login -> main menu -> bookmarked page. You can use filters to restore any session or request information that is needed for the bookmarked page.

Pheww, boy am I lucky! I copy-pasted this post before I tried to submit it, and whaddya know, Chimera crashed after I hit the "Post to Weblog" button!

Posted in Java at Nov 29 2002, 07:09:23 PM MST 4 Comments

Should I use Maven for struts-xdoclet?

James Strachan has encouraged me to use Maven for my struts-xdoclet project. I should give Dave some credit too, as he has also suggested this through e-mail. Here's my delimma, it'll probably take me anywhere from 2-4 hours to figure it out and integrate it. Does it buy me that much functionality to make it worth it? And my biggest fear is that it seems to help you produce a "project website" - that has a Jakarta look to it. I'll end up spending hours and hours tweaking the look and feel of that sucker - which provides no real value at all. But I'll do it because that's how I am. So to answer your suggestion James, I'm afraid to integrate with Maven, as I'm scared to create too much more work for myself with my already tight deadlines. Volunteers are welcome ;-)

Posted in Java at Nov 29 2002, 11:41:11 AM MST Add a Comment

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