Blog Archives

Simple Gradle Web Application

Gradle easily supports Java web applications through the “war” and “jetty” plugins. This tutorial will show you how to quickly make a simple Java Servlet web application. Our basic project structure will be: basic-web src main java com codetutr HelloWorldServlet.java

Posted in Gradle, Java Tagged with: , , ,

Joda-Time – How to Parse a String to Joda LocalDate

Parsing a string into a Joda-Time LocalDate object is easy. It took me a while to realize that LocalDate has a constructor which can take a date String. Example usage: The constructor’s signature is actually LocalDate(Object instant), which is why

Posted in Java Tagged with:

Explicitly defining a Spring MVC Annotation-Based Controller

Beginning with Spring MVC 2.5, MVC controllers can be declared using theĀ @Controller annotation. Spring picks up the controller through this declaration in Spring servlet application context: <context:component-scan base-package=”com.myapp.controller” /> In the past, this has worked perfectly for me, and I

Posted in Java, Spring Tagged with: , ,

Sponsored

Follow Me

RSS FeedFollow me on Twitter