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.

New Tomcat Releases: 4.1.29 and 5.0.14 Beta

I know these have already been announced on javablogs.com, but no insight was given - so here's some lovin'. 4.1.29 seems to be merely an upgrade to DBCP 1.1 - which is great AFAIK because the "kill abandoned connections" hasn't been working for me. Hopefully DBCP 1.1 fixes this. Unfortunately, I'm running 5.0.12 on this site (where I'm still having connection issues) and the 5.0.14 release seems to only have DBCP 1.0. Oh well, maybe they'll upgrade to 1.1 in the next release. I'll still upgrade this site to 5.0.14 - maybe sometime this weekend.

Later: I upgraded this site to 5.0.14 and it does appear to have DBCP 1.1. Also, the abandoned connection timeout might actually work - or at least it's doing some logging - as indicated by the following message:

AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@1077fc9)
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 60

Posted in Java at Oct 31 2003, 11:37:06 AM MST 3 Comments

Hibernate 2.1 Beta 5 Released!

Normally I wouldn't announce a Hibernate beta release (since it is a beta and I'm not currently using it), but there's a bunch of bug fixes (see release notes) that folks might be able to use. You can also download this bad-boy if you so desire.

On a side note ~ I find it amusing how my real-world projects influence my open source contributions. I don't follow Hibernate much because I don't use it day to day. On my last few projects, I've used it a lot. When I've used it, I've also used AppFuse, and therefore - I tend to contribute the AppFuse's development more. Same goes for the displaytag - which I haven't used in a project in several months - hence, no code commits from me. The good news is that on my current project, I have been using Struts Menu a LOT and I've committed some wicked new stuff to CVS. I'm busy writing documentation on it now so it will be easier to use for all. Maybe I'll try to convince my next project to use Roller for Project Status Reports...

Posted in Java at Oct 30 2003, 04:56:55 PM MST Add a Comment

Panther vs. Jaguar ~ The results are in!

According to my performance tests, Panther is faster than Jaguar for most things Java related. Compiling whole projects with Ant is a few seconds faster. Opening IDEA is only 1-2 seconds faster. Opening Eclipse is actually slower. Booting is considerably faster - they've managed to trim off 1/3 of the boot up time.

I really like Panther so far, but I've discovered today that my 3rd party memory will have to come out and stay out. I've had 5+ black screens of death and after talking to tech support from OWC, they've confirmed there is an issue with all 3rd party RAM. They said they'd be tracking down the issue and getting me a replacement ASAP.

Things I dig the most: the Finder (more like Windows Explorer), Mail and Expose. I can't figure out what Expose's "Application windows" is for - it just seems to highlight the current app I'm in.

Things that suck? Photoshop gives errors on startup but continues to run. Ant puked at one point but seems to work fine now. A few of the haxies I've purchased aren't available yet (for Panther). XCode kinda sucks too - it forces you to use it's directory structure for projects. It looks cool, but we all know that good IDEs don't force you to do anything.

Posted in Java at Oct 28 2003, 01:18:40 PM MST 3 Comments

[Proof] Panther ships with Ant, XDoclet and JBoss!

Simon mentions some treats that Panther has for developers:

I've just installed Panther and since you don't get stuff like CVS installed by default, I decided to open up the XCode CD and install the developer tools. To my surprise there are some Java tools tucked away including Ant, XDoclet, log4j and JBoss.

Here's a screenshot to prove it really does exist:

Developers Tools options for Panther

Wicked cool. It sucks that Ant is out of date (1.5.3), but that's OK since I already have it installed.

Oh yeah, and the 3rd Party RAM I have that was causing the Panther install to hang? I re-installed it and everything seems to work just fine.

Posted in Java at Oct 28 2003, 06:52:59 AM MST Add a Comment

My name hurting Pro JSP sales?

I guess Amazon (or Apress) figured that if they removed my name from Amazon's listing of Pro JSP - they'd boost their sales. I don't mind, whatever it takes!

Posted in Java at Oct 27 2003, 11:19:01 AM MST 4 Comments

