You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -52,9 +53,6 @@ Otherwise you'll need to download the latest [jar release][2], drop it into the
52
53
*WEB-INF/lib* directory and configure the `RackFilter` in your application's
53
54
*web.xml* (see following examples).
54
55
55
-
Alternatively you can use a server built upon JRuby-Rack such as [Trinidad][3]
56
-
with sensible defaults, without the need to configure a deployment descriptor.
57
-
58
56
### Rails
59
57
60
58
Here's sample *web.xml* configuration for Rails. Note the environment and
@@ -161,9 +159,14 @@ using is `org.jruby.rack.RackFilter`, the filter supports the following
161
159
gets reset (accepts values "true", "false" and "buffer" to reset the buffer
162
160
only), by default "true"
163
161
-**addsHtmlToPathInfo** controls whether the .html suffix is added to the URI
164
-
when checking if the request is for a static page
162
+
when checking if the request is for a static page. The default behavior for
163
+
Rails and many other Ruby applications is to add an *.html* extension to the
164
+
resource and attempt to handle it before serving a dynamic request on the
165
+
original URI. However, this behavior may confuse other servlets in your
166
+
application that have a wildcard mapping. Defaults to true.
165
167
-**verifiesHtmlResource** used with the previous parameter to make sure the
166
-
requested static resource exists before adding the .html request URI suffix
168
+
requested static resource exists before adding the .html request URI suffix.
169
+
Defaults to false.
167
170
168
171
The application can also be configured to dispatch through a servlet instead of
169
172
a filter, the servlet class name is `org.jruby.rack.RackServlet`.
@@ -192,11 +195,11 @@ Several aspects of Rails are automatically set up for you.
192
195
## JRuby Runtime Management
193
196
194
197
JRuby runtime management and pooling is done automatically by the framework.
195
-
In the case of Rails, runtimes are pooled by default (the default will most
196
-
likely change with the adoption of Rails 4.0). For other Rack applications a
197
-
single shared runtime is created and shared for every request by default.
198
-
As of **1.1.9** if*jruby.min.runtimes* and *jruby.max.runtimes* values are
199
-
specified pooling is supported for plain Rack applications as well.
198
+
For Rack-only applications (and Rails ones from jruby-rack >= 1.3), a single
199
+
shared runtime is created and shared for every request by default.
200
+
201
+
If*jruby.min.runtimes* and *jruby.max.runtimes* values are
202
+
specified pooling of runtimes can be enabled for both types of applications.
200
203
201
204
We do recommend to boot your runtimes up-front to avoid the cost of initializing
202
205
one while a request kicks in and find the pool empty, this can be easily avoided
@@ -241,10 +244,9 @@ as context init parameters in web.xml or as VM-wide system properties.
241
244
-`jruby.runtime.env`: Allows to set a custom ENV hash for your Ruby environment
242
245
and thus insulate the application from the environment it is running. By setting
243
246
this option to en empty string (or 'false') it acts as if the ENV hash was
244
-
cleared out (similar to the now deprecated `jruby.rack.ignore.env` option).
245
-
-`jruby.runtime.env.rubyopt`: This option is used for compatibility with the
246
-
(deprecated) `jruby.rack.ignore.env` option since it cleared out the ENV after
247
-
RUBYOPT has been processed, by setting it to true ENV['RUBYOPT'] will be kept.
247
+
cleared out (similar to the now removed `jruby.rack.ignore.env` option).
248
+
-`jruby.runtime.env.rubyopt`: Set to true to cause ENV['RUBYOPT']
249
+
to be retained even when using `jruby.runtime.env` to override environemnt (similar to how the removed `jruby.rack.ignore.env` option behaved by default).
248
250
-`jruby.rack.logging`: Specify the logging device to use. Defaults to
249
251
`servlet_context`. See below.
250
252
-`jruby.rack.request.size.initial.bytes`: Initial size for request body memory
@@ -263,20 +265,6 @@ as context init parameters in web.xml or as VM-wide system properties.
263
265
been previously read this leads to a limitation (Rack won't see the POST paras).
264
266
Thus an alternate pure 'servlet' env "conversion" is provided that maps servlet
0 commit comments