Re: [jetty-user] Servlet post method is not called in embedded jetty
Joakim Erdfelt <[email protected]> Fri, 18 Mar 2011 09:27:51 -0700
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <[email protected]> |
You'll want to take a closer look at the embedded examples. Here's a simple example for one servlet. Jetty 6.x - http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/examples/embedded/src/main/java/org/mortbay/jetty/example/OneServletContext.java Jetty 7.x - http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/OneServletContext.java <http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/OneServletContext.java>The rest of the embedded examples can be found here. Jetty 6.x - http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/examples/embedded/src/main/java/org/mortbay/jetty/example/ Jetty 7.x - http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/ <http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/>- Joakim On Fri, Mar 18, 2011 at 9:00 AM, Shaid <[email protected]> wrote: > Servlet post method is getting not called in the embedded jetty. I am > getting the following error as: > > HTTP method GET is not supported by this URL > > The embedded jetty code is: > > Server server = new Server(8080); > Context context = new Context(server,"/hello",Context.SESSIONS); > context.addServlet(new ServletHolder(new HelloWorld()), "/*"); > server.start(); > server.join(); > > Can any body help me how to fix this problem? > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >