I don’t quite understand the purpose of
context.xml
context.xmlis called from the
web.xmlthrough
<context-param>tag. As
you web.xml loads first when an application is created and it will create the
references for the
contextsthat are configured in it.
I don’t quite understand the purpose of
context.xml
So, the purpose of
context.xmlis adding separation of pres. you can
have separate contexts for different purposes . for example For Database
connectivity, using other frameworks etc..,
Could I eliminate the
context.xmlfile and somehow instantiate theDataSourcein my pre?
Yes ,you can do that by configuring the
datasourcein
web.xmlitself.
Hope this helps !!



