jsp的代码:
<form action="${pageContext.request.contextPath}/addconcat" method="post" >
<textarea placeholder="留言内容" name="content" ></textarea>
<input type="text" placeholder="联系人" name="name" >
<input type="text" placeholder="邮 箱" name="email" >
<input type="submit" value="发送">
</form>
然后我们的Controller类:
package Controller;
import java.net.InetAddress;
import java.net.UnknownHostException;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotat