JSP中直接调用Spring接管的JAVABEAN
<%
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
List stafflist = ((StaffDAO)ctx.getBean("StaffDAO")).findAll();
request.setAttribute("stafflist",stafflist);
%>
相关文档:
页面的输入和输出涉及到了Request和Response,由于他们和Jsp中的相似,
下面我们进行详细的解读:
JSP中:
在动态网页开发中,HTML表单是与用户交互信息的主要手段。
使用JSP处理表单请求时,一般遵循这样一种模式,首先,用户通过表单控件输入并提交信息;接着,JSP页面获得表单数 ......
使用JSP大约有下列三种跳转方式:
1. response.sendRedirect();
2. response.setHeader("Location","");
3. <jsp:forward page="" />
经过试验得到下面的一些规则:
一. response.sendRedirect()
此语句前不允许有out.flush(),如果有out.flush(),会有异常:
java.lang.IllegalStateException: Can't send ......
el表达式分类
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
分 类 功能分类 标签名称
Core 表达式操作 out
set
remove
catch
流程控制 if
......
1.FCKeditor 介绍
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功能,.FCKeditor 支持当前流行的浏览器。
2.准备工作:
环境:winddows XP、tomcat6.0、JDK1.6
下载:
1):FCKeditor_2.6.4.zip
地址:http://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.4.zip ......
在线网页编辑器中最著名的是fckEditor,但他的功能太全面了,而且使用起来也不是很方便。相对而言新浪htmleditor就比较清爽,而且使用简单。新浪博客和人人网日志应该都是用的这个控件。但是htmleditor最多的是asp版本,在网站jsp版本十分稀少。通过查找我找到一个可以使用的新浪htmleditor jsp版本。下载地址为http://down ......