Package net.hasor.mvc.support

Examples of net.hasor.mvc.support.MappingDefine


    //
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequest) req;
        String actionPath = request.getRequestURI().substring(request.getContextPath().length());
        //1.获取 ActionInvoke
        MappingDefine define = this.rootController.findMapping(new WebFindMapping(actionPath, request.getMethod()));
        if (define == null) {
            chain.doFilter(request, resp);
            return;
        }
        //2.执行调用
View Full Code Here


    //
    /** 为转发提供支持 */
    public RequestDispatcher getReqDispatcher(final String newRequestUri, final HttpServletRequest request) {
        // TODO 需要检查下面代码是否符合Servlet规范(带request参数情况下也需要检查)
        //1.拆分请求字符串
        final MappingDefine define = this.rootController.findMapping(new WebFindMapping(newRequestUri, request.getMethod()));
        if (define == null)
            return null;
        //
        return new RequestDispatcher() {
            public void include(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
View Full Code Here

TOP

Related Classes of net.hasor.mvc.support.MappingDefine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.