Actually, I already did this before but lost the solution. I remember that I also used JNDI (or should I say, abuse JNDI) to get the actual context path.
Making a standard taglib and factory method for this seems to be not to much of an effort. Thanks again for this quick response. -----Oorspronkelijk bericht----- Van: Asim Alp [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 27 februari 2004 19:04 Aan: Tomcat Users List Onderwerp: Re: Context to path What I usually do is this: pageContext.getServletContext().getContext("/myContext").getRealPath("/ myfile.jsp"))); Asim Alp Educational Networks 55 Broad Street, 10th Floor New York, NY 10004 www.educationalnetworks.net Tel: +1 (212) 269-0200 Fax: +1 (212) 269-1446 On Feb 27, 2004, at 1:00 PM, Sjoerd van Leent wrote: > Every web-app is in a context. Every context is in a path on the > system. The > question is, how can I translate a context to a system path. > > > > For example a context is in the following path: > > > > E:\xxx\yyy\myContext > > > > The web-app is in: > > > > http://localhost:8080/myContext > > > > How can I translate that using a PageContext or something similar into > the > path mentioned above. Any suggestions? > > > > Thanks in advance, > > Sjoerd van Leent > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
