Matt RaibleMatt Raible is a Web Developer and Java Champion. 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.

Colorado JUGs

The last two nights I gave talks at the Denver JUG and Boulder JUG meetings. On Wednesday night, I presented AppFuse in the basic concepts meeting and Thursday I was the main speaker at BJUG. Both meetings were great and my presentations went pretty well. Denver had about 50 attendees and Sue Spielman gave a very informative talk on J2ME. To me, J2ME seems like the equivalent of Swing for the Desktop. Building mobile-friendly websites seems like an easier route - then you don't have to worry about how the phones differ. Maybe I don't know enough about J2ME - why should I write a J2ME app when I can write a webapp? To me, it seems that I should stick with what I'm familiar with - and if I do choose to get into the mobile space, websites would be the way to go. My phone (a T68i) was very helpful last week in San Deigo. I used it's internet access and go2.com to find directions to several locations in San Diego. I just told the website to "auto-locate" me, then I'd type in an address and voila - it spit out a list of directions. Bruce and James also wrote about the Denver meeting.

Last night was the Boulder meeting, where Scott Davis kicked it off with a talk on Struts. My AppFuse presentation could've been much better if I based mine off of Scott's. I do some live coding of a DAOTest and a DAO in my presentation - and I think the audience would've gotten a lot more out of it if I'd showed them how to develop Actions and JSPs with AppFuse. Oh well, that's what the tutorials are for. I also like showing the DAO stuff because it shows the power and simplicity of the Hibernate+XDoclet+Spring combination. It's pretty cool to mention that integrating Spring into AppFuse only took a few hours. During integration, I remember deleting 5 or 6 classes/files and reducing my LOC count by about 75%.

After the meeting, I talked to one guy who was interested in adding a Swing front-end to AppFuse. I told him it shouldn't be too hard since the dao and service layers are already packaged as JARs. From a Swing app, you could easily reuse the business delegates and DAOs to talk to a database. The hard part would probably be mimicing authentication and authorization. I'm guessing that JAAS could probably provide a nice standards-compliant solution for this. I'm sure Spring's RCP project could make developing this front-end even simpler. I also talked to Kris about helping with the WebWork version of AppFuse. Hopefully he can help me out and make that happen sooner than later. I'm still targeting the end of July for a WebWork/Sitemesh-enabled release, as well as lots of enhancements to IDE friendliness.

Both meetings where followed by beers and good conversation. Last night, the tavern we were at lost power after about an hour. That didn't stop us from spending another hour in the dark telling old war stories. Good times - thanks to all who participated!

Posted in Java at Jun 11 2004, 10:00:24 AM MDT 7 Comments

JSF can mimic Tapestry?

According to this article, JSF can do everything Tapestry does. Of course, there's a discussion on TheServerSide.com - and it's worthless so far. Hopefully some Tapestry users will chime in and we'll get some real feedback. IMO, this shows that JSF might have some real power - what's stopping it from mimicing other frameworks' favorite view technologies?

Posted in Java at Jun 10 2004, 10:35:47 AM MDT

Using JAAS with Tomcat

Want to use JAAS with Tomcat? If so, you might want to checkout this Using Tomcat with JAAS tutorial.

Although it is possible to use JAAS within Tomcat as an authentication mechanism (JAASRealm), the flexibility of the JAAS framework is lost once the user is authenticated. This is because the principals are used to denote the concepts of "user" and "role", and are no longer available in the security context in which the webapp is executed. The result of the authentication is available only through request.getRemoteUser() and request.isUserInRole().

This reduces the JAAS framework for authorization purposes to a simple user/role system that loses its connection with the Java Security Policy. This tutorial's purpose is to put a full-blown JAAS authorisation implementation in place, using a few tricks to deal with some of Tomcat's idiosyncrasies.

Personally, request.isUserInRole() usually does everything I need. If I need something more than that, it's usually pretty easy to add some custom logic. Of course, if I ever need anything super robust, I'll probably use the Acegi Security System for Spring.

Posted in Java at Jun 03 2004, 10:30:27 AM MDT 3 Comments

Know AppFuse? Wanna job?

It's too bad I've already signed a contract for the next couple of months. Today, on the appfuse user mailing list, a 2 month contract came across the wire.

Hello everyone,

My name is Mark Janveaux, I'm Chief Technology Officer at Mobile Design Technologies (http://www.mobiledesigntech.com) a software firm specializing in mobile applications for the healthcare industry.

We are developing our next generation project right now which is based off of AppFuse 1.5, and have an open position for a developer experienced in the relevant technologies (Java,JSP,Struts,Hibernate).

It's an simple but interesting project. Project length will be about 2 months with definate possibility of extension.

Position may be part time or full time depending upon your availability, skills, experience and salary expectations.

If any of you are interested, please contact me at:

Email: mjanveaux-AT-mobiledesigntech.com
Ph: 250.483.3430

This position can be 100% telecommute if necessary.

Kind regards

Mark

Of course, you probably don't need to know AppFuse. If you've worked with Hibernate, Spring, Struts, JUnit and Ant - you've probably got a good chance.

Posted in Java at Jun 02 2004, 01:18:52 PM MDT

How do you make your source tree Eclipse/JUnit friendly?

I've never had a problem getting builds and unit tests to work with Ant. However, unit tests run faster in an IDE, so I'm trying to refactor some code to allow for testing in the IDE. My current directory structure looks like this:

-- project
   - web
     - WEB-INF
       - classes

I need both "WEB-INF" and "WEB-INF/classes" in my classpath. There's XML files under WEB-INF for Spring and Commons Validator, and there's a log4j.xml under WEB-INF/classes for log4j. These files are all in their natural locations as far as all the projects I've seen. However, Eclipse won't allow me to nest classpaths - so it's virtually impossible (as far as I know) to add both directories to my classpath. Any ideas how to workaround this Eclipse "feature" are appreciated.

For those "IDEA is better" folks - I agree. IDEA allows me to add web, web/WEB-INF and web/WEB-INF/classes to my classpath with no issues.

Posted in Java at Jun 02 2004, 12:46:10 AM MDT 6 Comments

The Java Community - its strength is in its disunity

Charles responds (in a comment) to Ted's accusation that .NET's community is better than Java's.

Actually, the strength of the Java community lies in its disunity. Unity is a false strength: it's safety in numbers, but it's also a herd mentality. I suspect the drive for "strength in unity" is a reflection of Microsoft's philosophy of dominance: that the best thing for the world is if everyone just Does Things Our Way: A computer on every desk running Microsoft software. The Java community has competing infrastructure vendors. We have a raft of competing web frameworks, competing AOP frameworks, competing persistence frameworks, competing IDEs, competing heavyweight and lightweight containers. And it's this competition that makes Java such a vibrant community. Nobody's quite satisfied with what the other guy's doing: everyone wants to do better. It's also what makes us, at times, a bunch of bickering children. That does us quite a bit of harm, but I think in the long run things work out for the best.

Well said.

Posted in Java at May 31 2004, 12:04:14 PM MDT 2 Comments

Wanna get paid to learn Flex?

I've always said the best way to learn a new technology is to get paid to do it. Do you live in Newton, MA or San Francisco and wanna learn Macromedia's Flex? If so, you might want to checkout these openings. I've heard stories that it sucks to work for Macromedia - but it's always cool to get paid to learn.

Posted in Java at May 27 2004, 02:00:19 PM MDT Add a Comment

Tomcat 5.0.25 quietly released

Download · Changelog. Less than two weeks ago, Tomcat 5.0.24 Stable was released. However, it had a small bug where two cookies would be issued instead of just one - so a hotfix was released. Today, I discovered that 5.0.25 Stable is already out with a whole bunch of other fixes. Since there seem to be no announcements about this release - I thought you might like to know in case you have an upgrade planned.

Tomcat tip o' the day: When you install a new version of Tomcat, clean out its webapps directory (rm -r $CATALINA_HOME/webapps/*) and remove the balancer.xml from $CATALINA_HOME/conf/Catalina/localhost/. The webapps directory contains a number of sample apps that do nothing more than slowdown server startup. I also typically delete the "admin" application since I don't use that either:

rm -r $CATALINA_HOME/server/webapps/admin 
rm $CATALINA_HOME/conf/Catalina/localhost/admin.xml

Lastly, don't forget to add a user with a "manager" role in $CATALINA_HOME/conf/tomcat-user.xml. This way you can use the slick Manager app (http://localhost:8080/manager/html) to install/start/stop/reload/remove webapps.

Update: After installing this release, I discovered that looking up a Mail Session in JNDI doesn't work. It's possible its a bug in my configuration, but it's worked fine on all previous 4.1.x and 5.0.x releases. Because of this, I recommend sticking with 5.0.19 or 5.0.24.

Update 2: This has been verified as a bug in 5.0.25.

Posted in Java at May 27 2004, 12:18:11 PM MDT 3 Comments

[ANN] AppFuse 1.5 Released!

I finally found time to fix a few minor bugs in AppFuse 1.5 Beta and update all the tutorials. Now there's 3 new HowTos for developing a Master/Detail page using Spring's MVC Framework. After writing the tutorials, I found a new appreciation for Spring's MVC. I really like its lifecycle and (if given the opportunity) I think I'll use it for my next project. Without further ado, here's the relevant links:

Enjoy!

BTW, if you live in Colorado and you want to learn more about AppFuse, Spring and AppFuse Light - stop by the Denver JUG on June 9th or the Boulder JUG on June 10th. I'll be talking at both events. As a teaser, here's the bullet points from my slide on AppFuse Light:

  • Designed for quick apps with few requirements (i.e. prototypes)
  • Uses Sitemesh for skinning
  • No build-time dependencies (i.e. XDoclet), no out-of-the-box security
  • Web tests do not depend on container
  • All code can be easily ported to AppFuse if you need AppFuse features (i.e. security, i18n, gzip compression)
  • Simpler, lighter, faster (for building and testing)

Posted in Java at May 27 2004, 04:18:08 AM MDT 8 Comments

Internationalization of webapps

There's a good that was published today on JavaWorld.com: End-to-end internationalization of Web applications. I stumbled upon it via TheServerSide.com. I especially like the tip about using a hidden "dateFormat" field in conjunction with Commons Validator to validate locale-specific date formats. AppFuse could certainly use this. Did you know that AppFuse supports 4 languages out-of-the-box and has full i18n support (save for the date format thingy). Supported languages include: English, Dutch, Brazilian Portuguese and Chinese. I opted to use JSTL's i18n support in most areas rather than Struts. It's simply more portable when moving to other MVC frameworks like Spring and WebWork.

Posted in Java at May 24 2004, 11:48:17 AM MDT 2 Comments