Re: Using com.ibaits.struts to work with files in the web application

2006-04-24 Thread Ted Schrader
Ha, that's easy enough. Thanks, Jeff. On 24/04/06, Jeff Butler <[EMAIL PROTECTED]> wrote: > > You can also do: > > getServlet().getServletContext() > > > Jeff Butler > > > > On 4/24/06, Ted Schrader <[EMAIL PROTECTED]> wrote: > > Oops, the line of code should be: > > > > ServletContext cont

Re: Using com.ibaits.struts to work with files in the web application

2006-04-24 Thread Jeff Butler
You can also do:   getServlet().getServletContext()   Jeff Butler  On 4/24/06, Ted Schrader <[EMAIL PROTECTED]> wrote: Oops, the line of code should be:  ServletContext context = request.getSession().getServletContext(); TedOn 24/04/06, Ted Schrader <[EMAIL PROTECTED]> wrote:> Hi Meindert,>> Ar

Re: Using com.ibaits.struts to work with files in the web application

2006-04-24 Thread Ted Schrader
Oops, the line of code should be: ServletContext context = request.getSession().getServletContext(); Ted On 24/04/06, Ted Schrader <[EMAIL PROTECTED]> wrote: > Hi Meindert, > > Are you trying to retrieve the ServletContext() from a Struts Action > subclass? If so, then you can start with

Re: Using com.ibaits.struts to work with files in the web application

2006-04-24 Thread Ted Schrader
Hi Meindert, Are you trying to retrieve the ServletContext() from a Struts Action subclass? If so, then you can start with the request object passed into the execute method: public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest reque

RE: Using com.ibaits.struts to work with files in the web application

2006-04-24 Thread Meindert
Hi Ted, Wasn't to sure if it was the right spot to ask, but thought I could post it here because the 'problem' was with the ibatis struts. The context for my servlet is under; ServletContext context = ActionContext.getActionContext().getRequest().getSession().getServletContext (); Thanks for the

Re: Using com.ibaits.struts to work with files in the web application

2006-04-24 Thread Ted Schrader
Hi Meindert, It appears you're trying to repurpose the example PetStore application. I'm not sure if this is the proper forum for this sort of question, but anyway You should use ServletContext. To get it from inside a servlet, do something like this: ServletContext sCtxt = getServletConfig