Currently Browsing


Binding data with Spring Forms

Spring has its own tag library, which makes JSPs easier to develop, maintain and read. One of these libraries is the form tag library, and in this post we’ll demonstrate how to use it.

For this we will use a sample project that will let us modify the user’s account details. In order to display the stored values for the account in the form, we have previously tied an object named foo to the session that holds all the information about our user’s account.

The form used for displaying and sending the account data is displayed here:

<form action="/account" method="post">
	<legend>Edit account information:</legend>
			<td><label for="name" >Name:</label></td>
			<td><input type="text" id="name" name="name" value=${} /></td>
			<td><label for="email">E-mail:</label></td>
			<td><input type="text" id="email" name="email" value=${} /></td>
			<td><label for="website">Website:</label></td>
			<td><input type="text" id="website" name="website" value=${} /></td>
		<tr><td>&nbsp;</td><td><input type="submit" value="Save" /></td></tr>

Now lets do the implementation of the form tag library on this code:

Servlet Mapping for Google App Engine and Spring

This post is all about Spring MVC 3 and Google App Engine and their interaction.

The starting point for this project was the Google App Engine’s documentation, the Google Eclipse plugin, and some tutorials found on various sites.

After reading all about the App Engine and Spring, the first thing to do was to create a project in our favorite editor, Eclipse. This generated some necessary files, and gave us a good starting point. As we want to use Spring to perform all its magic, we’ve created a web.xml like this: