Greetings all:
I am trying to populate the options for a select list from a DB call.
And I am getting a null pointer exception from this line in the
ActionForm (I copied it from my Action, where it works):
DataSource dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
What I am trying to do is use the ConnectionPool provided by Struts.
This call works great in my Action but doesn't work in my ActionForm.
On the IRC channel (irc.freenode.net #struts) we have been discussing
the merits of putting a DB call in an ActionForm.
SOoo, my main question is,
How do I ask the context for the connection pool in an ActionForm?
But I would also love to see discussion about the merits of putting a DB
call in an ActionForm at all. If I didn't put the call in the ActionForm
how would I get the data from the DB call into the actionForm?
Thanks in advance for all your help,
Steve
BTW it appears as if posting from the basebeans nntp doesn't get posted
to the list.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: How to access the Struts ConnectionPool from an ... Steven Citron-Pousty
- Re: How to access the Struts ConnectionPool fro... Jagdish Arora
- Re: How to access the Struts ConnectionPool ... Steven Citron-Pousty
- Re: How to access the Struts ConnectionP... Steven Citron-Pousty
- Intermittent parsing error processin... Jagdish Arora
- Re: Intermittent parsing error ... Jagdish Arora
- Re: Intermittent parsing er... Craig R. McClanahan
- RE: How to access the Struts ConnectionPool fro... Assenza, Chris

