Enavigo

Take lemons, make lemonade or Jill and Yuval’s Musings

Enavigo header image 5

Using Velocity date tool with Spring MVC

June 17th, 2008 No Comments

I was having trouble getting Velocity’s date tool to work with Spring MVC. I followed the instructions, most copied verbatim from what was most likely one ancient source. Those instructions said that to enable Velocity’s date formatting tool, DateTool, I needed to configure the VelocityViewResolver like this (WRONG):

<bean id="viewResolver">
class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"></bean>

<br /><property name="numberToolAttribute"><value>numbertool</value></property>

<br /><property name="dateToolAttribute"><value>datetool</value></property>

&nbsp;

And […]

Tags:   · ·

Spring MVC binding problem

May 31st, 2008 No Comments

Spring MVC has a very peculiar approach to handling dates from form submissions. Gone are what I feel is the ’standard’ approach to forms, via select drop-downs, and in comes the open input text field. That may be valid especially if you are using a JavaScript-based date selector element. Fine.
The issue is that those JavaScript […]

Tags:   ·

Setting up Spring MVC welcome page without rewrites or redirection

May 23rd, 2008 No Comments

So you have a Spring MVC web application and want to make sure that when the user enters a URL such as
http://www.myawesomedomain.com he/she will see the home page of your application. How do you get Spring MVC’s RequestDispatcher servlet, which acts as the traffic cop and then some for your web application, to act as […]

Tags:   · · · · · ·