Home » Author Archives: Michael Scharhag

Author Archives: Michael Scharhag

Michael Scharhag
Michael Scharhag is a Java Developer, Blogger and technology enthusiast. Particularly interested in Java related technologies including Java EE, Spring, Groovy and Grails.

Java EE 8 MVC: Working with Path Parameters

java-interview-questions-answers

In the previous post we saw how to work with query parameters in Java EE MVC. This post continues with a very similar topic: path parameters. Path parameters are a dynamic part of the request path and can be specified with the @Path annotation. For example: @Controller @Path("path-params") public class PathParamsController { @GET @Path("/date/{year}/{month}") public String pathParamDate(@PathParam("year") int year, @PathParam("month") ...

Read More »

Java EE 8 MVC: Working with query parameters

java-interview-questions-answers

In the previous post about the new Java EE MVC Framework we had a detailed look on Controllers. In this and the following posts we will see how to access various types of request data in MVC Controllers. Java EE MVC makes heavy use of JAX-RS and most of the things we will see in this and the next posts ...

Read More »

Java EE 8 MVC: A detailed look at Controllers

java-interview-questions-answers

Java EE MVC is a new action based MVC framework planned for Java EE 8 and specified in JSR-371. This is the second post of my Java EE 8 MVC tutorial. The first post covered the basics and shows how to get started with Ozark, the Java EE 8 MVC reference implementation. In this post we will have a more ...

Read More »

Resource versioning with Spring MVC

spring-interview-questions-answers

When serving static resources, it is common practice to append some kind of version information to the resource URL. This allows the browser to cache resources for an unlimited time. Whenever the content of the resource is changed, the version information in the URL is changed too. The updated URL forces the client browser to discard the cached resource and ...

Read More »

Java EE 8 MVC: Getting started with Ozark

java-interview-questions-answers

About a year ago a new action based MVC framework, simply called MVC, was announced for Java EE 8. MVC (specified in JSR 371) is based on JAX-RS and integrates with Java EE technologies like CDI and Bean Validation. The reference implementation for MVC 1.0 is Ozark. This is the first article of a multi-part tutorial I am planning to ...

Read More »

Exception Translation with ET

java-logo

Some time ago I wrote a small blog post about exception translation with AspectJ. In this blog post we will see how to accomplish the same using ET and its lighter Java 8 approach. Motivation Exception translation (or exception conversion) is the process of converting one type of exception into another. The Java code to translate an exception is quite ...

Read More »

What’s new in Grails 3

grails-logo

A few days ago Grails 3.0 was officially released. Grails is now based on Spring Boot, the build system changed from Gant to Gradle and significant parts of the framework have been rewritten. In this post we will have a look at all the major changes introduced by Grails 3. Updated file structure We will start with a screenshot that ...

Read More »

Using Java 8 Lambda expressions in Java 7 or older

java-logo

I think nobody declines the usefulness of Lambda expressions, introduced by Java 8. However, many projects are stuck with Java 7 or even older versions. Upgrading can be time consuming and costly. If third party components are incompatible with Java 8 upgrading might not be possible at all. Besides that, the whole Android platform is stuck on Java 6 and ...

Read More »

Creating Android Apps with Groovy 2.4

groovy-logo

A few days ago Groovy 2.4 was released. One of the major news is that Groovy now officially supports Android application development. To see how this works I used Groovy to create a small ToDo list example application for Android. In this post I will show which steps are required to create an Android application with Groovy and how Groovy ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials