首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Ckeditor跟后台交互

2012-10-24 
Ckeditor和后台交互将form表单提交到Servlet中,处理以后,将结果返回给前台index.jsp?show.jsp??ShowServle

Ckeditor和后台交互

将form表单提交到Servlet中,处理以后,将结果返回给前台

index.jsp

?show.jsp

?

?

ShowServlet.java

package servlet;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class ShowServlet extends HttpServlet {private static final long serialVersionUID = 1L;public ShowServlet() {super();}protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {}protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {request.setCharacterEncoding("UTF-8");response.setCharacterEncoding("UTF-8");String data = request.getParameter("editor");request.setAttribute("data", data);request.getRequestDispatcher("showServlet.jsp").forward(request,response);}}

?

进行这样的设置以后,基本的功能就可以实现了

热点排行