3. JavaServer Faces (JSF) <web-app> <display-name>Stripes Example</display-name> <filter> <filter-name>StripesFilter</filter-name> <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class> </filter> <filter-mapping> <filter-name>StripesFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> @UrlBinding("/hello") public class HelloAction implements ActionBean { private ActionBeanContext context; @DefaultHandler public Resolution hello() { return new ForwardResolution("/hello.jsp"); } @Override public ActionBeanContext getContext() { return context; } @Override public void setContext(ActionBeanContext context) { this.context = context; } } html <!DOCTYPE html> <html> <head> <title>Hello Stripes</title> </head> <body> <h1>Hello Stripes!</h1> </body> </html>


上一篇:
下一篇:
切换中文