Starting developing web applications with jspx requires three steps. (Download/Configure/Develop). Check the coming video showing these steps in practical sample project. All demos are available for download in the demos section
start with downloading the latest version of jspx. You will need to download the jspx-2.1.jar file. Also you may check other downloads available including demos and sourcecode.
Jspx is easily inserted in any java web project without affecting its nature. Just add the jspx latest version jar in the web libraries, then configure the web.xml to route requests to jspx engine. There is no configuration files anywhere.
Only Java POJOs and HTML standard tags are needed to start your web app.
Start with downloading the latest version of jspx. You will need to download the jspx-2.1.jar file. Also you may check other downloads available including demos and source code.
<servlet> <display-name>JspxHandler</display-name> <servlet-name>JspxHandler</servlet-name> <servlet-class>eg.java.net.web.jspx.engine.RequestHandler</servlet-class> </servlet> <servlet> <display-name>ResourceHandler</display-name> <servlet-name>ResourceHandler</servlet-name> <servlet-class>eg.java.net.web.jspx.engine.ResourceHandler</servlet-class> </servlet> <servlet-mapping> <servlet-name>JspxHandler</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ResourceHandler</servlet-name> <url-pattern>/jspxEmbededResources/*</url-pattern> </servlet-mapping>
Developing web applications in jspx is based on web forms. business cases are divided into pages that contains an html form or more. The following code snippet is showing a simple Hello Jspx with java controller. This example is coming from jspx live demo
<page contoller="org.bay.jspx.demo.live.HelloJspxController" > <html> <body> <label id="message"></label> </body> </html> </page>
package org.bay.jspx.demo.live; import eg.java.net.web.jspx.engine.annotation.JspxWebControl; import eg.java.net.web.jspx.ui.controls.html.elements.Label; import eg.java.net.web.jspx.ui.pages.Page; public class HelloJspxController extends Page { @JspxWebControl(name = "message") Label msg; @Override protected void pageLoaded() { msg.setValue("Hello Jspx from Java controller!"); } }
This example can be fully tested on Hello Jspx (with Java Controller) on live demo.