jsp拦截器
ActionContext.getContext().getSession().put("login", "1");
<%
String flag=(String)session.getAttribute("login");
if(flag==null)
response.sendRedirect("login.jsp");
%>
相关文档:
在线网页编辑器中最著名的是fckEditor,但他的功能太全面了,而且使用起来也不是很方便。相对而言新浪htmleditor就比较清爽,而且使用简单。新浪博客和人人网日志应该都是用的这个控件。但是htmleditor最多的是asp版本,在网站jsp版本十分稀少。通过查找我找到一个可以使用的新浪htmleditor jsp版本。下载地址为http://down ......
实现JSP自定义标签的一种方法:
1.写一个类继承TagSupport或其他Tag的实现类。
public class AllTag extends TagSupport {
@Override
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
try {
out.append("Hello World.");
} catch (IOException e) {
e.pri ......
自己分页,下一篇会介绍使用diasplaytag组件。
使用mysql5, 有个数据表user,字段有id, username, password。
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional// ......
此种方法使用excel的组件,要求客户端必须装有excel程序。方法是将表格中的每个td标签的内容取出,作为excel文件中一个单元格的内容。
1、在网页中添加java脚本
function AutomateExcel(tableid,unusecolumn)
{
// 获取excel组件
var oXL = new ActiveXObject("Excel.Application");
// ......