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.

AppFuse Changes: Unit Testing with Easy Mock and Spring's Struts Plugin

I have a couple of proposal for the next AppFuse release. Let me know what you think:

  • Change service and action/controller tests to use Easy Mock to mock dependencies. This will likely require a bit more code in the test, but it'll allow true unit testing of components. Current tests are more like integrations tests, which tend to be slower. The Canoo WebTests will continue to act as the integration tests that verify functionality top-to-bottom.
  • Change Struts to use Spring's Struts Plugin. XDoclet's Spring stuff should make this pretty easy so you don't have to modify any XML - just like the current situation. The advantage of this is you can use dependency injection on your actions, rather than getBean(...).

I hope to get these in, along with a WebWork option, in the 1.6 release. I'd love to get 1.6 done and released in August, but I'm probably dreaming since I'd like to finish Spring Live in the same time frame. Of course, I'm also planning on fixing any bugs that are currently entered.

Posted in Java at Aug 02 2004, 11:34:21 AM MDT 12 Comments

Pretty URLs in Tapestry

It looks like Tapestry 3.1 will have pretty URLs - which will make it much easier to use CMA. Identity Theft 911 has recently converted their 300+ page website from JSP to Tapestry. If you click through the site, you'll notice that the URLs what you'd expect to see, rather than Tapestry's ugly URLs. The best part is they explain how they did it, and Howard loves it:

Wow! You've prototyped Tapestry 3.1 for me :-) Only had a chance to look at the home page (I'm at a client) but it does look sweet.

Posted in Java at Jul 29 2004, 01:27:42 PM MDT 7 Comments

Moblogger re-written with Spring

About a month ago, someone sent me a re-write of Moblogger that was done using Spring. The other night I cleaned out my inbox (select all, delete) and then realized yesterday that I'd deleted the e-mail the guy had sent me. If you're out there and reading this blog - please send it again, leave a comment, or shoot me an e-mail. I'd love to use your code in place of what's already there.

Posted in Java at Jul 28 2004, 12:12:24 PM MDT Add a Comment

Eclipse Tips

From my Eclipse HowTo for Spring Live:

TIP: In order to clean up the project view in Eclipse, you can hide the files you don't need. First of all, make sure you're in the Java Perspective (Window → Open Perspective). Then click the little (down) arrow in the top right corner of the Package Explorer pane. Select Filters, check the "Name Filter Patterns" and type "*.jar" (no quotes) in the text field. Then in the list of elements, scroll down and check Referenced Libraries. Click OK to continue.

Another useful Eclipse trick is to use abbreviated package names. You probably won't need it on this project, but its nice on projects where you're inflicted with super.long.package.name.syndrome. Go to Window → Preferences → Java → Appearance. Check the "Compress all package names" checkbox and type "1." (no quotes) in the text field.

Want more tips? Ask Bill.

Posted in Java at Jul 23 2004, 04:02:39 PM MDT 16 Comments

Eclipse Plugins Updated for 3.0

I finally got around to updating my Eclipse Plugins package for Eclipse 3.0 → Download or read the Release Notes. Below is a list of plugins included in this download. I dropped Lomboz and JSEditor b/c they didn't work at all with 3.0 on Windows - which I expect is the largest user base. Additions include CSS Editor and Doclipse.

Colorer and Jalopy don't work on OS X, so I wouldn't even bother installing them. Colorer has issues on Linux too. For OS X, I'd recommend buying a subscription to My Eclipse. It's only $30 and if you can afford a Mac, what's another $30? ;-) For a source code formatter on OS X, I recommend buying IDEA - it's only $200 - same cost principle applies. I tend to use IDEA a lot more on the Mac simply b/c it's faster and you don't need to install all these plugins. However, I've been stuck a lot in Eclipse-land lately because of it's multiple-project-in-one-pane support - as well as it copies and pastes code nicely into Word.

In addition to these plugins, I recommend installing the Spring IDE Plugin if you're using Spring [HowTo] - and Spindle if you're using Tapestry. Hopefully, distributions like this will become unnecessary with the introduction of the Web Tools project.

Posted in Java at Jul 23 2004, 03:31:57 PM MDT 13 Comments

AppFuse discovers MySQL bug (on Windows)

As I mentioned in this article, AppFuse sometimes helps me find bugs in other open source projects. Yesterday, it helped me find one in MySQL 4.1.3b (on Windows). Thanks to Mark for his quick response - he says it'll be fixed in 4.1.4.

Posted in Java at Jul 23 2004, 07:36:24 AM MDT 1 Comment

10 minutes into Tapestry

As I'm trying to figure out the JARs required by Tapestry, I find that commons-upload.jar is required by default.

2004-07-21 17:12:47 StandardWrapperValve[tapestry]: Servlet.service() for servlet tapestry threw exception
java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
	at org.apache.tapestry.request.RequestContext.(RequestContext.java:153)

Huh?! That's wierd - I'm not doing any file uploading... (I know, this type of message belongs on the mailing list - I just thought it was funny ;-))

Posted in Java at Jul 21 2004, 05:15:47 PM MDT 2 Comments

My WebWork Experience

Yesterday I began converting a small application from Spring MVC to WebWork. By the end of the day I was pretty much finished, but shot an e-mail off the the user's list to figure out a few more things. Today was spent incorporating that knowledge and making the app follow more WW "best-practices". Below is a list of things I discovered:

  • WebWork's documentation is actually quite good. I was able to figure out most things just by reading it. I'm still surprised that most web app frameworks don't describe a simple CRUD operation as their first example. In my experience, CRUD is 80% of a webapp's job.
  • WebWork integrates with Spring quite nicely. It's interesting to see that Spring has most of its MVC Framework support as part of the core, but WW has its own. I wonder why? Who cares, it works!
  • WebWork is a bit better than Spring MVC in that they have a mechanism for saving/displaying success messages. However, it doesn't live past a redirect, so you're still stuck putting messages in the session. Struts (as of 1.2.1) allows you to use a saveMessages(session, messages) call - and subsequent JSP tag to display (and automagically remove). Like it or not, Struts seems like the easiest solution for developers to use.
  • There's no clean mechanism for cancelling validation when a user clicks on a "cancel" or "delete" button. Struts supports cancelling using it's <html:cancel> button and it's pretty easy to detect "delete" and cancel validation in a form's validate() method. I ended up using an onclick handler for my cancel button and not worrying about validation on delete. This is the way I did it with Struts for years. Spring is cool in that it has a processFormSubmission() method that you can override before validation kicks in.
  • With Commons Validator, I'm used to specifying generic validation messages like "errors.required={0} is required.". This is possible with WW by using "errors.required=${getText(fieldName)} is required.". However, WW is a bit unique in that validation rules and ResourceBundles are defined on a per-action basis. I like having a central location for all my messages - like Spring and Struts have. I know it's possible with WW, but I'm trying to develop a "best-practices" sample app.
  • I really dig that fact that you can use one JSP tag to render an entire <tr> in a table. This <tr> ends up having a label and an input field - which is very cool IMO. I did find some issues with the XHTML output, but found it very easy to submit patches. Good stuff.
  • The config files (xwork.xml and validators.xml) must be in WEB-INF/classes. This is because they're XWork configuration files, and XWork is a non-web framework. It would be nice if I could put these in WEB-INF - where the rest of my config files (Spring, SiteMesh, etc.) reside.
  • Many of the JSP tags require you to use "'literal value'" - where you put single and double quotes back-to-back. IMO, this is just ugly and I'd much rather put some sort of indicator that it's a dynamic value - i.e. ${...} or #.
  • I couldn't get client-side validation to work. Seems cool though.

My experience with WebWork has been quite pleasant. I received excellent support from the mailing list - even though it took me a while to subscribe. The mailing list archives are woefully out-of-date, but this is a general java.net problem - not a WW issue. Maybe they should create a forum until the mailing lists get back on track?

Hopefully this last day and a 1/2 will make it much easier to implement WebWork in AppFuse. Thanks for the support gents - now I'm off to learn Tapestry!

Posted in Java at Jul 21 2004, 03:41:58 PM MDT 8 Comments

Want to learn more about AppFuse?

AppFuse Home A couple of weeks ago, I wrote an article on AppFuse for java.net. I'm proud to say it was published today: AppFuse: Start Your J2EE Web Apps. This is my first "published" article - so it's pretty cool to see it up there.

One thing that's strange is the TOC links on the top right don't seem to work in any browser other than IE. Wierd. Now I just hope this site stays up since there's a lot of links that point here. It's a sort of weblog timeline about the birth of AppFuse - hope you enjoy!

Posted in Java at Jul 15 2004, 07:17:59 AM MDT 6 Comments

DJUG: JavaServer Faces and Java Studio Creator

Tonight's DJUG meeting looks to be another dandy one. Bill Dudney is doing a talk on JavaServer Faces and Java Studio Creator.

This talk will take you through the basics of building a JavaServer Faces application. You will understand how to build a basic JSF application. We will build an application manually and then build it again with Java Studio Creator. If time permits, we'll compare the two implementations to identify when and how to use JSCreator effectively.

I'm mainly looking forward to it because I know Bill uses a PowerBook and Creator sucks on the Mac - even though Bill doesn't think so. Should be fun heckling him from the crowd. :-D Of course, I'm also looking forward to learning more about JSF since I'll be using it next week.

Posted in Java at Jul 14 2004, 09:39:30 AM MDT 4 Comments