1. A Quick Introduction to sed(1)

    The sed(1) stream editor is one of the most powerful tools from the classic Unix tool box. It is a close cousin to the ed(1) command line editor and a descendant of the ex(1) editor, the command line mode of vi(1). In this article I'll show …

    read more
  2. Spring Boot: Logging Failed Logins

    In many applications it's important to react to failed logins and other security-critical events, for example to log the failed login attempt to a file or to display a captcha after repeated failures. Spring-based applications come with a simple mechanism to access this kind of information using Application Events.

    Spring's …

    read more
  3. The Curse of Convenience Methods

    In the old days, many Java APIs were fairly low level and pretty generic. You often had to explicitly select a concrete implementation, provide lots of parameters, and generally needed to know how things worked. This has changed in recent years - modern APIs provide lots of convenience functionality that raises …

    read more
  4. Empty InputStream with Spring MVC

    The other day, I was trying to build a simple batch upload interface for a Java web application running Spring Boot with Spring MVC on Apache Tomcat. But when I tried reading the InputStream in my controller, it was always empty. Fortunately, this turned out to be quite easy to …

    read more
  5. Checking Whether a Process Exists

    On Linux/Unix systems, there's occasionally the need to check whether a process is running. Some people use it for simple status checks or when building their own lifecycle scripts for startup and shutdown. I don't think it's a particularly good practice these days because all of this can be …

    read more
  6. Detecting HTTP/2 Support

    Thanks to Ubuntu 16.04 which includes a fairly recent Nginx version, I have now enabled HTTP/2 on my private server. Of course, I also wanted to verify whether my configuration change had any effect - after all, there is no visible change (except for a little speed-up). One option …

    read more
  7. Migrating to HTTPS

    There's more to migrating a complex site to HTTPS than just enabling TLS in your web server or reverse proxy. All links to embedded resources like style sheets, images, or scripts need to be served via HTTPS and potentially have to be rewritten. In a well-designed site that's not an …

    read more
  8. Resolving JARs

    Sometimes it's useful to check whether a local JAR file is available from Maven Central, for example when converting an old build system to Maven. In many old systems, JARs aren't named consistently and versioning info isn't available. Fortunately, Maven Central has a search interface that supports lookup by a …

    read more

« Page 2 / 18 »

social