java - Call DispatcherServlet's protected render method -
i have created jar jstl tags. in class have modelandview
object. want render modelandview
object using spring's dispatcherservlet's
protected
render
method.
currently, have done have extended
dispatcherservlet
class , added static renderview()
method internally calls protected render()
method.
public class dispatcherservlet extends org.springframework.web.servlet.dispatcherservlet { private static dispatcherservlet servlet; @override public void init(servletconfig config) throws servletexception { servlet = this; super.init(config); } public static void renderview(modelandview mv, httpservletrequest request, httpservletresponse response) throws exception { servlet.render(mv, request, response); }
}
i want avoid extending dispatcherservlet because asking clients define custom dispatcherservlet in web.xml
.
if somehow can dispatcherservlet object , make call protected render() method problem might solved.
suggestions.
Comments
Post a Comment