You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Witbeck, Shane" <Sh...@bankofamerica.com> on 2003/05/22 15:40:30 UTC

tiles definitions problem when performing a hot redeploy

Im currently using Ant to recompile a project which causes a reload of the
app without having to restart the app or app server manually. After I do
this Im getting a NPE on the tiles definitions when I start navigating the
app. I think the reason this is happening is because every page in my app is
a tiles definition so there isnt an opportunity to reload the definitions.
The way I currently get around this is to manually call the
ReloadDefinitionsAction which I have mapped in struts-config.xml. Looking at
the source for the action I found the following:

ServletContext context = getServlet().getServletContext();
DefinitionsFactory factory = DefinitionsUtil.getDefinitionsFactory(context
);
factory.setConfig(factory.getConfig(), context);

Does anyone know how to resolve this without manually reloading the
definitions (preferably using Ant) ?

TIA,

Shane

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


Re: tiles definitions problem when performing a hot redeploy

Posted by Cedric Dumoulin <ce...@apache.org>.
  Check the build.xml file chipped with struts sources. There is some 
targets used to hot redeploy web applications like Tiles on Tomcat.

  Hope this help,

   Cedric

Witbeck, Shane wrote:

>Im currently using Ant to recompile a project which causes a reload of the
>app without having to restart the app or app server manually. After I do
>this Im getting a NPE on the tiles definitions when I start navigating the
>app. I think the reason this is happening is because every page in my app is
>a tiles definition so there isnt an opportunity to reload the definitions.
>The way I currently get around this is to manually call the
>ReloadDefinitionsAction which I have mapped in struts-config.xml. Looking at
>the source for the action I found the following:
>
>ServletContext context = getServlet().getServletContext();
>DefinitionsFactory factory = DefinitionsUtil.getDefinitionsFactory(context
>);
>factory.setConfig(factory.getConfig(), context);
>
>Does anyone know how to resolve this without manually reloading the
>definitions (preferably using Ant) ?
>
>TIA,
>
>Shane
>
>---------------------------------------------------------------------
>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