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.

[ANNOUNCE] Eclipse 2.1 Released!

Sweeettt!!! Hopefully the release cycle will now slow down a bit so I don't have to keep installing Release Candidates every week. If you're a enthusiastic Eclipse user like me, be sure and read what's New and Noteworthy in 2.1. [Download Now]

Thanks to Andres Bonifacio for the tip.

Posted in Java at Mar 28 2003, 08:19:26 PM MST Add a Comment

OSCache doesn't play nicely with Tiles

I was hoping to use OSCache to cache my JSP pages to overcome my 15-seconds-to-load performance issue. I was hoping to simply place <cache:cache> tags around my entire Tile's baseLayout.jsp. However, I was disappointed to find that this did not work. I get this nice error message:

Can't insert page '/common/header.jsp' : Illegal to flush within a custom tag 

I even tried it just surrounding my 200+ row table of indexed properties, but no dice, same error. Oh well, onto caching with Hibernate's JCS support.

Posted in Java at Mar 27 2003, 09:19:45 AM MST 2 Comments

Are you a contractor wondering what you should charge?

I'm sure all of you have wondered what you should be getting paid for your services. Especially if you're a contractor. It sucks that you never know if someone is making more than you. In our society, it's sometimes taboo to discuss how much you make. That's why I like the Government Jobs - sure they pay less, but you know exactly how much everyone makes. Anyway, the purpose of this post is to point you to RealRates.com where you can see what other folks are getting paid. I encourage you all to add your rates. Moving to Florida doesn't look so bad when you search on Java and Florida.

Posted in Java at Mar 27 2003, 08:55:28 AM MST Add a Comment

Which caching framework to use?

