email input in JSP is it possible?

In html 5 we have somethin like this

<input type="email" name="email">

In JSP I have a form input with model path just like this:

 <form:input path="email" cssClass="form-control" id="firstname" />

And it is treated as text input. Is it possible to change type of the input to email?
This is a tag library that I am using now

<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>   

>Solution :

You can use HTML5 types (right at the bottom there) by providing them in the type attribute (the default being "text") e.g.

<form:input type="email" path="email" cssClass="form-control" id="firstname" />

Leave a Reply