-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Fields are not validated with Hibernate Validator 5 in Tomca
PostPosted: Tue Nov 04, 2014 8:58 am 
Newbie

Joined: Thu Feb 16, 2006 4:36 pm
Posts: 1
Server Tomcat 7

Am using:
validator
hibernate-validator.5.1.0.Final
validation-api.1.1.0.Final
classmate.1.1.0

weld:
weld-servlet.2.2.4.Final

jsf-mojarra:
jsf-impl.2.2.8-02

field in facelet:
Code:
<p:inputText id="some_id"
value="#{someBean.someVO.notifyIfTransactionThreshold}"/>


Annotations in someVO:
Code:
@Max(30) private Integer notifyIfTransactionThreshold;


Unfortunatedly Bean Validator doesn't do anything.

On server start I get the following message:
INFO: HV000001: Hibernate Validator 5.1.0.Final


Top
 Profile  
 
 Post subject: Re: Fields are not validated with Hibernate Validator 5 in Tomca
PostPosted: Wed Nov 05, 2014 9:20 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi,

JSF and Bean Validation are not integrated out of the box in plain Servlet environments, so you need to configure your JSF environment to take advantage of Bean Validation. You may e.g. find this post helpful for this: https://stackoverflow.com/questions/19637996/bean-validation-doesnt-work-with-mojarra-2-2-4.

Note that no further configuration would be required on full Java EE containers such as WildFly which integrates all these techs out of the box.

Hth,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.