Custom Java Servlet Filter -
i'm writing first ever javax.servlet.filter
impl , trying write portion of dofilter
method prevent request going farther in chain:
@override public void dofilter(servletrequest request, servletresponse response) filterchain chain) throws ioexception, servletexception { // check stuff in request... boolean passesinspection = inspect(request); if(!passesinspection) // how prevent request going further? // don't want getting servlet @ point! }
how "block" request making listening servlet? in advance.
simply don't phone call chain.dofilter()
. dofilter()
phone call progresses call. don't phone call , processing stalls. not design however. need @ to the lowest degree inform caller
java servlets servlet-filters
No comments:
Post a Comment