-Cam
Shapira, Yoav wrote:
Hi,
The code in 'MyContext' is a library of code that I am hoping to beable
to reuse in serval sites on the same server. The thing is it needs a config file and I would like the config file to always be in the root of the site. The thing is if I do a get getRealPath("/") from the code in MyContext it will always return SomePath3. How do I get the docbase of the "" context, (SomePath2)? or even of the virtual host, (SomePath1), from with in MyContext.
I guess I am asking if it is possible to getRealPath cross context?
Yes, it's possible: add crossContext="true" to your context definitions, and use ServletContext#getContext to get the other context, then call getRealPath on the other context.
That said, your approach is bad because webapps are supposed to be independent and self-contained.
Yoav Shapira
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
** Classified by CRM114 SS as good ** CLASSIFY fails; success probability: 0.0000 pR: -88.3358
Best match to file #1 (nonspam.css) prob: 1.0000 pR: 88.3358 Total features in input file: 6672
#0 (spam.css): features: 222912, hits: 175902, prob: 4.62e-89, pR: -88.34 #1 (nonspam.css): features: 147312, hits: 169473, prob: 1.00e+00, pR: 88.34
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
