Hi Alex.

Typically you don't set the context path. And if you do, then it's often in
the app server(container) config.

The value of context path is normally the same as the warfile name, and
then you use the (httpservlet)request-interface to access it.

I can see that 5.4 have deprected Request#getContextPath and added a
symbolconstant for it. Not sure why, but probably for some good reason. -
perhaps abstraction as Request interface if different from
httpservletrequest

I've only used ROOT tap apps myself, but you can still inject use
httpservletrequest or tapestry request to access context path.

If you need to set it then you can:
1. change war file name
2. configure appsever/container config appropriately for your app
3. configure tapestry SymbolConstants#CONTEXT_PATH

-magnus

On Sat, Nov 23, 2013 at 5:43 PM, Alexander Sommer <
alexander.som...@gmail.com> wrote:

> Hi!
>
> I would like to set the context path but as it seems the setting is just
> part of tapestry 5.4 but i am using 5.3.7.
>
> I just want to know what i need to set because my web app now runs under
> root/production (before it was running under root)
>
> thx!!!
>
> tapestry.context-path
> *Added in 5.4*
>
> Identifies the context path of the application, as determined from
> ServletContext.getContextPath() method. This is either a blank string or a
> string that starts with a slash but does not end with one.
>
>
> 2013/11/23 Alexander Sommer <alexander.som...@gmail.com>
>
> > no, my app is wired since changing to root/production. i think i need to
> > set the context path somewhere.
> >
> >
> > 2013/11/23 Alexander Sommer <alexander.som...@gmail.com>
> >
> >> thx for the answers. how can i set the context path in tapestry? by the
> >> way it seems that my app is normally running ( i did not set anything
> >> despite the new contxt root/production)
> >>
> >>
> >> 2013/11/15 Thiago H de Paula Figueiredo <thiag...@gmail.com>
> >>
> >>> On Fri, 15 Nov 2013 17:39:32 -0200, Alexander Sommer <
> >>> alexander.som...@gmail.com> wrote:
> >>>
> >>>   Hi!
> >>>>
> >>>
> >>> Hi!
> >>>
> >>>   I was moving my tapestry application on another server from domain to
> >>>> domain/production, and now, my custom made sitemap viewer does not
> >>>> generate appropriate urls anymore. (the normal tapestry page links are
> >>>> working well - so the application in general is working well)
> >>>>
> >>>>  but not my custom sitemapViewer page. The links which are generated
> >>>> with writer.element("a", "href", "/" + item.getPage()); only generate
> >>>> domain/url but not domain/production/url
> >>>>
> >>>
> >>> If the URLs you're generating are Tapestry pages, use
> >>> PageRenderLinkSource and Link.toAbsoluteURL() and they'll take care of
> it
> >>> for you. See also the BaseURLSource service for an alternative.
> >>>
> >>> --
> >>> Thiago H. de Paula Figueiredo
> >>> Tapestry, Java and Hibernate consultant and developer
> >>> http://machina.com.br
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >>> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>>
> >>>
> >>
> >
>

Reply via email to