Get request object

2006-05-12 Thread Chaudhary, Harsh
Hi, This is not exactly a struts question. But I am in a bind and short on time. So, maybe someone can help. I need to access the request object from a struts form. How do I do that? I mean how can I access the request object. I could have sworn there was a way to get either the ServletContext or

Re: Get request object

2006-05-12 Thread David Evans
Hello, I don't think you can get the request from the ActionForm. From within the ActionForm you can get the ServletContext this way: ServletContext context = this.getServlet().getServletContext(); But i don't think that helps. What is the scenario here? why do you need the request in the Acti

RE: Get request object

2006-05-12 Thread Chaudhary, Harsh
from anywhere. If yes, then is there a way to do it. Any thoughts? Harsh. -Original Message- From: David Evans [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 1:41 PM To: Struts Users Mailing List Subject: Re: Get request object Hello, I don't think you can get the request fro

Re: Get request object

2006-05-12 Thread Dave Newton
Chaudhary, Harsh wrote: > I have solved my problem now. But I am still wondering if it is a good > idea to have access to the request object from anywhere. If yes, then is > there a way to do it. Any thoughts? > Depending on the request adds a layer of dependency. This makes testing that much

RE: Get request object

2006-05-12 Thread David Evans
e- > From: David Evans [mailto:[EMAIL PROTECTED] > Sent: Friday, May 12, 2006 1:41 PM > To: Struts Users Mailing List > Subject: Re: Get request object > > > Hello, > > I don't think you can get the request from the ActionForm. From within > the Ac

RE: Get request object

2006-05-12 Thread Chaudhary, Harsh
advise. Harsh. -Original Message- From: David Evans [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 3:42 PM To: Struts Users Mailing List Subject: RE: Get request object I would suggest in that scenario that you could create a property on your ActionForm for the object that is stored in