Unknown spring tags

I downloaded the springsource toolkit and created the springMVC template project (hello world). Fine. I just added a simple form and the spring tags don't seem to work. STS does not recognize tags, and they do not display correctly on page loading. Any ideas?

simpleForm.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <form:form action="formOutput.html" commandName="user"> <table align="center"> <tr> <td>Username:</td> <td><form:input path="userName" /></td> </tr> <tr> <td>First Name:</td> <td><form:input path="firstName" /></td> </tr> <tr> <td>Last Name:</td> <td><form:input path="lastName" /></td> </tr> <tr> <td>Email:</td> <td><form:input path="email" /></td> </tr> <tr> <td>Mobile Number:</td> <td><form:input path="mobile" /></td> </tr> <tr> <td></td> <td><input type="submit" value="Submit" /></td> </tr> </table> </form:form> </body> </html> 

enter image description here

Any ideas?

+7
source share
2 answers
 <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> 

Include this line at the beginning of the yr file

+19
source

You are missing the taglib spring declaration:

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

All Articles