Then there is another typo, I guess. These two lines will make tapestry throw an no entry point excpetion:
<set-object property="httpRequest" value="service:tapestry.globals.HttpServletRequest"> <set-object property="servletContext" value="service:tapestry.ServletContext"> The correct value (at least they worked for me) are: <set-object property="httpRequest" value="infrastructure:request"> <set-object property="servletContext" value="infrastructure:context"> BTW : where a reference for this values can be found ? Shing Hing Man ha scritto: > Yes it is a typo. I meant HiveMind.xml (instead of .application). > > Shing > > > --- On Thu, 28/5/09, Andreas Andreou <andy...@di.uoa.gr> wrote: > > >> From: Andreas Andreou <andy...@di.uoa.gr> >> Subject: Re: [Tapestry 4.1] how to get ServletContext inside a service >> To: "Tapestry users" <users@tapestry.apache.org> >> Date: Thursday, 28 May, 2009, 7:14 PM >> Perhaps it's a typo in that page, >> because if you try to add the suggested lines >> in the service definition inside hivemind.xml, you should >> see it working. >> >> On Thu, May 28, 2009 at 10:47 AM, Ivano Luberti <lube...@archicoop.it> >> wrote: >> >>> Well, I have configured my service inside >>> >> hivemind.xml >> >>> I don't have an application file: the suggestion here >>> >> says I have to use >> >>> the application file. >>> Is there an hivemind service I can use ? >>> >>> Shing Hing Man ha scritto: >>> >>>> You might like to try the suggestion on the >>>> >> following page. >> >>>> http://lombok.demon.co.uk/tapestry4Demo/Inject.html >>>> >>>> Shing >>>> >>>> Home page : http://www.lombok.demon.co.uk/ >>>> >>>> >>>> >>>> --- On Thu, 28/5/09, Ivano Luberti <lube...@archicoop.it> >>>> >> wrote: >> >>>> >>>>> From: Ivano Luberti <lube...@archicoop.it> >>>>> Subject: Re: [Tapestry 4.1] how to get >>>>> >> ServletContext inside a service >> >>>>> To: "Tapestry users" <users@tapestry.apache.org> >>>>> Date: Thursday, 28 May, 2009, 2:54 PM >>>>> Thanks Norman, but I guess you use >>>>> that inside a class that extends >>>>> BasePage as I do. >>>>> But here I have a concrete class that >>>>> >> implements >> >>>>> IEngineService. >>>>> I use it to return a PDF on the response >>>>> >> output stream. >> >>>>> So either I cannot use an abstract class that >>>>> >> extends >> >>>>> BasePage and >>>>> therefore I cannot use the inject/abstract >>>>> >> method approach >> >>>>> or I'm >>>>> missing something in your answer. >>>>> >>>>> >>>>> Norman Franke ha scritto: >>>>> >>>>> >>>>>> Here is how I do it: >>>>>> >>>>>> >>>>>> >>>>>> >> @InjectObject("service:tapestry.globals.HttpServletRequest") >> >>>>>> public abstract HttpServletRequest >>>>>> >> getRequest(); >> >>>>>> public ServletContext getServletContext() >>>>>> >> { >> >>>>>> return >>>>>> >>>>>> >> getRequest().getSession().getServletContext(); >> >>>>>> } >>>>>> >>>>>> Norman Franke >>>>>> Answering Service for Directors, Inc. >>>>>> www.myasd.com >>>>>> >>>>>> On May 27, 2009, at 11:49 AM, Ivano >>>>>> >> Luberti wrote: >> >>>>>> >>>>>>> I have implemented a class that >>>>>>> >> Implements >> >>>>> IEngineService interface. >>>>> >>>>> >>>>>>> I need to get the ServletContext to >>>>>>> >> finally get >> >>>>> the realPath. >>>>> >>>>> >>>>>>> Anyone can tell me how to do that? >>>>>>> >>>>>>> I have searched for a while without >>>>>>> >> success >> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >> ================================================== >> >>>>>>> dott. Ivano Mario Luberti >>>>>>> Archimede Informatica societa' >>>>>>> >> cooperativa a r. >> >>>>> l. >>>>> >>>>> >>>>>>> Sede Operativa >>>>>>> Via Gereschi 36 - 56126- Pisa >>>>>>> tel.: +39-050- 580959 >>>>>>> tel/fax: +39-050-9711344 >>>>>>> web: www.archicoop.it >>>>>>> >>>>>>> >>>>>>> >> ================================================== >> >>>>>>> >> --------------------------------------------------------------------- >> >>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >> --------------------------------------------------------------------- >> >>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>> >>>>>> >>>>>> >>>>>> >>>>> -- >>>>> >>>>> >> ================================================== >> >>>>> dott. Ivano Mario Luberti >>>>> Archimede Informatica societa' cooperativa a >>>>> >> r. l. >> >>>>> Sede Operativa >>>>> Via Gereschi 36 - 56126- Pisa >>>>> tel.: +39-050- 580959 >>>>> tel/fax: +39-050-9711344 >>>>> web: www.archicoop.it >>>>> >>>>> >> ================================================== >> >>>>> >>>>> >> --------------------------------------------------------------------- >> >>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >> --------------------------------------------------------------------- >> >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>>> >>>> >>> -- >>> ================================================== >>> dott. Ivano Mario Luberti >>> Archimede Informatica societa' cooperativa a r. l. >>> Sede Operativa >>> Via Gereschi 36 - 56126- Pisa >>> tel.: +39-050- 580959 >>> tel/fax: +39-050-9711344 >>> web: www.archicoop.it >>> ================================================== >>> >>> >>> >>> >> --------------------------------------------------------------------- >> >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >>> >> >> -- >> Andreas Andreou - andy...@apache.org >> - http://blog.andyhot.gr >> Tapestry / Tacos developer >> Open Source / JEE Consulting >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- ================================================== dott. Ivano Mario Luberti Archimede Informatica societa' cooperativa a r. l. Sede Operativa Via Gereschi 36 - 56126- Pisa tel.: +39-050- 580959 tel/fax: +39-050-9711344 web: www.archicoop.it ================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org