0

Currently the application is working correctly as expected on Tomcat 7.

However when I try to get this started on jetty using run-jetty-run eclipse integration, i face the below issue.

Application starts fine, datasources, webappcontext, controllers all initialize fine.

2015-01-16 12:01:49.220:INFO:oejs.Server:jetty-8.1.2.v20120308
2015-01-16 12:02:21.622:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/my-spring-services,[file:/home/jaya/Projws/app1/my-spring-services/src/main/webapp/]}
2015-01-16 12:02:22.094:INFO:/my-spring-services:Spring WebApplicationInitializers detected on classpath: [com.jaya.ex1.config.WebAppInitializer@647a64e]
2015-01-16 12:02:22.248:INFO:/my-spring-services:Initializing Spring FrameworkServlet 'dispatcher'
2015-01-16 12:02:29.121:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/my-spring-services,[file:/home/jaya/Projws/app1/my-spring-services/src/main/webapp/]}
2015-01-16 12:02:29.121:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/my-spring-services,[file:/home/jaya/Projws/app1/my-spring-services/src/main/webapp/]}
2015-01-16 12:02:29.121:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/my-spring-services,[file:/home/jaya/Projws/app1/my-spring-services/src/main/webapp/]}
2015-01-16 12:02:29.121:INFO:/my-spring-services:Initializing Spring root WebApplicationContext
2015-01-16 12:02:30.455:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/my-spring-services,[file:/home/jaya/Projws/app1/my-spring-services/src/main/webapp/]}
2015-01-16 12:02:30.464:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:18080

I also get the message about this in the logs, same as that of Tomcat 7:

2015-01-16 12:02:28 [INFO] (AbstractHandlerMethodMapping.java:registerHandlerMethod:179) Mapped "{[/api/inposts],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto ...

I am using openjdk7. Jetty-run config: [context=/my-spring-services, webappdir=src/main/webapp]

The server is however running, as I can get src/main/webapp/index.html using GET http://localhost:18080/my-spring-services.

By this I would expect POST http://localhost:18080/my-spring-services/api/inposts to work.

But, when I invoke this API i get the standard 404 - not found(this again works in Tomcat 7).

Not sure if im invoking correctly for run-jetty-run. Would appreciate any help.Thanks.JB

4

0 回答 0