On Tue, 8 Jan 2002, Arron Bates wrote:
> Date: Tue, 08 Jan 2002 10:33:55 +1100
> From: Arron Bates <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: Re: Nested tags
>
> Excuse the ignorance, but how will the multiple-servlet controller
> change the way JSP views work?...
In theory, it shouldn't change anything at all. You should be able to
take an existing Struts-based app (i.e. a struts-config.xml file and it's
associated resources) and have it run -- then take that app and make it a
subapp in some "multi-sub-app" environment, with zero changes.
The current approach (which looks the most promising from all the ones
I've tried) is based on the following principles:
* Single ActionServlet instance is still used to manage everything.
* Multiple independent struts-config.xml files (one per sub-app),
with independent configuration of stuff that is currently set as
servlet initialization parameters, and an application resources
bundle per sub-app.
* Sub-applications are distinguished by having a unique prefix to the
context relative portion of the URI (similar to the way that a
servlet container distinguishes webapps based on the context path).
Thus, you might have three subapps with context-relative paths that
follow these patterns:
/catalog/* Product catalog
/store/* Shopping cart
/* "Default" sub-app that is used
for all requests not matched to
another sub-app
* Servlet mappings to ActionServlet work one of two ways, depending
which style you like:
- For extension mapping, continue to use "*.do" or whatever as before.
- For path mapping, you'll want to set up more than one sub-app
relative path mapping:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/catalog/do/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/store/do/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/do/*</url-pattern>
</servlet-mapping>
* Paths that are automatically converted to context-relative today (like
the "page" attribute on <html:link> are automatically converted to
sub-app-relative paths instead. A special attribute will be added so
you can create ActionForward definitions that really are context
relative (i.e. a menu that lets you switch sub-apps).
Doing all this has pretty significant impact on the internals of the
controller, but so far it only needs one very small tweak to the APIs that
a typical Struts application would use. But, I'm not done yet ...
> I could possibly imagine a change to the form tag, but that would be it
> wouldn't it?... (yes/no Craig?)
>
I need to look more at this.
> There's been a couple of updates (one is related to the Resin "bug" that
> was just submitted. That was fun) some refactoring of the helper class
> to make it more generally usable for developers wanting to make their
> own nested tags. But it's still working as it should.
>
If Resin is not implementing the spec correctly, I'm not interested in
changing Struts to accomodate it. And don't think I'm picking on just
them - I wouldn't check in the workaround for WebSphere (which didn't
allow deleting request attributes for a while) either.
> ASF can still have it if they want it.
> I've finished the primer and a step-by-step tutorial which I want to cap
> off with a little extension to complete the training on the extension
> (always two there are). ASF want them too?...
>
> I still haven't put a spiel out on the user list yet (Tom's done so a
> few times, and I've seen a post on jGuru :).
> I'll hold off if it's going to be committed.
>
Personally, I really want to focus on the controller updates first ...
then, I will look at nested tags.
>
> Arron.
>
Craig
>
> Ted Husted wrote:
>
> >Arron,
> >
> >Once Craig's implementation of the multi-servlet controller comes out,
> >do you think you would have a chance to try and update your nested
> >taglib?
> >
> >http://www.keyboardmonkey.com/struts/index.html
> >
> >At that point [SHORT TERM PLAN ALERT], I'd like to commit it to the
> >nightly build, assuming you would still like to donate it to the ASF.
> >
> >-Ted.
> >
> >
> >
> >"Tom Klaasen (TeleRelay)" wrote:
> >
> >>For the record:
> >>
> >>I've been playing with Arron's nested tags for a while now, and they
> >>seem OK to me. I've had the occasional "what the #$%#@" when something
> >>didn't work as I expected, but after thinking about it the reason was
> >>obvious. This situation occurs with most struts tags (for me, in any
> >>case :P), so they do conform to struts standards ;)
> >>
> >>tomK
> >>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>