Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
Displaying Struts required field errors
James Peter
Ranch Hand
Posts: 115
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
I am using
Struts
2.2.1. My objective is to display Action field errors in
jsp
page. Below is my code.
@Results({ @Result(name = "input", location = "test.jsp")}) public class StudentManagement extends ActionSupport implements SessionAware { ........... }
@Validations(requiredStrings = { @RequiredStringValidator(fieldName = "studentName", type = ValidatorType.FIELD, key = "StudentNameRequired"), }) public String addStudent() { }
<%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib uri="/struts-tags" prefix="html" %> <html:actionerror /> <html:actionmessage />
When studentName is blank I am not getting any errors in test.jsp. Please let me know where I am doing mistake.
Thanks in advance
Peter.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
s:iterator tag in jsp page
Working with struts in FF3.5
Check less than operator in struts if tag
Struts 2 Remote Div Problem
how to include struts action in jsp
More...