Hi Ranga,
If you unzip the binary distributions of Axis and Jetty, put the jar
files on your classpath and write a class like this:
public class Test {
public static void main(String[] args) throws Exception {
Server server = new Server();
SocketListener listener = new SocketListener();
listener.setPort(8080);
server.addListener(listener);
server.addWebApplication("/axis",System.getProperty("axis.webapp.dir"));
}
}
You can then use an ant build.xml file like this:
<project default="run">
<target name="settings">
<property name="dest.dir" location="bin" />
<property name="src.dir" location="src" />
<property name="jetty.dir" location="jetty-5.1.11RC0" />
<property name="jetty.lib.dir" location="${jetty.dir}/lib" />
<property name="jetty.ext.dir" location="${jetty.dir}/ext" />
<path id="jetty.classpath.id">
<fileset dir="${jetty.lib.dir}" includes="*.jar" />
<fileset dir="${jetty.ext.dir}" includes="*.jar" />
</path>
<property name="axis.dir" location="axis-1_3" />
<property name="axis.lib.dir" location="${axis.dir}/lib" />
<path id="axis.classpath.id">
<fileset dir="${axis.lib.dir}" includes="*.jar" />
</path>
</target>
<target name="build" depends="settings">
<javac destdir="${dest.dir}" source="1.5" debug="true">
<classpath>
<path refid="jetty.classpath.id" />
<path refid="axis.classpath.id" />
</classpath>
<src path="${src.dir}" />
</javac>
</target>
<target name="run" depends="settings">
<java classname="Test" fork="true">
<sysproperty key="axis.webapp.dir" path="${axis.dir}/webapps/axis"
/>
<classpath>
<path refid="jetty.classpath.id" />
<path refid="axis.classpath.id" />
<path location="${dest.dir}" />
</classpath>
</java>
</target>
</project>
(You may need to add deploy/undeploy target as usual).
If you're using jetty-5.1.11RC0, you'll also need to have tools.jar from
the JDK on your classpath. You can avoid to use tools.jar if you copy
the jasper-*.jar file from one of the latest Tomcat binary archives
where the jasper-*.jar in the jetty tree are (Javac can be replaced with
the Eclipse JDT compiler).
You can obviously refine this and adapt it to your needs, but this
should get you started.
Cheers,
Bruno.
M. Ranganathan wrote:
Hello!
I am trying to embed Axis in a jetty powered application ( with Jetty
imbedded in a j2se application). Has anybody tried this successfully ? I
have read the "Advanced Installation " section of
http://ws.apache.org/axis/java/install.html Is there anything more to
be aware of?
Thank you
Ranga
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]