axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Souther <bsout...@fwdco.com>
Subject Re: Initialization Parameters
Date Mon, 18 Nov 2002 08:43:45 GMT
My code is a little different. All I'm doing is getting init params from the 
web.xml.
Here is my code:
getContext().getInitParameter("init-param")

I don't know if that's all you were trying to do before.






On Friday 15 November 2002 05:00 pm, Ben Souther wrote:
> It is running in one of my apps.
> I'm using Axis 1.0 with Tomcat 4.1.12
>
> On Friday 15 November 2002 04:43 pm, Vidyanand Murunikkara wrote:
> > Hi Ben
> >
> > When you said "it works well" did u mean u tried it out and it worked
> > fine ? I was under the impression this feature doesn't exist. I checked
> > the code and it doesn't seem to be in there. And Steve Loughran from the
> > Axis commiter list also said that this feature is not supported.
> > http://marc.theaimsgroup.com/?l=axis-user&m=103679570405098&w=2.
> >
> > Vidyanand.
> >
> >
> >
> > -----Original Message-----
> > From: Ben Souther [mailto:bsouther@fwdco.com]
> > Sent: Friday, November 15, 2002 6:16 AM
> > To: axis-user@xml.apache.org
> > Subject: Re: Initialization Parameters
> >
> >
> > While digging through the archives, I found this and it works well.
> > Thanks Eric Jung.
> >
> >
> >
> >
> > List:     axis-user
> > Subject:  RE: Beginner's question
> > From:     "Jung, Eric (Contractor)" <ejung@russellmellon.com>
> > Date:     2002-08-16 16:04:47
> > [Download message RAW]
> >
> > How about this?
> > Your service implements ServiceLifecycle. Axis should call your init()
> > method, passing you a reference to the ServletContext. From that you can
> > get
> > servlet initialization parameters (like filenames) that you specified in
> > web.xml. I'm new, too, so don't take my input as a good way to do
> > things!
> >
> > public class MyService implements ServiceLifecycle {
> >   public void init(java.lang.Object context)
> >     throws ServiceException {
> >
> >    ServletEndpointContext ctx = (ServletEndpointContext)context;
> >    ServletContext servletContext = ctx.getServletContext();
> >    //get filename specified in web.xml and open it
> >    String filename = servletContext.getInitParameter("filename");
> >    InputStream is = servletContext.getResourceAsStream(filename);
> >   }
> > }
> >
> > Eric H. Jung
> >
> > On Wednesday 13 November 2002 08:18 am, Ben Souther wrote:
> > > Does Axis have a mechanism for passing initialization parameters to a
> > > webservice class?


Mime
View raw message