the simplest (depens on your preference):
validation.xml:
add a mask dependency that checks on [0-9] (regex)
if you're more comfortable with
java in stead of xml:
add validate() method in the actionform and there you can check if the variable does have chars in it.
In both cases you do need to activate the validator framework by setting it in the struts-config.
If you don't want to use validator framework:
throw error in the action when your variable is null or 0