I downloaded springsource tools suite, and created a springMVC template project (hello world). Worked great. I just added a simple form, and the spring tags don't seem to work. STS doesn't recognize the tags, and they don't render on the page correctly when I load it. 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>
Any ideas?
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
Include that line at top of yr file
You're missing spring taglib declaration:
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With