@RequestScope
@Page("hello")
public class HelloPage {
called from http://yourdomain/samples/hello/* or http://yourdomain/samples/hello
@Default
public Navigation index(Context context) {
return Forward.to("/jsp/hello.jsp");
}
called from http://yourdomain/samples/hello/request
@ActionPath("request")
public Navigation requestType(HttpServletRequest request) {
System.out.println("request.getContextPath() : "
+ request.getContextPath());
return Forward.to("/jsp/hello.jsp");
}
called from http://yourdomain/samples/hello/struts
@ActionPath("struts")
public Navigation likeStrutsType(HttpServletRequest request,
HttpServletResponse response) {
System.out.println("request.getContextPath() : "
+ request.getContextPath());
System.out.println("response.getLocale() : " + response.getLocale());
return Forward.to("/jsp/hello.jsp");
}
}