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.

Maven Console and setting properties

I've been using Maven at my new gig and the Maven Console in order to avoid its painfully slow startup times. Using a slow-ass PowerBook in conjunction with Maven makes my face turn read and my ears smoke sometimes, but I'm getting used to it, much to my dismay. While the console has made things tolerable, Maven itself keeps getting in the way. I hate how it *requires* me to run my tests everytime I build or deploy. So I've turned that off by creating a build.properties file with "maven.test.skip=true". The problem with the Maven Console is it doesn't let me turn tests back on, so I'm stuck with running "maven test -Dmaven.test.skip=false" when I want to run my tests.

There's two ways I can think of to solve this problem:

  • If "maven idea:multiproject" allows me to setup my project so that Tomcat/Resin/whatever can point to my source directory and I don't have to deploy. I'm a web developer, and I typically have to run "maven deploy" to test simple UI changes. That's why I turn the tests off - because I want a 1-2 second turnaround to see my changes. BTW, it's too bad there's no "eclipse:multiproject" goal.
  • Enhance the console so it's possible to set properties. For example, typing "-Dmaven.test.skip=false" would set the property so the next time I run "maven war", my tests would be run. That, or allow me to run "maven war -Dmaven.test.skip=false". Allowing this would also make it possible to run a single test from the command line, instead of all (the only current option).

Posted in Java at Jan 20 2005, 09:43:30 AM MST 11 Comments

JCIFS and jWebUnit

On my current project, we're using JCIFS to integrate our application authentication process with NT Domain logins. While I found it quite easy to integrate, the one issue I found is I couldn't replicate the login process in a jWebUnit test. I tried setting the WWW-Authentication header to NTLM, but couldn't get it to work. The solution I ended up using is to subclass the NtlmHttpFilter and disable authentication when the User-Agent is "httpunit".

public class LoginFilter extends NtlmHttpFilter {

  public void doFilter(ServletRequest req, ServletResponse res,
                         FilterChain chain)
    throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequestreq;
        String userAgent = request.getHeader("user-agent");

        // prompt for login, except when jWebUnit is used
        if (userAgent == null || !userAgent.startsWith("httpunit")) {
            super.doFilter(req, res, chain);
            return;
        }

        chain.doFilter(req, res);
    }
}

Hopefully this is useful for others. If you've managed to get regular jWebUnit authentication working with NTLM, I'm all ears.

Posted in Java at Jan 20 2005, 09:34:41 AM MST 16 Comments

Using JasperReports with AppFuse and Spring

In Spring 1.1.3, support was added for using JasperReports with Spring MVC. Today, Gregory Beumer posted a nice overview of JasperReports. This inspired me to dig up Gilberto's post on How to integrate JasperReports with AppFuse. If you're looking for a reporting solution in your AppFuse-based application, and you're using Spring MVC ... enjoy! I plan on adding this to the wiki in the future, along with howtos for integrating JasperReports with Struts, WebWork, JSF and Tapestry. If you happen to know of tutorials for integrating JasperReports with these other frameworks, please let me know.

Posted in Java at Jan 20 2005, 08:12:04 AM MST 17 Comments