Thanks, Jules.  That worked great.  However, I had to put the
ExpiryHandler at index 0, before the WebApplicationHandler, to get the
"Expires" header in the response.  I don't know if that's a bug or not
-- wasn't sure if the logic for handlers is "all" or "any".

For anyone else interested, here's my WEB-INF/web-jetty.xml:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure
1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd";>

<Configure class="org.jboss.jetty.JBossWebApplicationContext">
  <Call name="addHandler">
    <Arg type="int">0</Arg>
    <Arg>
      <New class="org.mortbay.http.handler.ExpiryHandler">
        <Set name="TimeToLive">600</Set>
      </New>
    </Arg>
  </Call>
</Configure>


Jim


Jules Gosnell <[EMAIL PROTECTED]> writes:

> The ConfigurationElement of jboss-service.xml is applied to the
> JettyServer object.
>
> If you want to configure a Context object, you write similar code and
> put it in a WEB-INF/jetty-web.xl (or web-jetty.xml).
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure
> 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd";>
>
> <Configure class="org.jboss.jetty.JBossWebApplicationContext">
>
>   <Set name="SomeContextMethod">SomeValue</Set>
>
> </Configure>
>
>
> Jules
>
>
>
> Jim Crossley wrote:
>> I need to add some cache-control headers to some content served by the
>> Jetty web server bundled with JBoss 3.0.4.  I understand the
>> ExpiryHandler is supposed to handle this, but I can't figure out how
>> to configure it in jbossweb.sar/META-INF/jboss-service.xml.  It seems
>> handlers must be attached to contexts, but the contexts are created
>> dynamically (I think).
>> Can anyone point me to an example, please?
>> Thanks,
>> Jim
>> -------------------------------------------------------
>> This SF.net email is sponsored by:
>> The Definitive IT and Networking Event. Be There!
>> NetWorld+Interop Las Vegas 2003 -- Register today!
>> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
>> _______________________________________________
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:
> The Definitive IT and Networking Event. Be There!
> NetWorld+Interop Las Vegas 2003 -- Register today!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user

-- 
Jim Crossley
http://crossleys.org/~jim
404.409.9085


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to