You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Craig R. McClanahan" <Cr...@Eng.Sun.COM> on 2000/06/21 18:36:13 UTC

Re: Newbie Questions About Struts

(Jung, my mail reader totally mashes the character set you are using --
so I had to reply in a separate message)

TODO List
========

There is a "TODO" list document included in the distribution that
identifies items that I know about so far.  Some of them have actually
been completed already (in particular, the documentation has been
brought up to date).  The largest area of functionality I know that I'd
like to add is to extend the various form-related custom tags with an
ability to create JavaScript functions for client-side validation of
things like "this field is required" and "this field must contain an
integer".  It should be possible to do this in a fashion that does not
mess up any previous use of the tags as they currently exist.

We are, of course, interested in other ideas that would make development
of apps based on this framework easier.

Beyond that, I get the feeling that the basic architecture of Struts is
shaking down pretty nicely, and that we should generally be able to add
new features in a manner that is backwards compatible.  However, we
haven't yet done a 1.0 release, so I cannot really say that backwards
compatibility is a high priority issue at the moment.


Thread Safety
===========

The Struts framework itself is thread safe.  Application components must
follow the same thread-safe programming practices that you must use for
servlets anyway.  In particular, note the following:

* Only a single instance of an Action class will be created,
  and it will be shared across multiple simultaneous requests.
  Therefore, you should use only local variables in Action
  classes -- not instance variables.  This is exactly the same
  restriction imposed on the doGet() and doPost() methods
  of your servlets.

* Request attributes (i.e. request-scope beans in JSP) are
  generally thread safe because only the current request thread
  ever sees them.  You do not generally need to worry about
  simultaneous access, unless you are storing a reference to
  some shared object.

* Session attributes (i.e. session-scope beans in JSP) are
  potentially accessible from multiple threads, if the user causes
  more than one request to occur simultaneously.  Typical cases
  where this happens are in a framed presentation (the browser
  issues requests for multiple frames at once), or where the user
  presses STOP and starts another request while the first request
  is still running.  In practice, these tend not to be huge issues.

Craig McClanahan