You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Kriger <ak...@greaterthanone.com> on 2003/09/16 16:04:06 UTC

getServlet?

The ServletContext.getServlet() method has been deprecated. Is it possible
to get a Servlet (or the ServletConfig, which is what I'm really after) in a
Struts Action?

thx
andy


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: getServlet?

Posted by Andrew Kuzmin <ku...@soft-ukraine.com>.
getServlet().getServletConfig() ?

--
Andrew Kuzmin
http://www.java201.com


----- Original Message -----
From: "Andy Kriger" <ak...@greaterthanone.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, September 16, 2003 5:04 PM
Subject: getServlet?


> The ServletContext.getServlet() method has been deprecated. Is it possible
> to get a Servlet (or the ServletConfig, which is what I'm really after) in
a
> Struts Action?
>
> thx
> andy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: getServlet?

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Tue, 16 Sep 2003, Andy Kriger wrote:

> Date: Tue, 16 Sep 2003 10:04:06 -0400
> From: Andy Kriger <ak...@greaterthanone.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: getServlet?
>
> The ServletContext.getServlet() method has been deprecated.

Yes.

> Is it possible
> to get a Servlet (or the ServletConfig, which is what I'm really after) in a
> Struts Action?

You can get the ServletConfig for the controller servlet itself by calling
getServlet().getServletConfig().  You cannot get the ServletConfig for any
other servlet.  If that other servlet needs to share info, have it put
things into servlet context attributes.

>
> thx
> andy

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org