You need your rule to return something to Java showing the validation result.<br><br>In your RHS you need to either:-<br><br>(a) set a global variable with the result and retrieve the value of the global from Java after fireAllRules().<br>
<br>(b) insert an arbitrary fact type and have a query return this.<br><br>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.<br>
<br>Most people might have a single KnowledgeBase pre-loaded into an Application scope parameter and just create new stateless sessions in an HTTP request.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">
On 14 June 2012 15:39, Brajesh <span dir="ltr">&lt;<a href="mailto:brajesh4etc@gmail.com" target="_blank">brajesh4etc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I am trying to say that as in my drl file if username is null or blank I<br>
want to show a message in my jsp page that username can&#39;t be null.<br>
<br>
Regards<br>
Brajesh<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/jsp-java-and-drl-file-tp4017955p4017964.html" target="_blank">http://drools.46999.n3.nabble.com/jsp-java-and-drl-file-tp4017955p4017964.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>