How can I import local html/text files into a JSP page?

I posted the following message to the taglibs-user mailing list, but thought I'd do it here as well - since I know I have some smart readers.

I have a requirement to allow reading of "assets" for a website from a local CD. These assets might be images, flash movies, html/text pages, etc. I've got everything working but rendering html/text. When I do the rendering of text/html online, I use <c:import url="/assets/filename.html"/>, and offline, I do <c:import url="file:///e:/assets/filename.html"/>. I can enter this fine in Mozilla and the page will come up, but JSTL's c:import tag says it can't find the file.

2 questions:

1. Can I use c:import to import a local HTML file onto a page?
2. If not, is there any way to do this?

Any ideas?

Posted in Java at Oct 24 2003, 06:02:01 AM MDT 11 Comments

AppFuse and all it's libraries

I received a question about AppFuse that I've been pondering every since. The question basically boils down to two things:

  • How do you manage Eclipse's .classpath file in conjunction with lib.properties (the file that manages it for Ant)?
  • When using AppFuse for multiple projects, do you put a "lib" folder in each project or use a central repository?

Quick Answers: I replace files in the appfuse/lib directory and update lib.properties. Then I update my project properties in Eclipse to reference the new jars. A pain, yes - but only a 2 minute process. I run all my tests before I bother changing the Eclipse classpath. As for multiple projects - the easiest thing to do is to move $yourProject/lib to a folder called "libs" in the same directory as $yourProject and change the ${lib.dir} property in properties.xml to point to the new folder.

Begins Rambling... I'm currently using AppFuse on 3 different projects. 1 is AppFuse itself, the 2nd is Struts Resume, and the third is for a client I created a webapp for in August. Right now, when I synch up Struts Resume with AppFuse, I copy paste from appfuse/lib to struts-resume/lib and update the lib.properties appropriately. I can't just copy lib.properties to struts-resume/lib because struts-resume uses libraries that appfuse doesn't. Yes, this is admittedly a pain in the arse. It's almost as bad as changing all the method signatures when moving the Hibernate Session from all method signatures into the constructors (can your IDE do that?!). I don't want to make people download appfuse to build struts-resume though, so I doubt I'll change this process.

The whole "massive lib folder" has been bouncing around in my head for quite some time. I'd like to use Maven or Greebo to download the dependencies for AppFuse, but at the same time, it's nice being able to download the whole thing at once and be up and running. I don't want to go the Maven route because I don't really want/need a website for AppFuse and it sounds tough to get it working with XDoclet (though WebShop looks like it might be a good template). KISS

The project.xml in AppFuse is my feeble 20-minute attempt to get it Mavenized (it's currently not used). I tried Greebo this morning, and it really does nothing for me. Especially since I've setup separate compile/test classpaths (read from lib.properties). It'd be a real pain with Greebo to separate out the classpath's for testing and building - it seems to only support one long classpath. Also, who wants to make their whole best-practices open-source app dependent on a 0.1 open-source app?

As for having my IDE (wether it be Eclipse or IDEA) reading the classpath from Ant - that would be the sweetest feature of the year! Currently in Eclipse and IDEA, I have to give an absolute path to j2ee.jar since I don't want to distribute it (it's 11 MB). When I switch b/w OS X and WinXP, I always have to change this classpath. I'm sure there's an easier way with setting variables in the IDE, I just haven't figured it out yet.

The other thing that is annoying is that IDEA doesn't seem to read my $ANT_HOME environment variable. Does it have it's own $ANT_HOME? It's annoying for me b/c I check for JUnit classes in the classpath in my "init" task, and IDEA doesn't find them. Don't worry Eclipse bashers - it doesn't work in Eclipse either. This is fine with me b/c I prefer the command line, but those "I use my IDE for everything" folks might not like it because they can't run AppFuse's build.xml file from w/in their IDE.

Posted in Java at Oct 23 2003, 06:21:59 PM MDT 7 Comments

Blogging leads to Free Book

This blogging thing rocks. Today I got one of the books I've been meaning to buy - for FREE! Check out the following e-mail I received from Manning:

Hello Matt:

We are contacting you regarding Vincent Massol's new book, JUnit in Action, which Manning will be publishing in November. Vincent mentioned that you might be interested in certain parts of the book which relate to topics recently discussed on your blog http://www.raibledesigns.com/page/rd. There is a chapter on unit testing tag libraries.

He has asked us to offer you a complimentary copy of the PDF ebook which just became available today. We hope you will find it of interest.

Sweet! Thanks Vincent! I read the chapter on unit testing tag libraries - very clear and to the point. Unfortunately, for tags with bodies, you still have to verify HTML, so tagunit might be better for these. I like the coverage on the Maven Plugin for Cactus and also how to use JSTL's ExpressionEvaluatorManager for reading tag attributes. The link I found, the chapter has code samples.

I've never really liked eBooks, but I have to admit, this is pretty damn convenient. Especially since I tend to pack around 10-20 books to each new contract. What about sharing? Can I let co-workers borrow my PDF like I let them borrow my books?

Posted in Java at Oct 22 2003, 01:43:16 PM MDT 4 Comments

Want my job?

My current client has posted my position on the Rocky Mountain Internet User Group Mailing List. If you live in the Denver area (commute from Boulder is better), this is a fun gig.

Posted in Java at Oct 21 2003, 08:56:02 AM MDT Add a Comment

Upgrading from Struts 1.1 to Nightly build

I'm upgrading our application at work to the nightly build (20031020) of Struts in order to use the validwhen Validator. I found a few deprecations and errors in the process, so I thought I'd share to help others upgrade easier:

  • ActionError has been deprecated in favor of ActionMessage. Likewise, ActionMessages.GLOBAL_MESSAGE replaces ActionErrors.GLOBAL_ERROR.
  • Methods in ResponseUtils have been deprecated in favor of TagUtils' methods.
  • RequestUtils.message has been deprecated in favor of TagUtils.message. Other methods include RequestUtils.lookup.
  • Many of the methods in TagUtils aren't static (they where were in Request/ResponseUtils), so you have to create an instance of TagUtils. Anyone know the logic here?
  • ValidatorResources.get deprecated in favor of ValidatorResources.getForm.
  • ValidatorForm.getFieldMap() is gone, which no apparent replacement method (at least not in the JavaDocs).
  • The Tiles' Controller interface's perform method has been deprecated in favor of execute. You gotta love this one - while perform has been deprecated, you must use it or you will get a compile error saying you must implement it (or declare your class abstract). Same goes for execute. So to upgrade, I had to implement both methods - where my perform method calls my execute method.
  • org.apache.commons.lang.NumberUtils moved to org.apache.commons.lang.math.NumberUtils
  • org.apache.commons.validator.ValidatorUtil moved to org.apache.commons.validator.util.ValidatorUtils
  • stringToInt(java.lang.String) in org.apache.commons.lang.math.NumberUtils has been deprecated. Not according to the its JavaDoc.

Final tally - two deprecation errors that don't seem to have replacements (yet):

    [javac] .../src/web/org/appfuse/webapp/filter/BreadCrumbFilter.java:182: 
        warning: stringToInt(java.lang.String) in 
        org.apache.commons.lang.math.NumberUtils has been deprecated                                                                                                  
    [javac]        int mSS = NumberUtils.stringToInt(temp);                                    
    [javac]                                  ^                                                      
    [javac] .../src/web/org/appfuse/webapp/taglib/LabelTag.java:71: warning: 
        getFieldMap() in org.apache.commons.validator.Form has been deprecated                              
    [javac]        Field field = (Field) form.getFieldMap().get(fieldName);               

Later: Thanks to Steve Raeburn (via the struts-dev mailing list), I now have no deprecation errors. NumberUtils.stringToInt(String) is now NumberUtils.toInt(String) and Form.getFieldMap().get(String) is now Form.getField(String). Thanks Steve!

Posted in Java at Oct 20 2003, 10:22:00 AM MDT 2 Comments