You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Analcoolico Biondo <an...@hotmail.it> on 2007/10/29 14:40:19 UTC

Tiles2 and tile,layout refresh

Hi everybody,i'm new to tiles2 and i'm integrating an existing application with this framework:all works fine! The only problem is that when i change the content of a tile composing a layout (or the external css linked in the layout) i can see the changes only when i reload the application;if i only refresh the browser i can't see any changes.All the pages have code to disable the browser caching (and in original application that works!) but it seems tiles2 doesn't feel the file changing...What's wrong?I tried to inizialize tiles2 in all the 3 ways but no way to solve the problem.Any ideas?Thanx a lot! Dan
_________________________________________________________________
Scarica GRATIS 30 emoticon per Messenger!
http://www.emoticons-livemessenger.com/pages/msnit/index.htm

RE: Tiles2 and tile,layout refresh

Posted by Analcoolico Biondo <an...@hotmail.it>.
I've more than an application running on the same server:as you suggested i've tried changing a jsp in another web app and a refresh was enought  to see the changes... :-( 
...and i hope that! :-))
Thanx again....
 
> Date: Mon, 29 Oct 2007 16:27:12 +0100> From: antonio.petrelli@gmail.com> To: users@tiles.apache.org> Subject: Re: Tiles2 and tile,layout refresh> > 2007/10/29, Analcoolico Biondo <an...@hotmail.it>:> >> >> > Hi Antonio,> > i'm using tomcat version 5.5.17 . The container before the use of tiles2> > always have been giving a response with the latest file version.> > A simple refresh was enought.Now a reload is required. I post a semplified> > example of my structure...maybe i've mistaken something..> > > > Just to be sure, try to create a simple JSP file (without Tiles), modify it> and see what happens.> I suppose that it is a container issue, not a Tiles problem.> > Antonio
_________________________________________________________________
Scarica GRATIS le emoticon della tua squadra del cuore e il calendario di serie A!
http://www.emoticons-livemessenger.com/pages/msnitcalcio/index.htm

Re: Tiles2 and tile,layout refresh

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/30, Analcoolico Biondo <an...@hotmail.it>:
>
> Thanx!I hope this would be usefull for others!Bye



Thanks for sharing your solution :-)

Antonio

RE: Tiles2 and tile,layout refresh

Posted by Analcoolico Biondo <an...@hotmail.it>.
I've found the problem.
The following was the trouble:
 
<Context antiJARLocking="true" antiResourceLocking="true">
</Context>
 
in the context.xml file...it locked every resource blocking the updating e consequently the refresh. In tomcat it populates the temp dir (the one effectively responding to the request when these parameters are set) and no update of the webapp dir structure  would be applied to the files copied here.
Quite a silly error...! :-)) Indirectly it seems a problem caused by the container but it is only caused by the webapp!Antonio was nearly right!
Thanx!I hope this would be usefull for others!Bye
 
> From: analcoolico_biondo@hotmail.it> To: users@tiles.apache.org> Subject: RE: Tiles2 and tile,layout refresh> Date: Tue, 30 Oct 2007 12:06:25 +0000> > > Hi!> I've developed an easy application with tiles2 similar to the one that doesn't work and refresh in the same container works.> Dunno....no error logged in the container...> > Date: Mon, 29 Oct 2007 16:27:12 +0100> From: antonio.petrelli@gmail.com> To: users@tiles.apache.org> Subject: Re: Tiles2 and tile,layout refresh> > 2007/10/29, Analcoolico Biondo <an...@hotmail.it>:> >> >> > Hi Antonio,> > i'm using tomcat version 5.5.17 . The container before the use of tiles2> > always have been giving a response with the latest file version.> > A simple refresh was enought.Now a reload is required. I post a semplified> > example of my structure...maybe i've mistaken something..> > > > Just to be sure, try to create a simple JSP file (without Tiles), modify it> and see what happens.> I suppose that it is a container issue, not a Tiles problem.> > Antonio> _________________________________________________________________> Conosci Doretta? Contattala, è ora su Messenger!> http://www.doretta82.it/banner/index.html
_________________________________________________________________
Scarica GRATIS 30 emoticon per Messenger!
http://www.emoticons-livemessenger.com/pages/msnit/index.htm

RE: Tiles2 and tile,layout refresh

