You need your rule to return something to Java showing the validation result.
In your RHS you need to either:- (a) set a global variable with the result and retrieve the value of the global from Java after fireAllRules(). (b) insert an arbitrary fact type and have a query return this. Both approaches should do as you need - but be warned, creating a KnowledgeBase for each login attempt should be discouraged as it is an expensive operation. Most people might have a single KnowledgeBase pre-loaded into an Application scope parameter and just create new stateless sessions in an HTTP request. With kind regards, Mike On 14 June 2012 15:39, Brajesh <[email protected]> wrote: > Hi > > I am trying to say that as in my drl file if username is null or blank I > want to show a message in my jsp page that username can't be null. > > Regards > Brajesh > > -- > View this message in context: > http://drools.46999.n3.nabble.com/jsp-java-and-drl-file-tp4017955p4017964.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
