You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eddie Bush <ek...@swbell.net> on 2002/03/01 15:57:22 UTC
Getting a ServletContext
Hey guys/gals =)
I'm trying to get a ServletContext object in one of my actions... but I don't seem to be having any luck.
Here is what I've tried:
servlet.getContext();
getServlet().getContext();
... neither of which seem to work, in spite of the fact that ActionServlet extends HttpServlet.
Thanks so much!
Eddie
Re: Getting a ServletContext
Posted by Melanie Harris <ha...@yahoo.com>.
Try this.
ActionServlet servlet = getServlet();
ServletContext ctxt = servlet.getServletContext();
-mel h
Eddie Bush <ek...@swbell.net> wrote: Hey guys/gals =)
I'm trying to get a ServletContext object in one of my actions... but I don't seem to be having any luck.
Here is what I've tried:
servlet.getContext();
getServlet().getContext();
... neither of which seem to work, in spite of the fact that ActionServlet extends HttpServlet.
Thanks so much!
Eddie
---------------------------------
Do You Yahoo!?
Yahoo! Sports - Sign up for Fantasy Baseball
RE: Getting a ServletContext
Posted by David Cypers <da...@mediamine.com>.
hey, those things can happen, don't worry :-)
-----Original Message-----
From: Eddie Bush [mailto:ekbush@swbell.net]
Sent: vrijdag 1 maart 2002 16:23
To: Struts Users Mailing List
Subject: Re: Getting a ServletContext
Ok now I feel stupid. Is it Friday yet?
I'm sorry I had it so pinned in my mind the method was getContext that I
never even thought to consult the docs.
Thank You!
----- Original Message -----
From: "David Cypers" <da...@mediamine.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, March 01, 2002 9:20 AM
Subject: RE: Getting a ServletContext
> httpservlet documentation ==>
>
> HttpServlet.getServletContext()
>
>
>
> -----Original Message-----
> From: Eddie Bush [mailto:ekbush@swbell.net]
> Sent: vrijdag 1 maart 2002 15:57
> To: Struts Users Mailing List
> Subject: Getting a ServletContext
>
>
> Hey guys/gals =)
>
> I'm trying to get a ServletContext object in one of my actions... but I
> don't seem to be having any luck.
>
> Here is what I've tried:
>
> servlet.getContext();
> getServlet().getContext();
>
> .. neither of which seem to work, in spite of the fact that ActionServlet
> extends HttpServlet.
>
> Thanks so much!
>
> Eddie
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Getting a ServletContext
Posted by Eddie Bush <ek...@swbell.net>.
Ok now I feel stupid. Is it Friday yet?
I'm sorry I had it so pinned in my mind the method was getContext that I
never even thought to consult the docs.
Thank You!
----- Original Message -----
From: "David Cypers" <da...@mediamine.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, March 01, 2002 9:20 AM
Subject: RE: Getting a ServletContext
> httpservlet documentation ==>
>
> HttpServlet.getServletContext()
>
>
>
> -----Original Message-----
> From: Eddie Bush [mailto:ekbush@swbell.net]
> Sent: vrijdag 1 maart 2002 15:57
> To: Struts Users Mailing List
> Subject: Getting a ServletContext
>
>
> Hey guys/gals =)
>
> I'm trying to get a ServletContext object in one of my actions... but I
> don't seem to be having any luck.
>
> Here is what I've tried:
>
> servlet.getContext();
> getServlet().getContext();
>
> .. neither of which seem to work, in spite of the fact that ActionServlet
> extends HttpServlet.
>
> Thanks so much!
>
> Eddie
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Getting a ServletContext
Posted by David Cypers <da...@mediamine.com>.
httpservlet documentation ==>
HttpServlet.getServletContext()
-----Original Message-----
From: Eddie Bush [mailto:ekbush@swbell.net]
Sent: vrijdag 1 maart 2002 15:57
To: Struts Users Mailing List
Subject: Getting a ServletContext
Hey guys/gals =)
I'm trying to get a ServletContext object in one of my actions... but I
don't seem to be having any luck.
Here is what I've tried:
servlet.getContext();
getServlet().getContext();
.. neither of which seem to work, in spite of the fact that ActionServlet
extends HttpServlet.
Thanks so much!
Eddie
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>