Hi there,
Has anyone successfully configured custom context parameters in
web.xml via config/warbler.rb?
I tried:
config.webxml.foo.bar.baz = “something”
as well as
config.webxml.context_params[‘foo.bar.baz’] = “something”
but both of them seem to be ignored.
I can edit config/web.xml.erb if I really have to, but it would be
cleaner if I could use warbler.rb for this.
Anyone had better luck with this?
I’m using warbler 0.9.10
thanks,
Igor
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I’ve done these:
Value of RAILS_ENV for the webapp
config.webxml.rails.env = ‘production’
Application booter to use, one of :rack, :rails, or :merb. (Default
:rails)
config.webxml.booter = :merb
successfully for a Merb app. But I don’t think that they actually
cause changes to the web.xml file itself.
For customizations to the web.xml file, I created a config/web.xml file
and that gets copied into the tmp/war/config directory when you warble.
Wes
Igor M. wrote:
thanks,
Igor
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Fri, Aug 29, 2008 at 12:48 PM, Igor M. [email protected] wrote:
config.webxml.context_params[‘foo.bar.baz’] = “something”
but both of them seem to be ignored.
I can edit config/web.xml.erb if I really have to, but it would be cleaner
if I could use warbler.rb for this.
Anyone had better luck with this?
I have tests that ensure custom context parameters are possible.
You’re not seeing anything rendered into the resulting web.xml? Are
you sure you don’t have an old web.xml.erb or pluginized warbler lying
around somewhere?
/Nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Hi Nick,
You are right, it works in some cases:
config.webxml.foo.bar.baz = ‘something’ —
OK
config.webxml.context_params[‘foo.bbb.bz’] = ‘something’
---- doesn’t work
config.webxml.context_params[‘com.’] = ‘something’
---- doesn’t work
config.webxml.com . = ‘something’
---- error below
rake aborted!
wrong number of arguments (1 for 0)
/usr/local/jruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/builtin/
javasupport/java.rb:42:in method_missing' (eval):80:in
initialize’
The property I’m trying to set is com.. and
currently I can’t find a way to do that via warbler.rb
my warbler.rb and web.xml.erb are up to date and there are no older
versions in my project.
/i
On Aug 29, 2008, at 11:30 AM, Nick S. wrote:
config.webxml.foo.bar.baz = “something”
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Aug 29, 2008, at 1:14 PM, Nick S. wrote:
config.webxml.context_params[‘com.’] = ‘something’
wrong number of arguments (1 for 0)
/usr/local/jruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/builtin/
javasupport/java.rb:42:in
method_missing' (eval):80:in
initialize’
What is the exact value of ? You might be running into
an odd method name collision issue with OpenStruct.
It looks like it can be really anything:
sun -> com.sun
sun.dse.timeoutproxy -> com.sun.dse.timeoutproxy
foo -> com.foo
…
/i
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Fri, Aug 29, 2008 at 3:00 PM, Igor M. [email protected] wrote:
Hi Nick,
You are right, it works in some cases:
config.webxml.foo.bar.baz = ‘something’ — OK
config.webxml.context_params[‘foo.bbb.bz’] = ‘something’ ----
doesn’t work
config.webxml.context_params[‘com.’] = ‘something’ ----
doesn’t work
#context_params is meant to be a read-only helper, not for assignment.
config.webxml.com . = ‘something’ ----
error below
rake aborted!
wrong number of arguments (1 for 0)
/usr/local/jruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/builtin/javasupport/java.rb:42:in
method_missing' (eval):80:in
initialize’
What is the exact value of ? You might be running into
an odd method name collision issue with OpenStruct.
/Nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Fri, Aug 29, 2008 at 3:24 PM, Igor M. [email protected] wrote:
What is the exact value of ? You might be running into
an odd method name collision issue with OpenStruct.
It looks like it can be really anything:
sun → com.sun
sun.dse.timeoutproxy → com.sun.dse.timeoutproxy
foo → com.foo
…
Do the specs run for you? Can you write a new failing spec
demonstrating the problem?
#--
# Copyright (c) 2010-2011 Engine Yard, Inc.
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
# This source code is available under the MIT license.
# See the file LICENSE.txt for details.
#++
require File.expand_path('../../spec_helper', __FILE__)
describe Warbler::Config do
before :each do
verbose(false)
end
context "in an unknown application" do
run_in_directory 'spec/sample_war/tmp'
it "has suitable default values" do
config = Warbler::Config.new
config.includes.should be_empty
This file has been truncated. show original
/Nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Fri, Aug 29, 2008 at 3:56 PM, Thomas E Enebo [email protected]
wrote:
com is on Object and is a java package for JI. When we do com.foo=heh
it constructs a foo= package?
Aha, it’s java integration getting in the way here. How can I disable
that method_missing for OpenStruct?
/Nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Fri, Aug 29, 2008 at 4:12 PM, Nick S. [email protected]
wrote:
On Fri, Aug 29, 2008 at 3:56 PM, Thomas E Enebo [email protected] wrote:
com is on Object and is a java package for JI. When we do com.foo=heh
it constructs a foo= package?
Aha, it’s java integration getting in the way here. How can I disable
that method_missing for OpenStruct?
I explicitly undef the %w(java javax com org) methods in trunk, plus I
added square-bracket accessors to work around future name collisions.
committed 09:47PM - 29 Aug 08 UTC
- they're likely to be common methods for web.xml config keys
- also add [] as a… way to specify non-identifier keys
They’ll be in the next release, due soon.
/Nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Fri, Aug 29, 2008 at 3:24 PM, Igor M. [email protected] wrote:
config.webxml.context_params[‘foo.bbb.bz’] = ‘something’ ----
wrong number of arguments (1 for 0)
sun → com.sun
sun.dse.timeoutproxy → com.sun.dse.timeoutproxy
foo → com.foo
…
com is on Object and is a java package for JI. When we do com.foo=heh
it constructs a foo= package?
Something like that…
-Tom
–
Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_ema[email protected] , [email protected]
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Excellent! Thanks
On Aug 29, 2008, at 3:18 PM, Nick S. wrote:
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email