简体   繁体   中英

Deploying JRuby war file to Tomcat in Windows

I have a JRuby on Rails application I am trying to deploy to an existing Tomcat 7 installation with a war file created by warbler. When I drop the war file in the webapps directory it creates a directory with the war contents. I am able to access the static html (public) files however I am not able to access any of the dynamic ruby generated urls and get a 404 response.

My guess is that Tomcat doesn't know how to execute or handle the ruby files. Is there something I need to do to tell Tomcat to execute those as scripts?

In my catalina log file I see the following:

INFO: Deploying web application archive C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0\\webapps\\myapp.war Mar 22, 2012 10:50:41 PM org.apache.catalina.startup.ContextConfig webConfig SEVERE: Unable to determine URL for WEB-INF/classes javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found at org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733) at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161) at org.a pache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Mar 22, 2012 10:50:43 PM org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: urn:org.jruby.rack is already defined

probably something with your paths or JRuby. See this http://www.digitalsanctum.com/2007/07/24/jruby-deploying-a-rails-application-on-tomcat/ site.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM