Every time you put new classes or jar files to Axis WEB-INF class or lib directory you have to let know to Axis about them to make it pick up a new code
There several ways to tell Axis that it got new classes and/or jar files in its dirrectories:
Assume your Axis webapplication is running under Tomacat, which home directory is $CATALINA_HOME. It is not a secret that calling the sequence
$CATALINA_HOME/bin/shutdown.sh $CATALINA_HOME/bin/startup.shwill restart Tomcat and therefore will force Axis to be reloaded. In practice it is the most used but not the best way to tell to Axis to get reloaded. Why? One of the reasons is that you may have more than one webapplication running on your webserver. It always takes some time to reboot Tomcat, so if someone was in the middle of calling one of your services, he or she can get quite disappointed by getting the 401 error with no reason ... top
You can make any of your webapplication automatically reloadable by putting the special directive to web server configuration file. In case of Tomcat you can add the line that may look like
<Context path="/axis" docBase="axis" reloadable="true"/>to file $CATALINA_HOME/conf/server.xml
<?xml version="1.0" encoding="utf-8" ?> <tomcat-users> . . . <role rolename="manager" /> . . . <user username="yourusername" password="yourpassword" roles="manager,..." /> . . . </tomcat-users>
Now you can type in your browser a command
http://{host}:{port}/manager/reload?path=/axisand after entering in a promt window the manager's username and password in case of success you will get a message
OK - Reloaded application at context path /axisYou also get use a nice graphical interface of manager application to do the same.
ant -f axis.xml reload
ant -Dpassword="yourpassword" -f axis.xml reloadtop
<project name="YourProjectName" default="reload" basedir="."> <!-- Configure the context path for this application --> <property name="path" value="/axis"/> <!-- Configure properties to access the Manager application --> <property name="url" value="http://{host}:{port}/manager"/> <property name="username" value="yourusername"/> <property name="password" value="yourpassword"/> <!-- Configure the custom Ant tasks for the Manager application --> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/> <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/> <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"/> <taskdef name="start" classname="org.apache.catalina.ant.StartTask"/> <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"/> <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/> <!-- Executable Targets --> <target name="reload" description="Reload web application"> <reload url="${url}" username="${username}" password="${password}" path="${path}"/> </target> <target name="remove" description="Remove web application"> <remove url="${url}" username="${username}" password="${password}" path="${path}"/> </target> </project> |
> For more information about managing Tomcat please refer to Apache tomcat Documentation at http://jakarta.apache.org/tomcat/
top