At 4:39 PM +0100 7/15/05, Pilgrim, Peter wrote:
What does 1.3 bring to the party?
I know there will be with the composable request processor and
commons chain integration. What other innovations are there
in the new version?
Probably the biggest other thing is the "extends" mechanism which
allows most config elements to extend others, eliminating some
redundancies in config files. To be honest, I haven't used this much
yet, but I can see where it would be pretty handy.
I'm pretty keen on the "arbitrary configuration property" system
which allows almost every Struts config object to expose a map of
key/value pairs. This allows everyone to externalize more
configuration, which should encourage more reuse. For a pragmatic
example, here's another small innovation:
I modified the ExceptionHandler so that it tries harder to send
information to the browser when an error occurs using Tiles. If you
use declarative exception handling with "java.lang.Exception" and
tiles together, you've probably seen the infamous "white screen"
where a region of your page fails because of some kind of JSP error
and rather than getting information in the browser, you get nothing.
This happens because the Struts ExceptionHandler catches the error
and tries to forward control to the error path. This is illegal,
because the HttpServletResponse has been committed. What I did was
add a test of response.isCommitted() and set the ExceptionHandler to
use requestDispatcher.include() instead of ...forward() in that case.
However, acknowledging that this isn't always what people want, I
added some configuration properties to support alternatives. Because
I could use the "arbitrary configuration properties" on the
ExceptionConfig, I didn't have to muck around with updating the
Struts 1.3 DTD; instead, I just documented the property names in the
class JavaDoc.
I think this kind of use of arbitrary config properties should make
it a lot easier for people to write other reusable chunks of code,
for actions, exception handling, or in most anywhere else.
That's all I can think of off hand. There ought to be a Wiki page
somewhere that lists all these things, but I'm not sure if anyone has
done that yet.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]