开发者

Posting to java servlet with jEditable

Is there anyone familiar with jEditable? As mentioned in the site http://www.appelsiini.net/projects/jeditable it is possible to post to a java servlet. I am unable to post and capture the value in the servlet. Also, the inline edit box does not register a change.

Script

 $('.edit').editable('update.do');

HTML

<div class="edit" id="example">edit here</div>

Java Servlet

protected void processRequest(HttpServletRequest request, HttpServletRespo开发者_高级运维nse response)
throws ServletException, IOException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    try {
        String name=  request.getParameter("id");
        String value=  request.getParameter("value");
        System.out.println("Name is " + name);
        System.out.println("Value is " + value);
        //Nothing is printed out, no change is registered in the inline edit box

    } finally { 
        out.close();
    }
} 


Solved! The solution was to use doPOST in the servlet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