Here's what I'm using to get at some text files specified on the
classpath.
MessageContext ctx = MessageContext.getCurrentMessageContext();
AxisService svc = ctx.getAxisService();
ClassLoader loader = svc.getClassLoader();
String filename = (String)svc.getParameterValue("myvariable");
InputStream is = loader.getResourceAsStream(filename);
"myvariable" is a value that I set in the services.xml file in a
service/parameter element.
-----Original Message-----
From: VTARIN [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2008 5:27 AM
To: [email protected]
Subject: Re: Path to a resource inside an aar
Already tried it, doesnt work :-(
A solution ive found is to get the resource as stream and save it to a
temp file (yes, thats a bit dirty :-)). Then i use the path to that temp
file located outside the aar.
Thanks for your reply.
VTARIN wrote:
>
> Hello,
>
> I have a service packaged and deployed as an aar archive. Inside it ,
> i have a freemarker template which is used by the service.
>
> When i try to load the template (only can do it by passing a path as
> parameter), the file is never found, whatever path i use. Is there any
> way to access this template using a path ?
>
--
View this message in context:
http://www.nabble.com/Path-to-a-resource-inside-an-aar-tp19506606p195083
56.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Confidentiality Notice: This email, including attachments, may include
non-public, proprietary, confidential or legally privileged information. If
you are not an intended recipient or an authorized agent of an intended
recipient, you are hereby notified that any dissemination, distribution or
copying of the information contained in or transmitted with this e-mail is
unauthorized and strictly prohibited. If you have received this email in
error, please notify the sender by replying to this message and permanently
delete this e-mail, its attachments, and any copies of it immediately. You
should not retain, copy or use this e-mail or any attachment for any purpose,
nor disclose all or any part of the contents to any other person. Thank you
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]