Skip to content

alabusag/cordapp-jsf-template-eclipse

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
cordapp-jsf-template-eclipse
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CorDapp JSF Template Eclipse

This is a CorDapp template for eclipse with integrated JSF webserver.

We created this Template, because we wanted to use JSF-Technology together with Corda. This template is free to use for everyone. Feel free to propose improvements, issues or other things.

The resources we used to create this template were:

 https://docs.corda.net/tutorial-cordapp.html
 https://github.com/balajimore/cordapp-template-java-eclipse 
 https://auth0.com/blog/developing-jsf-applications-with-spring-boot/

Special thanks to these authors which provided the knownledge for us to create this template.

Pre-Requisites

You will need the following installed on your machine before you can start:

For more detailed information, see the getting set up page on the Corda docsite.

Getting Set Up

To get started, clone this repository with:

 git clone https://github.com/alabusag/cordapp-jsf-template-eclipse

And change directories to the newly cloned repo:

 cd cordapp-jsf-template-eclipse

Refer to the corda docs to start the application:

  https://docs.corda.net/tutorial-cordapp.html

Configure JSF on the CordApp

Switch to the 'Client' Sub-Project.

Set the Context-Root for your Application in file:

  clients\src\main\resources\application.properties

Set the faces context in file:

  clients\src\main\webapp\WEB-INF\web.xml

And in SpringBootApplication Java File

  clients\src\main\java\com\alabus\cordapp\template\client\webserver\Starter.java

Normally you won't need the web.xml file when starting a JSF-Application with Spring Boot. But I have not found a solution yet. It's not working without the web.xml file.

Running the webserver on the nodes

Launch the Gradle Tasks:

  runPartyAWebServer
  runPartyBWebServer
  runPartyCWebServer

You can now connect to them with:

  Party A: http://localhost:10097/<contextRoot>/node/iou-form.xhtml
  Party B: http://localhost:10098/<contextRoot>/node/iou-form.xhtml
  Party C: http://localhost:10099/<contextRoot>/node/iou-form.xhtml

Extending the template

You should extend this template as follows:

  • Add your own state and contract definitions under contracts/src/main/java/
  • Add your own flow definitions under workflows/src/main/java/
  • Extend or replace the client and webserver under clients/src/main/java/

For a guided example of how to extend this template, see the Hello, World! tutorial here.

About

A CordApp template with JSF technology webserver in eclipse

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published