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.

Struts and JSF - Sample app is on its way!

Craig McClanahan just sent the following message to the struts-dev mailing list after creating a new struts-faces directory (and sub-directories in Struts' CVS tree.

Yep ... it's here ... the promised integration library that lets you use the recently published EA3 release of JavaServer Faces with a recent Struts 1.1 build (see the README.txt for details). Unfortunately, the CVS commit for the actual code was too big for the mailing list -- essentially, it's all the files in the "contrib/struts-faces" subdirectory.

My plan is to publish nightly builds of this code (it's EA quality) but *not* to incorporate it into any formal 1.1 release. More info in an announcement message to come shortly.

Craig

You and I both know the best way to learn JSF (and JSP 2.0) is to start using it on a project. Whether it's your own, an open source project, or a paid project - it's truly the fastest way to enlightenment. I was lucky in my quest to learn Hibernate - I had two concurrent projects (struts-resume and paid) using it.

As far as computers are concerned, I've had a pretty bad day. After writing a long e-mail (about as long as this post), I kicked back in my chair to hit send and kicked the power cord out of the socket! Doh! This actually happens about once a day, but usually I'm coding and testing and I'm saving every 30 seconds. Secondly, I had this post all written and formatted about 10 minutes ago, and Phoenix crashed when I switched tabs to copy/paste something. Damn thing - it's been crashing a lot lately. It might be time to revert back to IE (am now) or Mozilla.

Posted in Java at Mar 06 2003, 08:53:38 PM MST Add a Comment

How do you initialize Hibernate?

If you're using Hibernate in a servlet container, then you're probably using a hibernate.cfg.xml file to configure Hibernate and talk to your JNDI database connection. If you're not, you might want to consider it. My question is, where do you initialize Hibernate? In version 1.2.3, you call Hibernate.configure() to do this, and everything will startup and be ready - providing that hibernate.cfg.xml is in your classpath (WEB-INF/classes).

// Configure Hibernate.
try {
    Hibernate.configure();
    if (log.isDebugEnabled()) {
        log.debug("Hibernate configuration completed...");
    }
} catch (HibernateException h) {
    h.printStackTrace();
    throw new UnavailableException("Error configuring Hibernate: " + h.getMessage());
}

I've been using a StartupServlet that is set to load first, and is also responsible for putting drop-down options into the application scope. However, it has recently come to my attention that I could easily use a ServletContextListener and initialize it (and my drop-downs) in the contextInitialized() method.

So my question is - which is better? From what I can tell, they do the same thing and I've never had any issues with the StartupServlet. Can anyone offer some pros/cons to each approach? Which do you use?

Posted in Java at Mar 06 2003, 04:08:14 PM MST 6 Comments

Java Server Faces Demos!

Dave points out that there's a new Java Server Faces spec available.

The Server Side also reports that Sun has released Java Server Faces (JSF) Early Access 3, a tutorial, and a public draft of the JSF spec.

If you're like me, you just care about the code and how it looks. So I've taken the five war's that are distributed with this release and installed them on this site. If I get too many OutOfMemory errors, I'll remove them - but hopefully they can stay up for a day or two.

Posted in Java at Mar 05 2003, 10:28:34 PM MST Add a Comment

[ANNOUNCE] Ant 1.5.2 Released

It actually happened yesterday, but I've seen little signs of the word being spread, so I'm here to help. Get it from the main distribution site while the mirrors catch up. I don't think it has anything I need at this point. But I'm upgrade happy, so I'll do it tomorrow.

Posted in Java at Mar 04 2003, 07:22:24 PM MST Add a Comment

Ant JMeter Task

By now, you've probably heard of JMeter. It's basically a Swing-based performance testing framework. From the struts-user list today, I found out there's a JMeter Ant Task. Sweet - looks easy to use too. Now if I could just figure out JMeter, or better yet - be tasked with actually implementing it. I've played with it a couple of times, but never long enough to get something I rely on and use.

Anthill, on the other hand, was so easy to install and use that I've set it up at home and I've automated some of my projects' build/deploy processes. I might have to add Roller to the mix. If I were real daring, I could set it up on this server and build/deploy Roller every day or so. Of course, I wouldn't keep this site up to the latest version - I'd setup a 2nd instance of Roller. Any interest in this? Or better yet, do you know anyone that's hosting an Anthill install that we can use?

Posted in Java at Mar 04 2003, 02:07:49 PM MST 1 Comment

[ANNOUNCE] Tomcat 5.0.1 Alpha Released!

This is huge for me, as I need to start working with JSP 2.0 for my own personal satisfaction (less code == more productivity). I know that Resin supports JSP 2.0 as well, but I'm familiar with Tomcat and it's free. The most I've ever done with Resin (to this point) is to install it. To my knowledge, Resin is not free (esp. when I'm running a business site like this one). Anyway, on with the e-mail from the tomcat-user mailing list.

Tomcat 5.0.1 Alpha is now available for testing.

This is actually the first real milestone of Tomcat 5, as Tomcat 5.0.0 did not include any new feature over 4.1.x other than the support for Servlet API 2.4 drafts and JSP 2.0 drafts.

Tomcat 5.0.1 includes:
- improved performance (with additional improvements planned)
- complete montoring capabilities through JMX, with JSR 77 support
- clustering capabilities (not included with that build as a binary)
- JMX configuration capabilities
- with a lot more to come in later milestones

[Downloads]

Posted in Java at Mar 04 2003, 10:00:20 AM MST Add a Comment

The Debate is flawed: Struts vs. WebWork

Personally, I think the debate between Struts and WebWork is irrelevant. This is because I don't think that the Web Application frameworks are the problem. I spend most of my days getting persistence to work. Granted it's gotten a whole lot easier with Hibernate, but I've spent a lot of time tackling that learning curve in the last couple of months. Thanks to Dave Johnson and Gavin King for guiding me up the curve. I spend about 30 minutes each day writing Struts-related code, if that. More time is spent writing tests, CSS, JavaScript (the most time) and DAO's/Managers.

So the problem is my brain. If I could just get the damn thing to work right - it wouldn't matter which framework I chose, because I'd just know it. No learning curve == awesome productivity.

The WebWork guys claim to have this. Therefore, I'm interested. However, who's hiring WebWork gurus? Heh - I know - what I really need to do is learn WebWork and then I can offer an unbiased opinion. Right now, no one is offering an unbiased opinion. Patrick is heavily invested in Struts, as am I. Heck, I've written a chapter about it and I've used it on many project. Jason is invested in WebWork as he's a committer.

Baaah, I'm just gonna learn .NET - that's where the Florida Jobs are. Struts .NET and WebWork .NET - maybe I should work on getting those started. ;-) The post is meant to be read with a smile on your face - I don't want to start yet another flame war.

