Not much time for blogging these days. Sunny days in the 70s. Low humidity. Mountain bike trails are dry and worn hard. First time in a week I've found the time to blog. The Pinkie is taking a long nap and I just read excerpt from a new book on Spring on The Server Side, so I made enough progress on my New Book, New Directions theme to blog about it.
Spring has a multiple-view concept built into the framework. I defined a simple web page called login.htm virtually and never created an actual page. I created a mapping to the controller in your servlet definition file like so:
Now I had to add within my MyAppController.java the method to handle the login action. I then specified the view template in views-myapp.properties with the following configuration.
Now when I call http://localhost/myapp/login.htm, I get a login page using a shared template with all special form content defined in login.jsp. The funny thing is that nowhere did I ever write a page called login.htm even though that was the URL.