I discovered this afternoon (after I got everything working - thanks to Jason's comment) that the main process in the webapp I'm building (day job) takes 15 seconds to process. It could be have something to do with the fact that the HTML page itself is 1.5MB of data (view-source, save as). And it's a very lightweight page as we're using strict XHTML and mucho CSS. So now it's time to start looking into caching frameworks. For the web/JSP side, I'll probably use OSCache. It's seems to be more tried and true, and commons-cache is still in the sandbox. If any of your have experience, chime in so I don't pick the wrong one! Another method I'm going to try is using JCS with Hibernate. Since I'm using XDoclet already, all I have to do is add the following to the top of my persistable objects.

@hibernate.jcs-cache usage="read-write"

Posted in Java at Mar 26 2003, 04:40:52 PM MST 2 Comments

Struts Upgrade: 1.1 RC1 to Nightly Build (20030326)

I decided to upgrade from Struts 1.1 RC1 to a nightly build this morning, hoping to get the fix for the Validator bug that requires an Internet connection. I was also hoping to solve an issue I have where Eclipse thinks that ListUtils.sum(list1, list2) is deprecated (not so according to it's JavaDocs - Ant doesn't seem to think it's deprecated either... wierd). However, instead I was greeted with a couple of new deprecation errors that you might want to know about.

  • ConvertUtils.setDefaultLong(long) has been deprecated. Again, not according to its javadocs.
  • Action.MESSAGES_KEY deprecated in favor of Globals.MESSAGES_KEY

The good news is that the Validator bug is indeed fixed and I don't have to set my proxy host/port variables for Tomcat anymore.

Posted in Java at Mar 26 2003, 11:23:24 AM MST 3 Comments

Hibernate: Comparing Objects

I'm having an interesting problem with Hibernate this morning, hopefully you can offer some assistance. Basically, I have an object called Parent that has a property called Kids. The List of Kids is set the from UI on an update using indexed properties. My UI is somewhat dynamic in that kids can be removed from the table using JavaScript - and then this record is not passed in via the request. My update works just fine, however, these deleted kids need to be removed from the database.

My initial solution was to (using Hibernate) get a list of the existing kids for the parent after the updates/inserts had occurred:

List dbKids = 
    ses.find("from k in class " + Kid.class
             + " where k.parentId=?", k.getParentId(), Hibernate.LONG);

if (!parent.getKids.containsAll(dbKids)) {
    // loop through the dbKids and delete ones not not passed in
    for (int i = 0; i < dbKids.size(); i++) {
        Kid kid = (Kid) dbKids.get(i);
        if (!parent.getKids().contains(kid)) {
            ses.delete(kid);
        }
    }
}

The problem I'm having is that my kids that are passed in (parent.getKids()) contain empty Strings for their null String properties. This (I'm assuming) is done by BeanUtils.copyProperties(). However, the kids in dbKids contain null for their null properties. Any ideas/suggestions are appreciated. I'll try digging into BeanUtil.copyProperties() and see if I can solve it there.

Posted in Java at Mar 26 2003, 10:11:05 AM MST 2 Comments

Tomcat 4.1.24: No More OutOfMemory Errors

I know I'm probably jinxing myself, but I'm going to say it anyway. I just checked my catalina.out file (a.k.a. Tomcat's log file) and I haven't had an OutOfMemory error since I upgraded to Tomcat 4.1.24. I was getting them all the time with Tomcat 4.1.18. Hopefully you've seen the same stability increase. I'm sure this site will crash with an OutOfMemory error as soon as I finish this post! ;0)

Update: I send a message to Keith to verify that Tomcat hasn't crashed since Saturday night. Here is his response.

The cron job hasn't had to restart it, and there are no out 
of memory errors in the log.  I can't find any sign that it
failed since then.

Keith

Sweeeeeettt!!

Posted in Java at Mar 26 2003, 07:41:57 AM MST 6 Comments

Gentoo Linux

A friend hooked me up today with some knowledge I didn't have. He told me about Gentoo Linux, which, according to him, is 3-4 times faster than any current Linux distribution! Wow - that's a LOT faster. This might mean that my 300 MHz, 256 MB (RAM) machine is usable again. Here's some snippets from our IM conversation.

You build from the command line through lynx, then update your kernel through a tool called 'emerge'. Want cvs? type 'emerge cvs'. Want jboss, type 'emerge jboss'. Basically, you emerge what you want and ignore all the rest of the stuff you typically get in a pre-canned, pre-built linux os.
...
works great on intel, sun, powerpc and the mac.
...
no more rpms and tar balls. just emerge. Each week, if I want to update all the apps I have emerged on my machine, I type, as root, two commands "emerge sync" (updates my portage tree), then, "emerge -u world". This says, look at all the apps I've emerged, and update them. Emerge then finds the tar balls, pulls them down, unpacks, compiles into the kernel and goes onto the next one. Want OpenOffice? 'emerge openoffice' (this takes about 8 hours to compile).

Sounds very cool - has anyone tried it?

Posted in Java at Mar 25 2003, 02:16:32 PM MST 7 Comments

DBUnit and CLEAN_INSERT

A few days ago I was trying to hook DBUnit into my test process so that my database would contain the same data before my JUnit tests are run. I had some issues getting it to work and later found that there was a bug in DBUnit's ant task. Basically, it was not allowing me to disable batch statements. Anyway, it's been fixed in CVS and now my JUnit tests (all run through a common test-module task) depend on a "db-load" task. Pretty cool and awful easy to configure. I'll be updating struts-resume/appfuse in the next few days to contain this slick trick. In the meantime, here's my db-load target. The file sample-data.xml is also built using Ant via DBUnit's "export" task.

<target name="db-load" description="Loads database from exported DBUnit file">
    <property name="operation" value="CLEAN_INSERT"/>
    <property name="file" value="metadata/sql/sample-data.xml"/>
    <dbunit driver="${hibernate.connection.driver_class}"
        supportBatchStatement="false"
        url="${hibernate.connection.url}"
        userid="${hibernate.connection.username}"
        password="${hibernate.connection.password}"
        schema="${hibernate.connection.schema}">
        <operation type="${operation}" src="${file}" format="xml"/>
    </dbunit>
</target>

Posted in Java at Mar 25 2003, 11:13:58 AM MST Add a Comment

[ANNOUNCE] Display Tag Library 0.8.5 Released!

I spent some time yesterday assembling the release notes, enhancing the build process, and updating the documentation for the display tag library. The result is a new release!

This release is primarily a bug-fixing release and also represents the first release from the project at SourceForge. If you would like to have a say in the future direction of this project, please join one of the mailing lists. [Release Notes] [Download]

Enjoy! I updated two projects with this new release today and it helped eliminate a lot of "workaround" code I had. The next thing I'd like to see - the ability to specify ResourceBundle keys for column titles.

Update: Ed Hill has updated this project's homepage with the latest examples and documentation.

Posted in Java at Mar 24 2003, 09:26:52 PM MST 3 Comments