Forum: JRuby HttpServletRequest from ActionDispatch::Request

Posted by Tom Shealy (tom_302)
on 2012-08-07 23:18
Hello,

I'm developing a Rails 3.1 application on JRuby 1.6.7 that interacts
with a
legacy Java-based application.  Inside ApplicationController
:before_filter, I need to authenticate with the legacy codebase by
calling a method that requires an argument of type
javax.servlet.http.HttpServletRequest.

What's the best way to create an HttpServletRequest from an
ActionDispatch::Request?

I spent some time searching online but nothing I've tried so far has
worked.  I've tried passing the unmodified ActionDispatch::Request, as
well as request.to_java.  I also tried
request.env['java.servlet_request'] (which doesn't seem to exist
anymore?).

Any advice is appreciated - thanks in advance.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.