WebCommand is a project mainly written in JAVA and GROOVY, it's free.
A mini servlet framework to dispatch http request
Configure DispatchServlet in web.xml, with init-param "package"
<servlet>
<servlet-name>dispatchServlet</servlet-name>
<servlet-class>com.thoughtworks.webcommand.DispatchServlet</servlet-class>
<init-param>
<param-name>package</param-name>
<param-value>com.thoughtworks.webcommand.handler.sample</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dispatchServlet</servlet-name>
<url-pattern>/command/*</url-pattern>
</servlet-mapping>
Create your own command handler annotated with RequestMapping, RequestMethod, RequestParam.
@WebCommand(uri = "/sample", verb= POST)
public class SamplePostCommandHandler {
public String handle(@RequestParam("username") String username, @RequestParam("password") String password) {
// handle the command
}
}