jWebapp - MVC框架


BSD
跨平台
Java

软件简介

jWebApp是一个基于Servlet的MVC框架,目的是为了简化小型web项目的开发复杂度。

示例:

jWebApp is literally this simple:

public class HelloWorld extends RequestHandler {

public String processHello(ServerInterface serverInterface) {

serverInterface.setAttribute(“helloWorld”, “Hello World”);

return “/WEB-INF/helloWorld.jsp”;

}

public String processHelloAgain(ServerInterface serverInterface) {

serverInterface.setAttribute(“helloWorld”, “Hello World Again”);

return “/WEB-INF/helloWorld.jsp”;

}

}

Just plain HTML and your favorite template markup

Hello, This Is A Simple "Hello World" Example.

${helloWorld}

Hello World

Hello Again

The following servlet configuration is all that is needed (outside our
control, it’s a servlet thing).

jwaRequestServlet

jwebapp.RequestServlet

jwaRequestServlet

/helloWorld/hello

jwaRequestServlet

/helloWorld/helloAgain

index.jsp

And, calling the above is simple!

http://host/context/helloWorld/hello

http://host/context/helloWorld/helloAgain