Web App configuration outside of WAR file

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

Web App configuration outside of WAR file

Eugene Prokopiev-2
Hi,

I need to distribute web application as war file. Where can I store it's
configuration settings outside of war file with default values inside it
for different installations with jetty?

I can use JNDI with JettyPlus, but I need to store settings in web.xml
inside of war or in webdefault.xml which visible for all web
applications. Have I another way?

--
Thanks,
Eugene Prokopiev



-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Web App configuration outside of WAR file

jan_bartel
Hi Eugene,

With jetty6, you can set up <env-entry>s in the jetty.xml file (ie outside of
the webapp). You can also control whether they override <env-entry>s
of the same name in a web.xml file or not.

There is info on how to do this here: http://docs.codehaus.org/display/JETTY/JNDI

Note however, that these <env-entry>s will be applied to ALL webapps. I am
thinking about optionally making them attachable to a particular webapp.

regards
Jan

Eugene Prokopiev wrote:

> Hi,
>
> I need to distribute web application as war file. Where can I store it's
> configuration settings outside of war file with default values inside it
> for different installations with jetty?
>
> I can use JNDI with JettyPlus, but I need to store settings in web.xml
> inside of war or in webdefault.xml which visible for all web
> applications. Have I another way?
>
> --
> Thanks,
> Eugene Prokopiev
>
>
>
> -------------------------------------------------------
> 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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642



-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: Web App configuration outside of WAR file

Russell Howe
Jan Bartel wrote:
> Hi Eugene,
>
> With jetty6, you can set up <env-entry>s in the jetty.xml file (ie
> outside of the webapp). You can also control whether they override
> <env-entry>s of the same name in a web.xml file or not.
> There is info on how to do this here:
> http://docs.codehaus.org/display/JETTY/JNDI

Looking at this file, I'm confused by the table under "Configuring
resource-refs and resource-env-refs"

It looks like this:

Resource Type         Name in jetty.xml            Environment Lookup
javax.sql.DataSource  jdbc/myDB                    java:comp/env/myDB
javax.jms.QueueConnectionFactory jdbc/myQueue      java:comp/env/myQueue
javax.mail.Session    mail/myMailService java:com/env/mail/myMailService

Should it not look like this?

Resource Type         Name in jetty.xml        Environment Lookup
javax.sql.DataSource  jdbc/myDB                java:comp/env/jdbc/myDB
javax.jms.QueueConnectionFactory jms/myQueue   java:comp/env/jms/myQueue
javax.mail.Session    mail/myMailService java:com/env/mail/myMailService

(and no, I'm afraid I haven't touched the LDAP/JNDI LoginModule of late
- too much time spent handholding people through configuring email clients)

--
Russell Howe
[hidden email]


-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Web App configuration outside of WAR file

jan_bartel
Russell,

Drat! Operator error! Thanks for pointing that out. Fixed now.

Adding JAAS to jetty6 is on the agenda, so if you get keen on
LDAP login module again, let me know :-)

cheers
Jan

Russell Howe wrote:

> Jan Bartel wrote:
>
>>Hi Eugene,
>>
>>With jetty6, you can set up <env-entry>s in the jetty.xml file (ie
>>outside of the webapp). You can also control whether they override
>><env-entry>s of the same name in a web.xml file or not.
>>There is info on how to do this here:
>>http://docs.codehaus.org/display/JETTY/JNDI
>
>
> Looking at this file, I'm confused by the table under "Configuring
> resource-refs and resource-env-refs"
>
> It looks like this:
>
> Resource Type         Name in jetty.xml            Environment Lookup
> javax.sql.DataSource  jdbc/myDB                    java:comp/env/myDB
> javax.jms.QueueConnectionFactory jdbc/myQueue      java:comp/env/myQueue
> javax.mail.Session    mail/myMailService java:com/env/mail/myMailService
>
> Should it not look like this?
>
> Resource Type         Name in jetty.xml        Environment Lookup
> javax.sql.DataSource  jdbc/myDB                java:comp/env/jdbc/myDB
> javax.jms.QueueConnectionFactory jms/myQueue   java:comp/env/jms/myQueue
> javax.mail.Session    mail/myMailService java:com/env/mail/myMailService
>
> (and no, I'm afraid I haven't touched the LDAP/JNDI LoginModule of late
> - too much time spent handholding people through configuring email clients)
>



-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: Web App configuration outside of WAR file

Russell Howe
Jan Bartel wrote:
> Russell,
>
> Drat! Operator error! Thanks for pointing that out. Fixed now.

Spotted another one, see below...

> Adding JAAS to jetty6 is on the agenda, so if you get keen on
> LDAP login module again, let me know :-)

Well, the good news is that the JLDAP version has been in production use
here for, well, quite a while now, and it works a treat. I'm still
trying to convert our Intranet stuff to hibernate instead of handrolled
DAOs and horrid JSP pages with embedded SQL, so I doubt I'll be looking
at the JAAS stuff in the next month or so at least...

> cheers
> Jan
>
> Russell Howe wrote:
>
>> Should it not look like this?
>>
>> Resource Type         Name in jetty.xml        Environment Lookup
>> javax.sql.DataSource  jdbc/myDB                java:comp/env/jdbc/myDB
>> javax.jms.QueueConnectionFactory jms/myQueue   java:comp/env/jms/myQueue
>> javax.mail.Session    mail/myMailService java:com/env/mail/myMailService
p------------------------>--------------------------^

or even java:comp/env/mail/myMailService?

:)

--
Russell Howe
[hidden email]


-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss