Wrapping the call in Seam contexts


1. You can map the <web:context-filter/> in components.xml to wrap all calls on a particular URL pattern, see reference documentation.

2. You can wrap a call manually in a particular Servlet:

class MyServlet extends HttpServlet {

    protected void service(final HttpServletRequest request, final HttpServletResponse response)
            throws ServletException, IOException {

        new ContextualHttpServletRequest(request) {
            public void process() throws Exception {
                doWork(request, response);

    private void doWork(HttpServletRequest request, HttpServletResponse response) {


No comments:

Post a Comment