Java EE 6のJavadocみていたら(NetBeansにはJava EEのドキュメントも付属している)javax.validationパッケージがあった。 そうだ、こいつもきていたんだった。 というわけでBean Validation (JSR-303)を触ってみる。 こいつはBeanに対する値のチェックをするライブラリである。 検査対象Bean public class InputBean { @NotNull(message="なんかいれろ") String data; public String getData() { return data; } public void setData(String data) { this.data = data; } } バリデーションする側。今回はサーブレットでやってる。 @WebServlet(name="ValidateServl