You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kris Rasmussen <kr...@yahoo.com> on 2005/06/12 05:49:37 UTC

asset service not respecting file last modified ???

Correct me if i am wrong, but the asset service as is does not appear to be respecting the fact that the files have not been modified since the last refresh and as a result they are sent ever browse to the page. I am working on a fix locally but I would suggest that you look into this if it is the case as it could significantly reduce the bandwidth of a tapestry app as well as the cpu time on the server. I am going to verify this and post a fix if anyone is interested.
 
I am using 3.02.
 
Kris

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: asset service not respecting file last modified ???

Posted by Howard Lewis Ship <hl...@gmail.com>.
Applying your patch is on my list and it will be in the beta.

On 6/12/05, Viktor Szathmary <ph...@gmail.com> wrote:
> I have implemented and submitted a patch for this a while ago. I hope,
> that one fine day, it will be applied and a 3.0.4 release will be cut,
> for those oldschool users out there, who are not all that excited
> about 4.0 yet, just want to see a few minor tweaks ;)
> 
> See http://article.gmane.org/gmane.comp.jakarta.tapestry.devel/4981
> 
>  viktor
> 
> 
> On 6/12/05, Kris Rasmussen <kr...@yahoo.com> wrote:
> > Yep, as far as I can tell the asset service does not let the browser cache files and as a result your tapestry apps are probably sending a lot more data than you need to if you are using a lot of assets. I don't know if this has been fixed in later versions but I suspect someone will want to  if it hasn't = ). There are some other optimizations you could make to the asset service as well.
> >
> > I don't use the asset service much but I modeled my own file services after it so I have a local fix on my machine for these services. When I get around to it I will help someone patch the asset service itself if they can't figure it out, its not hard to do.
> >
> > -Kris
> >
> > Kris Rasmussen <kr...@yahoo.com> wrote:
> > Correct me if i am wrong, but the asset service as is does not appear to be respecting the fact that the files have not been modified since the last refresh and as a result they are sent ever browse to the page. I am working on a fix locally but I would suggest that you look into this if it is the case as it could significantly reduce the bandwidth of a tapestry app as well as the cpu time on the server. I am going to verify this and post a fix if anyone is interested.
> >
> > I am using 3.02.
> >
> > Kris
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > ---------------------------------
> > Discover Yahoo!
> >  Get on-the-go sports scores, stock quotes, news & more. Check it out!
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: asset service not respecting file last modified ???

Posted by Kris Rasmussen <kr...@yahoo.com>.
Yeah, seems like a pretty serious performance/bandwidth issue. Hopefully people recognize the implications of this. Your patch will definatly work with the newest release (3.0.4) however with the older releases you need to check the server date headers and send 304 not modified responses as appropriate.
 
I'm with you about the 4+ releases. I think there are some nice changes going into them but for those of us who are developing massive apps with older versions switching over to new builds isn't all that easy ;), and definatly not practical until the 4+ releases stabalize. Nevertheless, I don't mind patching my own version in exchange for more time spent on innovating better solutions, I think its worth it. Gotta keep up with and beat the trends ;)... ruby on rails, jsf, new versions of .net, etc... only way tapestry is gonna make it without a massive following behind it just yet.
 
-Kris

Viktor Szathmary <ph...@gmail.com> wrote:
I have implemented and submitted a patch for this a while ago. I hope,
that one fine day, it will be applied and a 3.0.4 release will be cut,
for those oldschool users out there, who are not all that excited
about 4.0 yet, just want to see a few minor tweaks ;)

See http://article.gmane.org/gmane.comp.jakarta.tapestry.devel/4981

viktor


On 6/12/05, Kris Rasmussen wrote:
> Yep, as far as I can tell the asset service does not let the browser cache files and as a result your tapestry apps are probably sending a lot more data than you need to if you are using a lot of assets. I don't know if this has been fixed in later versions but I suspect someone will want to if it hasn't = ). There are some other optimizations you could make to the asset service as well.
> 
> I don't use the asset service much but I modeled my own file services after it so I have a local fix on my machine for these services. When I get around to it I will help someone patch the asset service itself if they can't figure it out, its not hard to do.
> 
> -Kris
> 
> Kris Rasmussen wrote:
> Correct me if i am wrong, but the asset service as is does not appear to be respecting the fact that the files have not been modified since the last refresh and as a result they are sent ever browse to the page. I am working on a fix locally but I would suggest that you look into this if it is the case as it could significantly reduce the bandwidth of a tapestry app as well as the cpu time on the server. I am going to verify this and post a fix if anyone is interested.
> 
> I am using 3.02.
> 
> Kris
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> ---------------------------------
> Discover Yahoo!
> Get on-the-go sports scores, stock quotes, news & more. Check it out!
>

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


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: asset service not respecting file last modified ???

