That's exactly what a filter does.  It intercepts calls to JSPs or servlets before they are invoked, then intercepts the results after they have been rendered.
 
-dan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Trent
Sent: Wednesday, June 06, 2001 5:03 PM
To: [EMAIL PROTECTED]
Subject: Re: Proposal

I don't see how this helps me.  I need a hook into the begin/end of the rendering process...
 
----- Original Message -----
Sent: Wednesday, June 06, 2001 11:32 AM
Subject: RE: Proposal

You should also look into Filters, part of the Servlet 2.3 spec.  They allow you to "do anything" after a resource has written the response.  In fact, the canonical example of a Filter is one that implements an XSLT transformation, transforming an XML file that is written to the response "as-is".  That is, the servlet container fetches the XML file, writing it to the response.  Then, the filter transforms the response, creating a new response, which gets delivered to the client.
 
Of course, the Servlet 2.3 spec hasn't been finalized yet.  But Tomcat Catalina (in it's 5th beta release) implements Filters.  They're really cool, and they might make the ActionServlet concept a bit redundant.  That is, the controller in an MVC/Model 2 architecture can be implemented as a Filter. 
 
Just my 2p worth. 
 
-dan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Trent
Sent: Wednesday, June 06, 2001 4:09 PM
To: [EMAIL PROTECTED]; Taylor Cowan
Subject: Re: Proposal

define "do anything".  Your doGet()/doPost() continues to run.  The only caveat is that you can no longer i/o anything out to the response output stream.
 
-jeff
----- Original Message -----
Sent: Wednesday, June 06, 2001 10:53 AM
Subject: Re: Proposal

Is it possible to do anything from a servlet after a forward, i.e., I don't think the POST_RENDERED concept will work if struts is using a forward.
 
Taylor Cowan
----- Original Message -----
From: Jeff Trent
Sent: Wednesday, June 06, 2001 9:21 AM
Subject: Proposal

New here ... so bare with me.
 
I'd like to propose the following enhancement to ActionForm:
 
    public void addListener(ActionFormListener);
    public void removeListener(ActionFormListener);
 
 Here is the basics of ActionFormListener I'm interested in to start out with:
 
    public abstract class ActionFormListener
    {
        public static final int ACTION_TYPE_PAGE_PRE_RENDERED = 1;
        public static final int ACTION_TYPE_PAGE_POST_RENDERED = 2;
 
        public abstract void actionFormNotify(int actionType, String context /* reserved for future use*/);
    }
 
 
---
 
These messages would be sent before and after the RequestDispatcher included or forwarded to the JSP page.
 
The primary reason I'm propsing this feature is to allocate / free (respectfully) scarce resources that I would like to be made available on the page that I do not want to serialize to transient members of my form.
 
thank you,
jeffrey trent
 

Reply via email to