易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp拦截器

ActionContext.getContext().getSession().put("login", "1");
<%
    String flag=(String)session.getAttribute("login");
    if(flag==null)
     response.sendRedirect("login.jsp");
     %>


相关文档:

在JSP中配置FCKeditor 2.6.4

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 ......

JSP中直接调用Spring接管的JAVABEAN

<%
    ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
    List stafflist = ((StaffDAO)ctx.getBean("StaffDAO")).findAll();
    request.setAttribute("stafflist",stafflist);
%> ......

简单Ajax与JSP相结合页面

环境:Ajax+JSP,Tomcat5.05
参考:http://www.w3cschool.cn/index-24.asp.htm
文件:testAjax.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb ......

JSP分页2

使用diasplaytag组件。
使用mysql5, 有个数据表user,字段有id, username, password。
使用displaytag需导入displaytag-1.1.jar,和
commons-logging
commons-lang
commons-collections
commons-beanutils
log4j
itext (optional, for pdf/rtf export)
然后在JSP页面中放入<%@ taglib uri="http://display ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号