Posted by Viktor Szathmary <ph...@gmail.com>.
I have implemented and submitted a patch for this a while ago. I hope,
that one fine day, it will be applied and a 3.0.4 release will be cut,
for those oldschool users out there, who are not all that excited
about 4.0 yet, just want to see a few minor tweaks ;)

See http://article.gmane.org/gmane.comp.jakarta.tapestry.devel/4981

 viktor


On 6/12/05, Kris Rasmussen <kr...@yahoo.com> wrote:
> Yep, as far as I can tell the asset service does not let the browser cache files and as a result your tapestry apps are probably sending a lot more data than you need to if you are using a lot of assets. I don't know if this has been fixed in later versions but I suspect someone will want to  if it hasn't = ). There are some other optimizations you could make to the asset service as well.
> 
> I don't use the asset service much but I modeled my own file services after it so I have a local fix on my machine for these services. When I get around to it I will help someone patch the asset service itself if they can't figure it out, its not hard to do.
> 
> -Kris
> 
> Kris Rasmussen <kr...@yahoo.com> wrote:
> Correct me if i am wrong, but the asset service as is does not appear to be respecting the fact that the files have not been modified since the last refresh and as a result they are sent ever browse to the page. I am working on a fix locally but I would suggest that you look into this if it is the case as it could significantly reduce the bandwidth of a tapestry app as well as the cpu time on the server. I am going to verify this and post a fix if anyone is interested.
> 
> I am using 3.02.
> 
> Kris
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> ---------------------------------
> Discover Yahoo!
>  Get on-the-go sports scores, stock quotes, news & more. Check it out!
>

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


Re: Updating tapestry templates without redeploying in Eclipse JBoss IDE

Posted by Bryan Lewis <br...@maine.rr.com>.
Try this old thread:

http://marc.theaimsgroup.com/?l=tapestry-user&m=107538510116911&w=2


----- Original Message ----- 
From: "John Hendrikx" <hj...@xs4all.nl>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, June 13, 2005 7:45 AM
Subject: Updating tapestry templates without redeploying in Eclipse JBoss
IDE


> I'm new to Tapestry, and I'm currently trying to evaluate it for a
> project.  I've managed to get the examples to work, and I've ran through
> a few tutorials.
>
> The problem I'm having is that I need to repackage and then redeploy a
> .war file to JBoss for each and every modification I make to the
> templates.  What I want however is that changes to the files are
> detected automatically and a simple browser refresh shows the new
> results.  It doesn't have to work with a .war file (only final
> deployment will use a .war file, during development I'm more interested
> in convience).
>
> One of the tutorials mentions that it is possible to have Tapestry not
> cache it's templates by specifying a vm parameter:
>
> -Dorg.apache.tapestry.disable-caching=true
>
> However, specifying this for my JBoss launch in Eclipse doesn't have an
> effect.  I assume this is because the entire context is stored in the
> .war file, which of course won't change if I edit a file in Eclipse.
>
> If I use only Tomcat, I can get this to work, however I would like to be
> able to do this with the JBoss + Tomcat combination.
>
> So far, I checked the last 6 months of this mailinglist, googled for
> several hours and read various boards, but I'm no closer to a solution.
> I suspect it must be possible to put somekind of .xml file in the JBoss
> deploy folder, and have this .xml file point directly to my Eclipse
> workspace (just like you can do with Tomcat), but so far I've been
> unable to find anything about this.  Does anyone have any ideas or tips
> I might look into to get this to work?
>
> --John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


Re: Updating tapestry templates without redeploying in Eclipse JBoss IDE

Posted by Kent Tong <ke...@cpttm.org.mo>.
John Hendrikx <hjohn <at> xs4all.nl> writes:

> I suspect it must be possible to put somekind of .xml file in the JBoss 
> deploy folder, and have this .xml file point directly to my Eclipse 
> workspace (just like you can do with Tomcat), but so far I've been 
> unable to find anything about this.  Does anyone have any ideas or tips 
> I might look into to get this to work?

To allow deploying a directory, edit
c:/jboss-3.2.5/server/default/deploy/jbossweb-tomcat50.sar/server.xml.
In particular, the <Host> element should set like:

     <Host name="localhost"
           autoDeploy="true" deployOnStartup="true" deployXML="true">

Then put your .xml files (context descriptors) into 
c:/jboss-3.2.5/server/default/conf/jboss.web/localhost.

