Question

I'm trying to deploy a Rails 3.2 app on JBOSS AS 7.1, using JRuby 1.6.6. I think this is almost certainly a JBoss issue.

The app works perfectly under Tomcat and under WebBrick, but not JBoss. When deployed on JBoss, the parameters posted using multi-part forms are stripped before the request arrives at the controller. I suspect there is some JBOSS configuration setting needed to allow uploads of large HTTP packets, but can't figure out where or what to set in JBOSS AS 7.1 to do that.

I don't think the problem is in the Rails controller code, but the easiest way to see the problem is to look at the comments in this code block.

def create
  f = params[:uploaded_file]
  # ** Under JBOSS, there is no :uploaded_file in the params hash!
  # ** Without JBOSS, :uploaded_file is passed in, all is good
  data = f.read
  # ...
end

The ERB template looks something like:

<%= form_tag xxx_path, :multipart => true do %>
<%= file_field_tag :uploaded_file, :required => true %>
<% end %>

One reason I suspect it involves some size limit, is that if I try uploading very very small files, it works. The file is successfully passed to the controller in the params hash in that case.

Any help would be greatly appreciated.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top