struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Berney <mber...@urbanet.ch>
Subject Re: getting the servlet context
Date Mon, 01 Oct 2001 20:04:04 GMT
"Johnson, Nathaniel" a écrit :
> 
> Does anyone know how to get the servletContext from within a custom tag
> (public class MyTag extends SupportTag...)
> 
> Thanks!
> Nate

i did it that way seems to work

ActionMappings mappings =
(ActionMappings)pageContext.getAttribute(Action.MAPPINGS_KEY,PageContext.APPLICATION_SCOPE);
ServletContext context = mappings.getServlet().getServletContext();

Mime
View raw message