[Actionframework-users] Set javax.servlet.ServletContext Velocity Application Attribute
Status: Inactive
Brought to you by:
ptoman
|
From: Mark A. <ma...@pa...> - 2003-05-15 14:42:22
|
I would like to be able to use the WebappLoader from the velocity tools=20
subproject with ActionServlet. However, this requires that=20
javax.servlet.ServletContext is set as an application attribute of veloci=
ty=20
on startup.
Therefore I propose adding the following method to=20
org.actionframework.engines.velocity.VelocityServlet
protected void initVelocity(ServletConfig config) throws ServletException
{
Velocity.setApplicationAttribute("javax.servlet.ServletContext",=20
getServletContext());
super.initVelocity(config);
}
--=20
Regards,
Mark
|