non-Struts JSP input validation framework?

B

bb

I'm working on an old Java application that is being converted to JSP
with Hibernate. The conversion is taking place piece by piece and using
Struts or Spring is not an option. Can someone recommend an existing
set of classes that allows you validate user input on the server side,
display error messages on JSP pages, etc. - something that emulates
Struts in this regard but is more lightweight and not so invasive?
 
W

Wendy Smoak

bb said:
I'm working on an old Java application that is being converted to JSP
with Hibernate. The conversion is taking place piece by piece and using
Struts or Spring is not an option. Can someone recommend an existing
set of classes that allows you validate user input on the server side,
display error messages on JSP pages, etc. - something that emulates
Struts in this regard but is more lightweight and not so invasive?

Struts doesn't do validation, it uses Jakarta Commons Validator behind the
scenes:
http://jakarta.apache.org/commons/validator/

I've never tried to use it outside of Struts, but it's certainly possible.
Then displaying error messages could be nothing more than iterating over
some collection of errors with <c:forEach> and <c:eek:ut>. (That's most of
what <html:errors> does, anyway, along with some bells and whistles for
styles and a header/footer.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top