I found that the "reloadable" feature was not working for contexts that were accessed 
via mod_webb.

I corrected it by adding a DefaultContext tag to server.xml thus;

    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
               port="8008"
               minProcessors="5"
               maxProcessors="25"
               enableLookups="false"
               appBase="my_app_dir"
               acceptCount="20"
               debug="0"/>     

    <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
            name="Apache"
            debug="0">   

      <!-- Global context unless overridden at lower levels -->
      <DefaultContext reloadable="false"/>

      <blah>
        .
        .
        .
      </blah>

    </engine>

Hope that helps a little ... maybe.

_________________________________________________________________

Mark Annal                       e-mail: [EMAIL PROTECTED]
TARGUSinfo                       phone : (585) 598-7011
255 Woodcliff Drive              fax   : (585) 598-7001
Fairport, NY 14450               web   : www.targusinfo.com
_________________________________________________________________


-----Original Message-----
From: Mike Millson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 2:06 PM
To: Tomcat Users List
Subject: RE: Answer: Reloading classes WITHOUT using shutdown.sh &
startup.sh (newbies should read)


I don't use javabeans; I know it works for servlets. Anything in
WEB-INF/classes and WEB-INF/lib should be automatically be reloaded when a
change is detected, so it should work (according to the documentation).

Here's my httpd.conf:

WebAppConnection        conn            warp    localhost:8008

<VirtualHost 192.168.1.1>
ServerAdmin [EMAIL PROTECTED]
        ServerName alberta.tomcat
        DocumentRoot /usr/local/jakarta-tomcat-4.0.1/webapps/
        WebAppDeploy            examples        conn    /examples
</VirtualHost>

Here's my server.xml:

<Engine className="org.apache.catalina.connector.warp.WarpEngine"
     name="alberta" debug="0" defaultHost="alberta.tomcat">

        <Host name="alberta.tomcat" debug="0" appBase="webapps" unpackWARs="true">

                <Context path="/examples" docBase="examples" debug="0" 
reloadable="true"
/>

        </Host>

</Engine>

Note: I put an entry in the hosts file of the computer accessing the server
that relates the domain alberta.tomcat to 192.168.1.1, so any time I enter
http://alberta.tomcat it gets sent to 192.168.1.1, where the server is
listening on another machine.

Mike

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 1:40 PM
To: Tomcat Users List
Subject: RE: Answer: Reloading classes WITHOUT using shutdown.sh &
startup.sh (newbies should read)



This reloadable parameter has been the real crux of all the discussion. It
seems like there's at least five postings a week asking "I set reloadable
="true" but it still doesn't reload my classes." I'm not sure I've ever
heard a reliable answer concerning this... most people seem to think it
just plain doesn't work. (Possibly it only works for classes that extend
HttpServlet, as JRun used to do). That in turn seems to cascade into a lot
of confusion about whether the manager/reload?path=<web app> functionality
you discovered works either (it does of course).  I think it's all
definitely something for the FAQ... if there is a FAQ...




                      Adam Pfeiffer
                      <adamcpfeiffer@y         To:      Tomcat Users List
<[EMAIL PROTECTED]>, [EMAIL PROTECTED]
                      ahoo.com>                cc:
                                               Subject: RE: Answer:
Reloading classes WITHOUT using shutdown.sh & startup.sh (newbies
                      06/05/2002 11:01         should read)
                      AM
                      Please respond
                      to "Tomcat Users
                      List"






Mike,
>From my experience, javabean will not be reloaded even with reloadable
="true".  I have
reloadable="true" on my web app, and it would not reread the classes until
I used shutdown.sh and
startup.sh.  Maybe I didn't have something set up right.  Here is a snipet
from my server.xml:

        <Context path="/trips" docBase="trips" debug="0"
                 reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                     prefix="localhost_trips." suffix=".txt"
                  timestamp="true"/>
        </Context>

Let me know if you see anything wrong.  Thanks.

--- Mike Millson <[EMAIL PROTECTED]> wrote:
> You could also set reloadable="true" in the Context element, but that
> requires significant overhead and is not recommended for production
> environments.
>
> Mike
>
> -----Original Message-----
> From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 11:37 AM
> To: [EMAIL PROTECTED]
> Subject: Answer: Reloading classes WITHOUT using shutdown.sh &
> startup.sh (newbies should read)
>
>
> I have been on this list for about a month and have see this question
many
> time (myself included).
>  I have finally figured out how you can get a class to reload (e.g.
Included
> JavaBean) without
> having to stop/start tomcat using shutdown.sh and startup.sh.  First,
follow
> the directions in
> "Manager App HOW-TO" included with the tomcat documentation.  Once this
is
> done, you can use the
> manager app reload function to reload the web app.  This also refreshes
any
> newly compiled classes
> (e.g. javabeans) that you may have included in the JSPs.  To use the
reload,
> do the following:
>
> http://<IP Address>/manager/reload?path=<web app>
>
> You can also use the manager to deploy new web apps, un-deploy web apps,
> start/stop web apps.
> This may be common sense to those tomcat veterans, but this was very
helpful
> to me once I learned
> how to use it.
>
> Adam
>
> P.S.  If I have made any errors, please correct me.  Thanks.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to