Go to
/<orion-install-dir>/application-deployments/app-name/web-app-name/orion-web
.xml
This file looks something like so:
<?xml version="1.0"?>
<!DOCTYPE orion-web-app PUBLIC "-//Evermind//DTD Orion Web Application
2.3//EN" "http://www.orionserver.com/dtds/orion-web.dtd">
<orion-web-app
deployment-version="1.3.7"
development="true"
jsp-cache-directory="./persistence"
temporary-directory="./temp"
servlet-webdir="/servlet/"
>
<session-tracking autoencode-absolute-urls="true" />
</orion-web-app>
See the development="true" up there..thats a good thing. The next thing you
need to do is add a source-directory="/path/" below the development
(Actually..anywhere..but inside the <orion-web-app></orion-web-app> tag. Set
the path to your hd:/path/dir. For example, I have my source code in
c:\applications\app-name\source\code\com\company-name\ui\ etc. I would set
the tag like so:
<orion-web-app deployment-version="1.3.7" development="true"
source-directory="c:\applications\app-name\source\code\"
jsp-cache-directory="./persistence" temporary-directory="./temp"
servlet-webdir="/servlet/">
That will not only reload your servlet, but ANY source you have. It
basically is a 1 to 1 with your .java files in the source directory to your
.class compiled files in the WEB-INF/classes dir. Infact, although I haven't
been able to fully test this, Orion should pick up any changes you make to
the .java file, and compile it and deploy it for you..but I am not sure
about the compiling part. I generally edit a source, save it, compile it,
and Orion picks it up..redploys the app for me.
There is, however a VERY important point to keep in mind. Make sure ANY (and
I do mean ANY) objects that are going to be stored in the HttpSession
implement the Serializable interface properly. When Orion redeploys a
web-app for you, it saves the http session objects (persists them), reloads
all the classes, then loads the objects back into the HttpSession for you.
This way, your app keeps its state across redployments. This is also how it
works for restarts of the server. You can restart the server (while in
production) and all data in the HttpSession should be serialized out to
disk, then reloaded as soon as the server is started, so that if someone was
logged in to your site, for example, they would still be logged in. However,
you shouldn't ever need to restart the server if your code is done right
(serialization, etc).
> To whom this may concern:
>
> What do I need to set in Orion to allow it to realize when a
> servlet has
> been modified that it should use that new version of the servlet.
>
> Thanks,
> Andy
>