Posted in Java at Mar 03 2003, 04:13:58 PM MST 2 Comments

Hibernate's Query Language (HQL) vs. Object Query Language (OQL)

Gavin King has posted an interesting comparison between Hibernate's Query Language and ODMG's OQL Specification. This might be interesting if you're familiar with OQL. For me, I know SQL and using HQL is so similar to SQL that I hardly even know I'm writing it most of the time. I think HQL will become a de facto standard in the coming years. Does JDO use OQL? Is anyone even using JDO?! It's strange because the only Java projects I'm familiar with (or hear about) are the ones from Java Bloggers - and everyone seems to be migrating to Hibernate. Good idea IMO!

Posted in Java at Mar 03 2003, 01:46:45 PM MST Add a Comment

Will Apple release JDK 1.4.1 today?

According to MacRumors.com, Apple should be releasing JDK 1.4.1 Final today. I sure hope so. The latest release (Developer Preview 10) has been working fairly well for me. Then again, I only do server-side Java, so I'm sure my perspective is skewed. My fingers are crossed.

Posted in Java at Mar 03 2003, 07:00:00 AM MST Add a Comment

Another Example App and Job Hunting in Florida

I released another example app today - security-example 1.0. This is basically the example app for the "Web Application Security" chapter I wrote for Wrox. There's nothing ground-breaking in it, and in fact, it's just a stripped down version of struts-resume. It'll probably only be useful for those folks that buy the book. For those that choose not to, but still want an example, I invite you to download struts-resume. Regardless, here's the release notes for security-example 1.0:

Features in 1.0
===============
Allows user to login using different Tomcat Realms.  Sample realm configurations
are located in metadata/web/tomcat-context.xml.  Wrox's Professional JSP 2.0, 
Chapter 13, describes how to setup a MemoryRealm, a JDBCRealm, a JNDIRealm
and a JAASRealm.  

Retrieves user's information from a MySQL database using a Filter and Container
Manager Authentication.

"Remember Me" Feature using cookies.

Encrypted passwords using native Tomcat feature or programmatically.

Advanced build/deploy process using Ant and XDoclet.

SSL-based login, optional switch back to regular http after logging in.

For more information, and a further developed example application with these
same features, see struts-resume at http://www.raibledesigns.com/downloads.

It feels good to finish up these example apps for the book. I'll keep developing struts-resume, but I'm going to take some time off to enjoy my evenings/weekends and tone down my moonlighting for a week or two.

My latest and greatest passion will be trying to find a job/contract in Florida. I realized this evening that this doesn't necessarily mean that I have to work for a company in Florida - I could telecommute. However, it is tough to convince companies/clients that this is a good thing. In general, I think I get a lot more done telecommuting (I did it for all of 2002) - but I definitely enjoy an office environment more. Being motivated and inspired to do your job, and collaborating with co-workers can be huge for morale. On Friday, a co-worker and I integrated some stuff we'd been working on for weeks, and it felt awesome once we got it working. The best part - we'll still be pumped about it tomorrow when we give a demo.

I did some research today and conducted a search for Java User Groups in Florida. I found that there were two folks interested in starting groups in West Palm Beach (where we want to live) and in Ft. Lauderdale. The only existing user group I found was the South Florida Java Users Group.

Their February Meeting looks OK, but if I lived there, I'd probably pass. It doesn't seem like they're getting nearly the caliber of speakers we're getting in Denver. To me this says a few things: (1) it could be an opportunity to inspire a JUG to get (or help them get) better presentations, (2) it's gonna suck to move to Florida from a vibrant Java Community, or (3) it's gonna be tough to find a gig there. I think I'd better buck up and only focus on #1. Wish me luck - know anyone that's hiring (my resume)? ;-)

Posted in Java at Mar 02 2003, 10:28:25 PM MST 2 Comments