To pass the JVM parameter to tomcat, edit 
c:/jboss-3.2.5/bin/run.bat to set JAVA_OPTS at the
begining:

set JAVA_OPTS=-Dorg.apache.tapestry.disable-caching=true

--
Author of an e-Book for learning Tapestry (www.agileskills2.org/EWDT)



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


Updating tapestry templates without redeploying in Eclipse JBoss IDE

Posted by John Hendrikx <hj...@xs4all.nl>.
I'm new to Tapestry, and I'm currently trying to evaluate it for a 
project.  I've managed to get the examples to work, and I've ran through 
a few tutorials.

The problem I'm having is that I need to repackage and then redeploy a 
.war file to JBoss for each and every modification I make to the 
templates.  What I want however is that changes to the files are 
detected automatically and a simple browser refresh shows the new 
results.  It doesn't have to work with a .war file (only final 
deployment will use a .war file, during development I'm more interested 
in convience).

One of the tutorials mentions that it is possible to have Tapestry not 
cache it's templates by specifying a vm parameter:

-Dorg.apache.tapestry.disable-caching=true

However, specifying this for my JBoss launch in Eclipse doesn't have an 
effect.  I assume this is because the entire context is stored in the 
.war file, which of course won't change if I edit a file in Eclipse.

If I use only Tomcat, I can get this to work, however I would like to be 
able to do this with the JBoss + Tomcat combination. 

So far, I checked the last 6 months of this mailinglist, googled for 
several hours and read various boards, but I'm no closer to a solution.  
I suspect it must be possible to put somekind of .xml file in the JBoss 
deploy folder, and have this .xml file point directly to my Eclipse 
workspace (just like you can do with Tomcat), but so far I've been 
unable to find anything about this.  Does anyone have any ideas or tips 
I might look into to get this to work?

--John

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


Re: Switching Locale

Posted by Alexander Kolesnikov <ak...@galactica.ru>.
> 
> Try calling cycle.cleanUp() and then activate the original page.
> 
> I have an detailed example on this in chapter 6 of my book and
> you can download and check the source code too 
> (http://www.agileskills2.org/EWDT).

First attempt produced org.apache.tapestry.ApplicationRuntimeException
in the line of Home.page where I am referencing the Home class. But I
just ordered your book and hope to find answer there :)

Thanks!


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


Re: Switching Locale

Posted by Kent Tong <ke...@cpttm.org.mo>.
Alexander Kolesnikov <ak <at> galactica.ru> writes:

> public class ChangeLocale extends BasePage implements PageRenderListener
> {	
>   public void pageBeginRender(PageEvent event) {
> 	IRequestCycle cycle = event.getRequestCycle();
> 	cycle.activate("Home");
>   }
> }
> 
> But this doesn't work. Why?

Try calling cycle.cleanUp() and then activate the original page.

I have an detailed example on this in chapter 6 of my book and
you can download and check the source code too 
(http://www.agileskills2.org/EWDT).



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


Switching Locale

Posted by Alexander Kolesnikov <ak...@galactica.ru>.
To switch the locale of a page, I need to pass through an intermediate
page, as it is described in chapter 7 of Howard's book, for the change
to take effect.

I want to spend as little time on that other page as possible, so I
tried to do the following:

public class ChangeLocale extends BasePage implements PageRenderListener
{	
  public void pageBeginRender(PageEvent event) {
	IRequestCycle cycle = event.getRequestCycle();
	cycle.activate("Home");
  }
}

But this doesn't work. Why?

Thanks.


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


Re: asset service not respecting file last modified ???

Posted by Kris Rasmussen <kr...@yahoo.com>.
Yep, as far as I can tell the asset service does not let the browser cache files and as a result your tapestry apps are probably sending a lot more data than you need to if you are using a lot of assets. I don't know if this has been fixed in later versions but I suspect someone will want to  if it hasn't = ). There are some other optimizations you could make to the asset service as well.
 
I don't use the asset service much but I modeled my own file services after it so I have a local fix on my machine for these services. When I get around to it I will help someone patch the asset service itself if they can't figure it out, its not hard to do.
 
-Kris

Kris Rasmussen <kr...@yahoo.com> wrote:
Correct me if i am wrong, but the asset service as is does not appear to be respecting the fact that the files have not been modified since the last refresh and as a result they are sent ever browse to the page. I am working on a fix locally but I would suggest that you look into this if it is the case as it could significantly reduce the bandwidth of a tapestry app as well as the cpu time on the server. I am going to verify this and post a fix if anyone is interested.

I am using 3.02.

Kris

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
		
---------------------------------
Discover Yahoo!
 Get on-the-go sports scores, stock quotes, news & more. Check it out!