JSP中直接调用Spring接管的JAVABEAN
<%
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
List stafflist = ((StaffDAO)ctx.getBean("StaffDAO")).findAll();
request.setAttribute("stafflist",stafflist);
%>
相关文档:
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%!
String getCh(String s) {
try {
String &nb ......
JSP内置对象(9个常用的内置对象)
1.request对象
客户端的请求信息被封装在request对象中,通过它才能了解到客户的需求,然后做出响应。它是HttpServletRequest类的实例。
序号 方 法 说 明
1 object getAttribute(String name) 返回指定属性的属性值
2 Enumeration getAttributeNames() 返回所有可用属性名 ......
第一讲(参考《Java Web程序设计基础教程》第1章)
1 JSP 和 Java的关系
一般Java指的标注版 Java SE
另外两个版本:Java EE 和 Java ME
JSP属于Java EE的一部分。
Java EE:
组件:Web层组件(JSP+Servlet)+业务层组件(EJB)
&n ......
(1)直接在URL请求后添加
如:<a href="thexuan.jsp?action=transparams&detail=directe")直接传递参数/a>
特别的在使用response.sendRedirect做页面转向的时候,也可以用如下代码:
response.sendRedirect("thexuan.jsp?action=transparams&de ......
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 ......