Hi Chris,
Here is some code I use from within my WebSevice to access a property file
within the Web Context.
Hope this helps....
org.apache.axis.MessageContext axisContext =
org.apache.axis.MessageContext.getCurrentContext();
javax.servlet.ServletContext sc =
((javax.servlet.http.HttpServlet)axisContext.getProperty
(org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLET)).getServletContex
t();
String path = sc.getRealPath("/WEB-INF/service.properties");
// now get the properties for the server and EJB location
information
java.util.Properties props = new java.util.Properties();
try {
props.load(new java.io.FileInputStream(path));
}
catch(java.io.FileNotFoundException fnfe) {
sc.log("service.properties file not found. Will use
defaults." + fnfe.getMessage());
System.out.println("service.properties file not found.
Will use defaults");
}
catch(java.io.IOException ioe) {
sc.log("service.properties file not loaded. Will use
defaults." + ioe.getMessage());
System.out.println("service.properties file not loaded.
Will use defaults");
}
String server = props.getProperty("EJBServer", "127.0.0.1");
String port= props.getProperty("EJBServerPort", "7001");
String ejb= props.getProperty("EJBJNDIName", "SoapBean");
Regards
Steve
Quoting Chris Aiken <[EMAIL PROTECTED]>:
> Hi together!
>
> How I get the current <AxisServlet host>, <AxisServlet port> and <path to
> the AxisServlet> or the <AxisServlet URL> within Axis???
>
> I had no success with <msgContext.getProperty("I_have_tried_all_keys")>.
>
>
> Thanks a lot for help,
> Chris
>
>
>
>
---------------------------------------------------
This message was sent using Spansurf Web Mail
Internet access in Spain - http://www.spansurf.com/