Re: WebApplicationContext welcome files

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

Re: WebApplicationContext welcome files

Tony Thompson
Greg,

An update on this...I am using 5.1.6 but still having issues.  Can you
clarify this for me?  Is there a reason that Jetty has to null out the
welcome files when it runs through its configuration?

Thanks
Tony

>>> [hidden email] 11/15/05 10:55AM >>>
Sorry it has taken me so long to get back to some of these but, I
tested
this with 5.1.5 and it is still not working in my configuration.  But,
based on your message, I am using a web.xml so, I am guessing that is
why it is not working.  Am I being forced to configure my welcome
files
in the web.xml from this point on even though I never had to in the
past?

Thanks
Tony

>In CVS I have moved the setWelcomeFiles( null )  to the
XmlConfiguration
>class.    So it is only null if you are using defaultweb.xml and/or
web.xml

>
>cheers
>
>Tony Thompson wrote:
>> In Jetty 4, I have a couple WebApplicationContexts that I configure
>> completely programmatically.  One of the things I do as part of the
>> configuration is:
>>
>> context.setWelcomeFiles( ... )
>>
>> I am attempting to do this same thing in Jetty 5 but, one of the
first
>> things WebApplicationContext.doStart() does is:
>>
>> setWelcomeFiles( null )
>>
>> which kills the welcome files I already configured.  If I remove
that
>> from WebApplicationContext, the welcome files configure fine.
Should
>> that be there or is there something I should change when using
Jetty
5?
>>
>> Thanks.
>> Tony
>>
>>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click 
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: WebApplicationContext welcome files

Greg Wilkins-5
Tony Thompson wrote:
> Greg,
>
> An update on this...I am using 5.1.6 but still having issues.  Can you
> clarify this for me?  Is there a reason that Jetty has to null out the
> welcome files when it runs through its configuration?

The problem is that you can't just add the welcome files to the
existing array.  If you did, then stop start cycles of the webapp
will cause the list to grow.

The solution is that you should simply implement the WebApplicationContext.Configuration
interface and then use WebApplicationContext.setConfigurationClassNames
to inject your class into the configuration sequence of the webapp.

You can then setup the context before, during or after the standard
configuration process.

cheers




> Thanks
> Tony
>
>
>>>>[hidden email] 11/15/05 10:55AM >>>
>
> Sorry it has taken me so long to get back to some of these but, I
> tested
> this with 5.1.5 and it is still not working in my configuration.  But,
> based on your message, I am using a web.xml so, I am guessing that is
> why it is not working.  Am I being forced to configure my welcome
> files
> in the web.xml from this point on even though I never had to in the
> past?
>
> Thanks
> Tony
>
>
>>In CVS I have moved the setWelcomeFiles( null )  to the
>
> XmlConfiguration
>
>>class.    So it is only null if you are using defaultweb.xml and/or
>
> web.xml
>
>>cheers
>>
>>Tony Thompson wrote:
>>
>>>In Jetty 4, I have a couple WebApplicationContexts that I configure
>>>completely programmatically.  One of the things I do as part of the
>>>configuration is:
>>>
>>>context.setWelcomeFiles( ... )
>>>
>>>I am attempting to do this same thing in Jetty 5 but, one of the
>
> first
>
>>>things WebApplicationContext.doStart() does is:
>>>
>>>setWelcomeFiles( null )
>>>
>>>which kills the welcome files I already configured.  If I remove
>
> that
>
>>>from WebApplicationContext, the welcome files configure fine.
>
> Should
>
>>>that be there or is there something I should change when using
>
> Jetty
> 5?
>
>>>Thanks.
>>>Tony
>>>
>>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click 
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: WebApplicationContext welcome files

Tony Thompson
In reply to this post by Tony Thompson
OK, thanks, that seems to work.  It seems a little weird but I think I
will leave it as is and wait till Jetty 6 to see if there is a better
way :)

Tony

>>> [hidden email] 12/06/05 08:23AM >>>
Tony Thompson wrote:
> Greg,
>
> An update on this...I am using 5.1.6 but still having issues.  Can
you
> clarify this for me?  Is there a reason that Jetty has to null out
the
> welcome files when it runs through its configuration?

The problem is that you can't just add the welcome files to the
existing array.  If you did, then stop start cycles of the webapp
will cause the list to grow.

The solution is that you should simply implement the
WebApplicationContext.Configuration
interface and then use
WebApplicationContext.setConfigurationClassNames
to inject your class into the configuration sequence of the webapp.

You can then setup the context before, during or after the standard
configuration process.

cheers




> Thanks
> Tony
>
>
>>>>[hidden email] 11/15/05 10:55AM >>>
>
> Sorry it has taken me so long to get back to some of these but, I
> tested
> this with 5.1.5 and it is still not working in my configuration.
But,
> based on your message, I am using a web.xml so, I am guessing that
is

