How can I show an error in JSP without <form: form>
I have a jsp page with List<Object> as @ModelAttribute . However, there are no <form:form> tags on the page. All I do is print the contents of the List .
In my Controller.java I bind an error by doing:
result.rejectValue("", "NOT_LOGGED_IN", "You should Login first") ;
But since I don't have a form in jsp, I cannot access the error with:
<form:errors path="" /> <br/>
Please tell me how to access the error (or what I'm doing wrong).
+4
5 answers