If thats what you're after (reading a configuration file from WEB-INF, say),
here's some code to run in SoapBindingImpl (for instance):

private static String s_strWebInf;
public static String getWebInf()
{
 if (s_strWebInf == null)
 {
  // Get WEB-INF location
  try
  {
   MessageContext msgContext = MessageContext.getCurrentContext();
   if (msgContext == null)
   {
    s_strWebInf = "C:/Java/Tomcat4.1/webapps/axis/WEB-INF";
    System.out.println("Hard-coded s_strWebInf!");
   }
   else
    s_strWebInf =
msgContext.getProperty(org.apache.axis.transport.http.HTTPConstants.MC_HTTP_
SERVLETLOCATION).toString();
   if (s_strWebInf != null)
   {
    File fileConfig = new File(s_strWebInf + "/Config.txt");
    if (fileConfig.exists())
    {
     s_propsConfig = new Properties();
     s_propsConfig.load(new BufferedInputStream(new
FileInputStream(fileConfig)));
    }
    else
     s_logger.error("Cannot see Config.txt...ought to be in WEB-INF.");
   }
   else
    s_logger.error("Cannot get servlet location.");
  }
  catch (Throwable except)
  {
   if (except == null)
    s_logger.fatal("Unknown exception in getWebInf().");
   else
    logFatalException(s_logger, except, "getWebInf()");
  }
 }
 return s_strWebInf;
}


Jeff



----- Original Message ----- 
From: "Keith Tingle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 29, 2004 1:37 PM
Subject: RE: Databases in Axis


> If you question is how to get to the servlet context from an axis handler
> its covered in the wiki.
>
> http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages
>
>
> -----Original Message-----
> From: Hubble, Christopher [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 29, 2004 1:32 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Databases in Axis
>
>
> -chuckle-  What I'm trying to do is convert the jdbc servlet connection I
> have over to work with the axis web service that's replacing the old
> serlvet.
>
> Chris
>
> -----Original Message-----
> From: Jeff [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 29, 2004 1:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Databases in Axis
>
>
> Just use JDBC but I suspect your question will be re-phrased!
>
>
> Jeff
>
>
> ----- Original Message ----- 
> From: "Hubble, Christopher" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 29, 2004 1:27 PM
> Subject: Databases in Axis
>
>
> > How do you configure a database in axis?
> >
> > Chris
> Payformance Corporation confidentiality statement
>
***************************************************************************
> Notice: This e-mail message, including any attachments, is for the sole
> use of the intended recipient(s) and may contain confidential and
> privileged information.  Any unauthorized review, copy, use, disclosure,
> or distribution is prohibited.  If you are not the intended recipient,
> or not an agent of the intended recipient responsible for delivering this
> message, please contact the sender by reply e-mail and destroy all copies
> of the original message.

Reply via email to