Creating Java Web App using J-Framework Web

Last updated: 2025-09-14

J-Framework Web project simplifies building Java web applications based on JSF and PrimeFaces. Also, it could be used for plain JSP and Servlets development as well.

Steps:

  1. Create Maven project with the following pom.xml:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-web/java-web-simple-tutorial.adoc - include::inc/simple/pom.xml[]

If you are using Eclipse, be sure to refresh your project (select your project→ right click→ Maven→ Update Project)

  1. Create xhtml page at src/main/webapp/index.xhtml with the following contents:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-web/java-web-simple-tutorial.adoc - include::inc/simple/src/main/webapp/index.xhtml[]
  1. Create controller (JSF Managed Bean) at src/main/java/com/app/Controller.java with the following contents:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-web/java-web-simple-tutorial.adoc - include::inc/simple/src/main/java/com/app/Controller.java[]
  1. Create App class at src/main/java/com/App.java with the following contents:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-web/java-web-simple-tutorial.adoc - include::inc/simple/src/main/java/com/app/App.java[]

Thats it, now run your App class, in few seconds your browser will open and you should see something like this:

Output

Full example source-code can be found at https://github.com/smartapi-com/j-framework-web-simple