Posted by Analcoolico Biondo <an...@hotmail.it>.
Hi!
I've developed an easy application with tiles2 similar to the one that doesn't work and refresh in the same container works.
Dunno....no error logged in the container...
> Date: Mon, 29 Oct 2007 16:27:12 +0100> From: antonio.petrelli@gmail.com> To: users@tiles.apache.org> Subject: Re: Tiles2 and tile,layout refresh> > 2007/10/29, Analcoolico Biondo <an...@hotmail.it>:> >> >> > Hi Antonio,> > i'm using tomcat version 5.5.17 . The container before the use of tiles2> > always have been giving a response with the latest file version.> > A simple refresh was enought.Now a reload is required. I post a semplified> > example of my structure...maybe i've mistaken something..> > > > Just to be sure, try to create a simple JSP file (without Tiles), modify it> and see what happens.> I suppose that it is a container issue, not a Tiles problem.> > Antonio
_________________________________________________________________
Conosci Doretta? Contattala, è ora su Messenger!
http://www.doretta82.it/banner/index.html

Re: Tiles2 and tile,layout refresh

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/29, Analcoolico Biondo <an...@hotmail.it>:
>
>
> Hi Antonio,
> i'm using tomcat version 5.5.17 . The container before the use of tiles2
> always have been giving a response with the latest file version.
> A simple refresh was enought.Now a reload is required. I post a semplified
> example of my structure...maybe i've mistaken something..



Just to be sure, try to create a simple JSP file (without Tiles), modify it
and see what happens.
I suppose that it is a container issue, not a Tiles problem.

Antonio

RE: Tiles2 and tile,layout refresh

Posted by Analcoolico Biondo <an...@hotmail.it>.
Hi Antonio,
i'm using tomcat version 5.5.17 . The container before the use of tiles2 always have been giving a response with the latest file version.
A simple refresh was enought.Now a reload is required. I post a semplified example of my structure...maybe i've mistaken something.. 
Thanx!
 
THE TILES-DEFS.XML
 
<tiles-definitions>
<!-- layout work --> <definition name="protected.work" template="/protected/layout/work_layout.jsp">   <put-attribute name="top" value="/protected/work/work_menu.jsp" />   <put-attribute .....      </definition>
</tiles-definitions>
 
 
THIS IS THE LAYOUT (work_layout.jsp)
 
<%@ other taglibs...
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
 
<% response.addHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate");response.addHeader("Cache-Control","pre-check=0,post-check=0");response.setDateHeader("Expires",0);%>
 
<HTML>   <HEAD>    <TITLE></TITLE>    <LINK rel=stylesheet href="<c:url value="/style/styleWork.css" />" type="text/css">  </HEAD>
  <BODY bgcolor="white"> <CENTER>   <DIV class="container">       <tiles:insertAttribute name="top" />
 
   ....the others <tiles:insertAttribute ..
   </DIV>   </CENTER>  </BODY></HTML>
 
A PAGE THAT USES THIS LAYOUT
<%@ taglib ....
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<% response.addHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate");response.addHeader("Cache-Control","pre-check=0,post-check=0");response.setDateHeader("Expires",0);%>
<tiles:insertDefinition name="protected.work" />
 
 
 
 
ONE OF THE TILES (work_menu.jsp)
 
<% response.addHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate");response.addHeader("Cache-Control","pre-check=0,post-check=0");response.setDateHeader("Expires",0);%>
 
<TABLE > <TR> <TD class="left" height="16" >
 
      .....content.....
 
</TD> </TR></TABLE>
 
 
 
_________________________________________________________________
Scarica GRATIS la versione personalizzata MSN di Internet Explorer 7!
http://optimizedie7.msn.com/default.aspx?mkt=it-it

Re: Tiles2 and tile,layout refresh

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/29, Analcoolico Biondo <an...@hotmail.it>:
>
>
> Hi everybody,i'm new to tiles2 and i'm integrating an existing application
> with this framework:all works fine! The only problem is that when i change
> the content of a tile composing a layout (or the external css linked in the
> layout) i can see the changes only when i reload the application;if i only
> refresh the browser i can't see any changes.All the pages have code to
> disable the browser caching (and in original application that works!) but it
> seems tiles2 doesn't feel the file changing...What's wrong?I tried to
> inizialize tiles2 in all the 3 ways but no way to solve the problem.Anyideas?Thanx a lot! Dan



This is pretty strange... do you mean that if you change a CSS or JSP file
you don't see the changes?
If yes, probably your container does not get the changes. What Java EE
container are you using?

Antonio