title: Tomcat 5.5 Filter execution threw an exception, JRuby, Rails 3.2, warbler
body: <p>Please help. I need to deploy a Rails 3.2 to a 5.5 legacy Tomcat. Unfortunatly I don't have the possibility to upgrade that one to 6. Java is at 1.6.0_43-b01. The App works fine, running with webrick and on my own tomcat (which is 6, I didn't know they use 5) <em>argh</em></p>
  
  <p>Here is the exception I get. As I am a Ruby guy and a Java noob, any ideas how to solve this?</p>
  
  <pre><code>HTTP Status 500 -
  
  type Exception report
  
  message
  
  description The server encountered an internal error () that prevented it from fulfilling     this request.
  
  exception
  
  javax.servlet.ServletException: Filter execution threw an exception
  root cause
  
  java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
  org.jruby.rack.servlet.DefaultServletRackContext.getContextPath(DefaultServletRackCont ext.java:75)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:440)
  org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:304)
  org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:52)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:64)
  org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
  org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:172)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
  org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
  org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:172)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:64)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.ast.RootNode.interpret(RootNode.java:129)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:120)
  org.jruby.Ruby.runInterpreter(Ruby.java:842)
  org.jruby.Ruby.loadFile(Ruby.java:2659)
  org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  org.jruby.runtime.load.LoadService.load(LoadService.java:351)
  org.jruby.RubyKernel.loadCommon(RubyKernel.java:1054)
  org.jruby.RubyKernel.load19(RubyKernel.java:1046)
  org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:209)
  org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:205)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  org.jruby.ast.RootNode.interpret(RootNode.java:129)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:120)
  org.jruby.Ruby.evalScriptlet(Ruby.java:427)
  org.jruby.Ruby.evalScriptlet(Ruby.java:404)
  org.jruby.rack.rails.RailsRackApplicationFactory.createApplicationObject(RailsRackApplicationFactory.java:21)
  org.jruby.rack.DefaultRackApplicationFactory$1.create(DefaultRackApplicationFactory.java:98)
  org.jruby.rack.DefaultRackApplicationFactory$RackApplicationImpl.init(DefaultRackApplicationFactory.java:420)
  org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:111)
  org.jruby.rack.PoolingRackApplicationFactory.createApplication(PoolingRackApplicationFactory.java:340)
  org.jruby.rack.PoolingRackApplicationFactory.getApplicationImpl(PoolingRackApplicationFactory.java:180)
  org.jruby.rack.RackApplicationFactoryDecorator.getApplication(RackApplicationFactoryDecorator.java:131)
  org.jruby.rack.DefaultRackDispatcher.getApplication(DefaultRackDispatcher.java:37)
  org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:32)
  org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)
  </code></pre>