D'oh!  I actually wanted it in a TAG but that will work fine.  I had
forgotten about that method of obtaining it.

Thanks so much for your patience!

Eddie

----- Original Message -----
From: "Ronald Haring" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 7:59 AM
Subject: RE: Getting DataSource from an Action


> sure there is:
>
>     public ActionForward perform(ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
>
> // Extract attributes we will need
> if ( Globals.isDebugable() ) {
> Log.getDebugDeveloperCategory().debug(
> Globals.snoopRequest(request) );
> }
> HttpSession session = request.getSession(false);
> Locale locale = getLocale(request);
> MessageResources messages = getResources();
> DataSource dataSource = (DataSource)
>
servlet.getServletContext().getAttribute(org.apache.struts.action.Action.DAT
> A_SOURCE_KEY);
>
> Gr
> Ronald
>
> > -----Original Message-----
> > From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 05, 2002 2:51 PM
> > To: Struts Users Mailing List
> > Subject: Getting DataSource from an Action
> >
> >
> > Is it possible to obtain a reference to the built-in struts
> > datasource from a custom action?
> >
> > If so, is there something I could reference on how to do it?
> > I haven't been able to find anything.
> >
> > Thanks so much!
> >
> > Eddie
> >
> >
>
>
> Furore B.V.
> Rijswijkstraat 175-8
> Postbus 9204
> 1006 AE Amsterdam
> tel. (020) 346 71 71
> fax. (020) 346 71 77
>
> --------------------------------------------------------------------------
--
> ---------------
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other
> than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material
> from any computer
> --------------------------------------------------------------------------
--
> ---------------
>
>


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

Reply via email to