Niku
Niku

Reputation: 167

how to integrate drool with jsp front end in eclipse?

I am new to drools. How will i integrate my drool rules with front end jsp ? For example: i have created a front end page registration page through jsp. now how will I apply rules on that page. Please Suggest with through this example that how will it be done

Upvotes: 1

Views: 913

Answers (1)

Steve
Steve

Reputation: 9480

This question seems rather broad in the sense that it's not clear whether it's asking how to write a web application or whether it has anything particular to do with Drools.

To put it as simply as possible.

  1. Your JSP page should have a form which posts back to the server.
  2. There should be a controller which handles requests from that form.
  3. The controller invokes a service which uses the Drools API to invoke your rules.
  4. The controller takes the result from that service and passes it to a new JSP for rendering as HTML.

Anything beyond that requires you to learn how to interact with Drools via its API. Assuming that you can write code to do that, there's nothing different that you really need to do to use it within your web application. The documentation is here:

http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/

In case you're interested in code examples of Drools within a web application, you could take a look at this:

https://github.com/gratiartis/sctrcd-payment-validation-web

Full disclosure - I wrote it. It's a Spring web application providing REST web services which interact with Drools.

Upvotes: 2

Related Questions