简体   繁体   中英

JQuery post doesn't work on Jetty

After reinstalling Jetty i have problem with posting data by JQuery library. When i trying to post data with $.post function server returns 500 internal error. In jetty logs i have error like this:

2012-11-15 12:05:22.031:WARN::/post
java.lang.NoSuchMethodError: org.mortbay.util.UrlEncoded.decodeTo(Ljava/io/InputStream;Lorg/mortbay/util/MultiMap;Ljava/lang/String;I)V
        at org.mortbay.jetty.Request.extractParameters(Request.java:1566)
        at org.mortbay.jetty.Request.getParameter(Request.java:859)
        at org.apache.jsp.post_jsp._jspService(org.apache.jsp.post_jsp:44)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

I have tried to add libraries with that class to my project (and jetty/lib/ext folder), but errors appears again. Maybe i need correct version? What means this error? No method with correct parameters decodeTo(InputStream, MultiMap, String, Integer (??? I means Integer?). So any help will be apprishiated.

Looks like there was a problem with libraries in jetty/lib directories. We copied it from previous installation (long time ago we uses Glassfish). Now problem solved - i download jetty hightitude v.6.1 (from here: http://dist.codehaus.org/jetty/jetty-hightide-6.1/ ) (like my own jetty version) and just replace lib folder from it. I think problem was on jsp library.

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