Fernando,

Thank you very much, that's exactly what I was looking for!

Andy

On Wed, 2007-11-21 at 06:52 -0800, Fernando Padilla wrote:
> You don't like the pages just calling request.getServerName() themselves?
> 
> ps - request could be a tapestry Request object, or it might have to be 
> a requestGlobals.getHttpServletRequest() object, depending on what's 
> available in the api...
> 
> 
> Andy Huhn wrote:
> > All,
> > 
> > I'm writing an app that will make use of virtual hosts (so that
> > domain1.com, domain2.org, etc. will all point to the same application).
> > The sticky piece is that each page will need to know the hostname by
> > which it was referenced--the data displayed on the page will be
> > different for each virtual host.
> > 
> > As mentioned here
> > (http://tapestry.apache.org/tapestry5/tapestry-core/guide/request.html),
> > I'm thinking about using a HTTPServletRequestFilter
> > (http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/HttpServletRequestFilter.html)
> >  to manage this.  The HTTPServletRequestFilter would intercept each 
> > request, would modify the URL to add the server name as an extra context 
> > parameter, and then would pass the request along to the RequestHandler 
> > pipeline.
> > 
> > A couple of questions:
> > 1) Is there an easier way to do this?
> > 2) Is there an API already built into Tapestry that will let me add a
> > context parameter to a URL without having to write the regular
> > expressions to parse it, etc.?
> > 3) Is there any way I can put that logic into each page instead?  Does
> > each page have access to the server name that was used in the URL?
> > 
> > Thanks,
> > Andy
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to