Archive for the ‘spring’ Category

Why you NEED to become framiliar with Maven.

November 18th, 2010 No comments

If you program in Java, you NEED to become fluent in Maven.

Why?  Because it simplifies working on projects a lot. 


  • Lots of utilities that can be run on any and all maven projects at any time with only one command, and without downloading anything manual.
  • Generate Javadocs instantly.(mvn javadoc:javadoc)
  • Run all tests with one command and receive pretty html reports of your test results.(mvn test)
  • View Test Code coverage with one command and no downloading. (mvn cobertura:cobertra)
  • Almost instantly use the latest Java libraries, like Apache Commons. (IDE detects unknown class and prompts you to add a dependency to your project).
  • Do selenium testing with one command. (mvn selenium:start-server)
  • Generate web projects that include Hibernate, Spring, and more in minutes. (mvn archetype generate)
  • Run your tomcat projects with a single command. (mvn tomcat:run)
  • And more!!!  If you develop in Java,  learning Maven will increase productivity a lot.


Start off with this video:

Categories: java, maven, spring, web Tags:

Spring MVC Redirect using “redirect:url” syntax.

October 27th, 2010 2 comments

I searched online for how to do redirects from a controller, and only came up with the RedirectView…

But I KNEW there was an easier way I had seen before…

The key is make your controller function return a string…  And then return “redirect:URL” instead of a view name.  Violaa!

Absolute and relative urls work great.

See: Spring 3.0.x docs for UrlBasedViewResolver

Categories: http, java, spring Tags: