Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<%@ 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" />

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading