Skip to the Pragmatach Site
Pragmatach is a simple J2EE framework intended to provide server-side support for B2C web applications
Pragmatach was written to address real-world needs that are important to B2C site developers
Pragmatach provides a maven archetype which generates a fully functional skeleton
Pragmatach implements simple GET and POST of JSON and XML to Controllers
Pragamatach provides a secure, web-based console to allow runtime operation and debugging of applications
Built-in manageability via JMX
Pragamatach provides a modular API for plugging in new functionality
package com.teverett.com.pragmatach.exampleproject;
@Controller(name="indexController")
@View(view = "index.html")
public class IndexController extends FreemarkerController {
private String message = "Hello World";
@Route(uri = "/")
public Response render() throws PragmatachException {
return super.render();
}
}
<head>
<title>exampleproject<title>
</head>
<body>
<h1>exampleproject</h1>
${indexController.message}
</body>
@Controller(name="index")
public class AcceptPostController extends JSONController {
private String message;
@Route(uri = "/acceptpost", method = HttpMethod.post)
public Response acceptJSONpost() throws PragmatachException {
return super.render();
} catch (final Exception e) {
throw new PragmatachException("Exception in showFeed", e);
}
}
}
Build a skeleton using the Maven Archetype
run it
mvn clean package jetty:run