Creating the Action


If you followed the quickstartguide you now have a configured environment ready to test your first Action.

Make a new Action, implementing net.sourceforge.javajax.JavajaxAction interface and place it in one of the action packages specified in web.xml. 

Since your class will look like my.very.nested.package.MyOldFashionActionClass, and since the URL to call this class depends on the class name, maybe we want to bind the class to a smarter name. 

Here the UrlBinding annotation come in hands. 

Place it before the class declaration:


package my.very.nested.package; 

public class MyOldFashionActionClass implements JavajaxAction { ... }

All the "callable" methods in the action MUST be "protected", so our first method would look like: 

protected void myMethod(){
System.out.println("Hello World!");

When a method is called and an exception is raised, or a validation error message is generated, the framework will display the error page defined in web.xml, or we can inform what else to do: 

protected void myMethod(){
System.out.println("Hello World!");


Support JavAjax

JavAjax is a free to use software, so you will never be asked for money to download and use it.
However, if you find it useful, you may consider to make a donation to let the work go on!

Support This Project


(You will be redirected to the donation page. Donation is done through Paypal)