by the idea of Convention-plugin(CodeBehind-plugin)--"Zero Config",it provides: Action location by package naming conventions Result (JSP, FreeMarker, etc) location by naming conventions Class name to URL naming convention Package name to namespace convention SEO compliant URLs (i.e. my-action rather than MyAction) the normal mappings don't work in the REST-plugin environment.
在2009-05-01,"Dave Newton" <newton.d...@yahoo.com> 写道: >xnpeng wrote: >> public class PublishController extends PublishAction implements Preparable { >> private static String message_url = "/post/message/"; >> private static String affair_url = "/post/affair/"; >> private static String business_url = "/post/business/"; >> private static String activity_url = "/post/activity/"; >> private static String announce_url = "/post/announce/"; >> private static String house_url = "/post/house/"; >> private static String case_url = "/post/case/"; >> private static String scenery_url = "/post/scenery/"; >> private static String poll_url = "/post/poll/"; >> >> if (category != null) { >> if (category.getCateId().equalsIgnoreCase(Category.MESSAGE)) { >> ServletActionContext.getResponse() >> >> .sendRedirect(ServletActionContext.getRequest().getContextPath() + >> message_url + "new"); >> } else if >> (category.getCateId().equalsIgnoreCase(Category.AFFAIR)) { >> ServletActionContext.getResponse() >> >> .sendRedirect(ServletActionContext.getRequest().getContextPath() + >> affair_url + "new"); > > [...snip...] > >I'm not sure I understand the issue either, but man, isn't this what >maps were made for?! > >Dave > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >For additional commands, e-mail: user-h...@struts.apache.org >