> why it is not working.  Am I being forced to configure my welcome
> files
> in the web.xml from this point on even though I never had to in the
> past?
>
> Thanks
> Tony
>
>
>>In CVS I have moved the setWelcomeFiles( null )  to the
>
> XmlConfiguration
>
>>class.    So it is only null if you are using defaultweb.xml and/or
>
> web.xml
>
>>cheers
>>
>>Tony Thompson wrote:
>>
>>>In Jetty 4, I have a couple WebApplicationContexts that I configure
>>>completely programmatically.  One of the things I do as part of the
>>>configuration is:
>>>
>>>context.setWelcomeFiles( ... )
>>>
>>>I am attempting to do this same thing in Jetty 5 but, one of the
>
> first
>
>>>things WebApplicationContext.doStart() does is:
>>>
>>>setWelcomeFiles( null )
>>>
>>>which kills the welcome files I already configured.  If I remove
>
> that
>
>>>from WebApplicationContext, the welcome files configure fine.
>
> Should
>
>>>that be there or is there something I should change when using
>
> Jetty
> 5?
>
>>>Thanks.
>>>Tony
>>>
>>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified
Today

> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click 
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support 
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click 
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support 
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click 
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: WebApplicationContext welcome files

Greg Wilkins-5
Tony Thompson wrote:
> OK, thanks, that seems to work.  It seems a little weird but I think I
> will leave it as is and wait till Jetty 6 to see if there is a better
> way :)

Think of the context object as a transient object - something that
you would not use to store configuration, but only the target of
configuration that gets poked at it during it's lifecycle.

cheers


> Tony
>
>
>>>>[hidden email] 12/06/05 08:23AM >>>
>
> Tony Thompson wrote:
>
>>Greg,
>>
>>An update on this...I am using 5.1.6 but still having issues.  Can
>
> you
>
>>clarify this for me?  Is there a reason that Jetty has to null out
>
> the
>
>>welcome files when it runs through its configuration?
>
>
> The problem is that you can't just add the welcome files to the
> existing array.  If you did, then stop start cycles of the webapp
> will cause the list to grow.
>
> The solution is that you should simply implement the
> WebApplicationContext.Configuration
> interface and then use
> WebApplicationContext.setConfigurationClassNames
> to inject your class into the configuration sequence of the webapp.
>
> You can then setup the context before, during or after the standard
> configuration process.
>
> cheers
>
>
>
>
>
>>Thanks
>>Tony
>>
>>
>>
>>>>>[hidden email] 11/15/05 10:55AM >>>
>>
>>Sorry it has taken me so long to get back to some of these but, I
>>tested
>>this with 5.1.5 and it is still not working in my configuration.
>
> But,
>
>>based on your message, I am using a web.xml so, I am guessing that
>
> is
>
>>why it is not working.  Am I being forced to configure my welcome
>>files
>>in the web.xml from this point on even though I never had to in the
>>past?
>>
>>Thanks
>>Tony
>>
>>
>>
>>>In CVS I have moved the setWelcomeFiles( null )  to the
>>
>>XmlConfiguration
>>
>>
>>>class.    So it is only null if you are using defaultweb.xml and/or
>>
>>web.xml
>>
>>
>>>cheers
>>>
>>>Tony Thompson wrote:
>>>
>>>
>>>>In Jetty 4, I have a couple WebApplicationContexts that I configure
>>>>completely programmatically.  One of the things I do as part of the
>>>>configuration is:
>>>>
>>>>context.setWelcomeFiles( ... )
>>>>
>>>>I am attempting to do this same thing in Jetty 5 but, one of the
>>
>>first
>>
>>
>>>>things WebApplicationContext.doStart() does is:
>>>>
>>>>setWelcomeFiles( null )
>>>>
>>>>which kills the welcome files I already configured.  If I remove
>>
>>that
>>
>>
>>>>from WebApplicationContext, the welcome files configure fine.
>>
>>Should
>>
>>
>>>>that be there or is there something I should change when using
>>
>>Jetty
>>5?
>>
>>
>>>>Thanks.
>>>>Tony
>>>>
>>>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by the JBoss Inc.  Get Certified
>
> Today
>
>>Register for a JBoss Training Course.  Free Certification Exam
>>for All Training Attendees Through End of 2005. For more info visit:
>>http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click 
>>_______________________________________________
>>Jetty-support mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/jetty-support 
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: Splunk Inc. Do you grep through
>
> log files
>
>>for problems?  Stop!  Download the new AJAX search engine that makes
>>searching your log files as easy as surfing the  web.  DOWNLOAD
>
> SPLUNK!
>
>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click 
>>_______________________________________________
>>Jetty-support mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/jetty-support 
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click 
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support