We just changed the ActionForm  to use a wrapper object, rather than the
original, since exposing the ActionServlet this way can be exploited. 

I'm just thinking that many of the components that we use may have wider
user, and we should avoid binding things to the ActionServlet class. 

Avoding this reduces the coupling between the other components and the
ActionServlet, which could then open the door for the form tags to be
used by some other servlet entirely. Another framework could provide the
"resource bean", but be using it's own servlet class. Taking on their
own, most components in the framework are fairly generic, and could be
"mixed and matched". 

I agree that exposing the servlet would be a quicker fix, but we might
want to learn the lessons of Turbine, and avoid coupling other classes
to our controller.

In the end, the only way to access the resources could be through the
bean in the request. The form tags are probably calling getServlet
because the other resources it wants are not properly exposed. This way,
the tag could cache the resource bean, and just get what it asks for.

Tim W Wilson wrote:
> 
> Ted, I appreciate the feedback, thx.
> 
> The public interface of ActionServlet is already used by ActionForm,
> ActionMapping and Action so it seems natural for it to be used by the
> taglibs and get it to them through the request like everything else.  In
> fact, FormTag itself actually caches the servlet instance retrieved through
> the mapping.getServlet() so that it can set it into ActionForm instance
> that it creates if a previous one is not found.  On the whole it just seems
> a lot simpler to have all components use the public ActionServlet interface
> and not have multiple ways of accessing these resources.
> 
> Tim W Wilson
> Eclipse WSED Architecture & Development
> internet: [EMAIL PROTECTED]
> (919) 254-0029 (TL 444-0029)

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to