I'm not sure how that would work.

If the static content has been placed in a directory under the tapestry webapp 
directory then it is servable directly by the container and potentially not 
secure. It will also potentially invoke the tapestry filter and conflict.

If the content is placed outside the container then how will the URL below work?

John
  ----- Original Message ----- 
  From: Barry Books 
  To: Tapestry users 
  Sent: Wednesday, June 12, 2013 2:05 PM
  Subject: Re: best way of incorporating static pages?


  I would use  new URL("http://localhost/static"; + path).openStream() to
  fetch the data instead of File(). Leave the security up to Tomcat.


  On Wed, Jun 12, 2013 at 7:01 AM, Thiago H de Paula Figueiredo <
  thiag...@gmail.com> wrote:

  > On Wed, 12 Jun 2013 07:08:10 -0300, John <j...@quivinco.com> wrote:
  >
  >  Hi,
  >>
  >
  > Hi!
  >
  >
  >  I have a need to link to some static HTML generated by a CMS app.
  >> Assuming this content is in a directory outside my Tapestry app, what would
  >> be the best way of linking/serving it via Tapestry?
  >>
  >
  > I'd create a page that receives the file name or path in the activation
  > context and returns a StreamResponse wrapping the file (which is probably
  > in a fixed folder or its subfolders). Pay attention to security, refusing
  > file names or paths with '..' (without the quotes) on it so no file outside
  > the HTML folder is ever returned.
  >
  > --
  > Thiago H. de Paula Figueiredo
  >
  >
  > ------------------------------**------------------------------**---------
  > To unsubscribe, e-mail: 
users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
  > For additional commands, e-mail: users-h...@tapestry.apache.org
  >
  >

Reply via email to