jWebApp is a trouble free full stack MVC web
application framework that truly removes the complexities of web
development and its configuration. jWebApp is so simple, it
can actually be learned in a matter of minutes.
jWebApp is literally this simple:
public class
JWebAppExample extends RequestHandler
{
DatabaseManager jpersistdb = AppUtils.getDatabaseManager();
public String processGetCustomer(HttpServletRequest request)
{
request.setAttribute("customer",
jpersistdb.loadObject(Customer.class,
"where :customerId
like ?",
request.getParameter(“customerId”)));
return
"/WEB-INF/customer.jsp";
}
public String validateNewCustomer(ServerInterface
serverInterface)
{
... // trivial
validation stuff
if (errors.length() >
0) return “/WEB-INF/newCustomer.jsp”
else return SUCCESS;
}
public String processNewCustomer(ServerInterface
serverInterface)
{
Customer customer = new
Customer();
serverInterface.fillObjectFromRequest(customer);
jpersistdb.saveObject(customer);
serverInterface.setAttribute(“customer”, customer);
serverInterface.setAttribute(“customerSaved”,
“Customer Saved”);
return
"/WEB-INF/customer.jsp";
}
}
JSP generation:
<div
align="center">
<h2>jWebApp Example.</h2>
<b>${customerSaved}</b>
<p>CustomerId: ${customer.customerId}
<p>First Name: ${customer.firstName}
<p>Last Name: ${customer.lastName}
...
</div>
and calling:
http://host/context/jWebAppExample/getCustomer?customerId=value
or post a form with:
http://host/context/jWebAppExample/newCustomer
Using the above given URLs, jWebApp
automatically finds the supporting class, instantiates it, and
executes the supporting method. jWebApp does not require any
configuration or annotation, so the above is actually all you have
to do.
jWebApp provides support for all of the
features you expect, but does not need additional tag libraries or
extensive APIs to implement them, what you already know is all you
will need. With jWebApp, you can use any model/business layer
technologies, any database-access technologies, any web-authoring
technologies, and plain old HTML and HTML forms.