The MailReader database is loaded through a listerner in the web.xml,
which "injects" it into application scope. The data is not coming from
the XML. The listerner parses the XML and creates a database object.
The MailReader then addresses the database object, oblivious as to how
it is loaded or where it is saved.

Of course, that part has nothing to do with Struts 2 per se :) Struts
1 and Shale use the same MailReader DAO bits as Strus 2.

The nifty Struts 2 part is that MailReader support class doesn't need
to import the HTTP API. The framework injects a Map into the Action
that proxies application scope, but all the Action sees is a plain old
Map.

-Ted.

On 10/18/06, Jim Reynolds <[EMAIL PROTECTED]> wrote:
I am trying to figure out how Struts2 works, so I am going through the
docs at <http://planetstruts.org/struts2-mailreader/Tour.do#Welcome>
and walking the code.

Problem: I cannot figure out how the Welcome.java which subclasses
MailreaderSupport gets the data to and from the xml? I see the
database.xml file getting written to ... but sadly, I cannot figure
how how the file gets loaded?

I do not see any IOC going on unless I am missing it. If anyone
understands how this code works and could give me any pointers, I
would appreciate.

Thanks,

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




--
HTH, Ted.
* http://www.husted.com/struts/

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

Reply via email to