Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
albartell wrote:
> My question is, what changes for getResource() when this gets put in a
> servlet container vs. just being run from eclipse and how could I change it
> to work in both environments.
> URL logoURL =
> Object.class.getResource("/com/mowyourlawn/reports/images/ldt_small.gif");
Try this ...
ClassLoader cl = this.getClass().getClassloader();
URL logoURL =
cl.getResource("/com/mowyourlawn/reports/images/ldt_small.gif");
... this way you're are assured of using the same class loader that
loaded the class that is running.
david
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.