2012/1/28 Julien Martin <bal...@gmail.com>
> Hello Thiago, > > It is on a page template. The advice you provide does work. However, I am > realizing I need to concatenate the protocol+host+etc. which is a bit > cumbersome. > > The problem I have is that I don't understand how the path is worked out. > My javascript is located at the following path: > "/context-path/account/childminderRegistration" and I need to resolve the > following path: "/context-path/utils/JSonPostcodesWithQueryParam" for the > url javascript variable. > > Is there a simpler way for my script to hit the proper path? > > Regards, > J. > > 2012/1/28 Thiago H. de Paula Figueiredo <thiag...@gmail.com> > >> On Sat, 28 Jan 2012 17:43:17 -0200, Julien Martin <bal...@gmail.com> >> wrote: >> >> Hello, >>> >> >> Hi! >> >> >> How can I achieve this with T5? >>> >> >> As a general answer, you can @Inject HttpServletRequest and use its >> getContextPath() method. Depending on who handles this URL (a Tapestry >> page? a Tapestry page event handler method), the response would be >> different. >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor >> Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> > >