troubleshooting Question

Form: Empty String instead of Null (Struts/Java)

Avatar of whiteeagl
whiteeagl asked on
Web Languages and Standards
4 Comments1 Solution1804 ViewsLast Modified:

I have a web application based on struts framework. My database table has some required fields and some nullable. The problem I have is if I leave the field in my web form empty, the application inserts an empty string (varchar) instead of a null value.

How can I prevent the web application from converting the empty form fields to and empty string? I really need the fields to stay "NULL".

I am using stuts & validator, velocity and hibernate

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros