You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alberto Lepe <al...@gmail.com> on 2005/05/27 17:45:16 UTC

Re: Serving large number of product images

I use to add a System Property like: 
(with JBOSS:)
MY_IMAGES=/usr/local/jboss/server/default/deploy/jbossweb-tomcat50.sar/ROOT.war/project_images
(with ORION:)
MY_IMAGES=/usr/local/orion/default-web-app/project_images

Those are web folders that are not affected if you restart the server
or you deploy your application and will let you upload files (if you
setup permissions propertly).

At you application, you will call your images at:
/project_images/logo.jpg

Use System Properties, so you can change it to what ever directory you want.

Please visit: www.tapestryforum.com and join us!

A. Lepe

2005/5/18, Erik Hatcher <er...@ehatchersolutions.com>:
> 
> On May 18, 2005, at 1:01 PM, Patrick Yip wrote:
> 
> > Hi Erik,
> >
> > Can you please give a brief example to show us how to use the
> > AssetExternalizer?  Where should the AssetExternalizer be set up and
> > configured?
> 
> >
> > If possible, can you add it to the FAQ because I believe it is not in
> > any of the documentation or in the TIA book?
> 
> I don't have a working example handy, as the externalizer is used
> primarily for production deployments, not for development.  But, it
> works exactly as documented at the page I sent.  Set those two system
> properties as described and any private assets will get externalized
> to the directory specified and the generated URLs to those assets
> will be modified to use the base URL specified.
> 
> On second thought, asset externalization is not a good solution for
> this particular case.  Asset externalization is for private assets
> that get served from the classpath, which is probably not the case
> here.  I consider the asset externalization feature of Tapestry one
> of its really clever strong points - beating up the app. server to
> feed the DatePicker calendar icon from the classpath dynamically is
> not good for production, yet you can flip a couple of switches and
> off-load that calendar icon to Apache directly.
> 
>      Erik
> 
> 
> >
> > Thanks,
> > -Patrick
> >
> > -----Original Message-----
> > From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> > Sent: Tuesday, May 17, 2005 5:41 AM
> > To: Tapestry users
> > Subject: Re: Serving large number of product images
> >
> >
> > On May 16, 2005, at 8:00 PM, Patrick Yip wrote:
> >
> >
> >> I apologize if this question has been asked too many times.   I did a
> >> quick search and haven't been able to find a satisfactory answer.
> >>
> >> Currently, I face a practical issue of serving the images when the
> >> image
> >> files are packaged into the war file.
> >> Adding images require me to repackage the war file and upload to the
> >> JBoss server.
> >>
> >> Is there a way to specify a directory outside of JBoss server
> >> directory
> >> (but on the same physical machine) so I can have a permanent home
> >> for my
> >> product images?
> >>
> >> For instance, I would like to store all the product images under
> >> c:\products\  directory.
> >> Any suggestion is greatly appreciated.
> >>
> >
> > You will need c:\products be web accessible for this to work, check
> > out the externalizer capability built into Tapestry asset handling:
> >
> >      http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/
> > asset/AssetExternalizer.html
> >
> > Erik
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> 
> ---------------------------------------------------------------------
> 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