setDefaultsDescriptor from jetty-web.xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

setDefaultsDescriptor from jetty-web.xml

james lee-13
Hello,

I want to use an alternative webdefault.xml on a per context basis.
I have a WEB-INF/jetty-web.xml file which I know is being read
because I use it to set the RequestLog and an ExpiryHandler.
The commands I am using are:

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

<Configure class="org.mortbay.jetty.servlet.WebApplicationContext">
    <Set name="defaultsDescriptor">/path/to/my/webdefault.xml</Set>
</Configure>


but the commands are not being used. It's as if web.xml is read first.
A workaround is to put the commands directly in WEB-INF/web.xml but
that is less convenient because I can't share the commands over several
contexts.



James.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: setDefaultsDescriptor from jetty-web.xml

Greg Wilkins-5

James,

The jetty-web.xml is read after the defaults descriptor has already been
applied.

You can provide a different webdefaults.xml resource or file when you
call addWebApplication or addWebApplications.

cheers


James Lee wrote:

> Hello,
>
> I want to use an alternative webdefault.xml on a per context basis.
> I have a WEB-INF/jetty-web.xml file which I know is being read
> because I use it to set the RequestLog and an ExpiryHandler.
> The commands I am using are:
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
> "http://jetty.mortbay.org/configure.dtd">
>
> <Configure class="org.mortbay.jetty.servlet.WebApplicationContext">
>     <Set name="defaultsDescriptor">/path/to/my/webdefault.xml</Set>
> </Configure>
>
>
> but the commands are not being used. It's as if web.xml is read first.
> A workaround is to put the commands directly in WEB-INF/web.xml but
> that is less convenient because I can't share the commands over several
> contexts.
>
>
>
> James.
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: setDefaultsDescriptor from jetty-web.xml

james lee-13
On 31/08/05, 18:47:05, Greg Wilkins <[hidden email]> wrote regarding
[jetty-discuss] Re: setDefaultsDescriptor from jetty-web.xml:

Hi Greg,

> The jetty-web.xml is read after the defaults descriptor has already been
> applied.

> You can provide a different webdefaults.xml resource or file when you
> call addWebApplication or addWebApplications.

Thanks for the conformation.

It's being called from JOnAS, so I am not so easily able to do that.
Perhaps there is a way from JOnAS but for now I can add the information
to web.xml and it will be fine.


James.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss