All Downloads are FREE. Search and download functionalities are using the official Maven repository.

club.zhcs.rop.handler.RequestHandler Maven / Gradle / Ivy

There is a newer version: 2.3.9.RELEASE
Show newest version
package club.zhcs.rop.handler;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.nutz.lang.Strings;

import club.zhcs.rop.core.ROPConsts;

/**
 * @author Kerbores([email protected])
 *
 */
public interface RequestHandler {

    default void handle(HttpServletRequest request, HttpServletResponse response, String gateWay)
            throws ServletException, IOException {
        request.getRequestDispatcher(Strings.isBlank(gateWay) ? request.getHeader(ROPConsts.METHOD_KEY) : gateWay)
               .forward(request, response);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy