文档目录

应用集成提供一种简单的集成到现有系统的方案,一般情况下如非特殊需求不建议采用应用集成的方式,最好独立部署。独立部署不但拥有更好的灵活性而且对现有系统零侵入。

方案1

@Controller
public class FinderController implements InitializingBean {
    @Resource
    private ServletContext servletContext;
    private com.skin.finder.web.ActionDispatcher dispatcher;

    @Override
    public void afterPropertiesSet() throws Exception {
        this.dispatcher = new com.skin.finder.web.ActionDispatcher();
        this.dispatcher.init(this.servletContext);
    }

    @RequestMapping(value = "/finder")
    public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String loginURL = com.skin.finder.filter.SessionFilter.getLoginURL(request);

        if(com.skin.finder.filter.SessionFilter.check(request, response, loginURL)) {
            this.dispatcher.service(request, response);
        }
    }
}

方案2

请参考web.xml注册finderweb提供的DispatchServlet