jsp拦截器
ActionContext.getContext().getSession().put("login", "1");
<%
String flag=(String)session.getAttribute("login");
if(flag==null)
response.sendRedirect("login.jsp");
%>
相关文档:
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 ......
<%
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
List stafflist = ((StaffDAO)ctx.getBean("StaffDAO")).findAll();
request.setAttribute("stafflist",stafflist);
%> ......
本例子在Windows+Tomcat6(weblogic9.2)+jdk1.6下运行。
1)安装好jdk1.6,然后安装tomcat6.
2)在tomcat目录的conf目录下,修改server.xml。
本例子是默认配置运行在虚拟目录下,,并且上传基准目录的物理路径在当前应用下。请根据第3点,在对应的host节点上加入蓝色部分代码。
1)如果应用部署在网站根目录 ......
自己分页,下一篇会介绍使用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// ......
项目框架S2SH,jsp页面如下,select列表设为multiple。为了能在action里取到前台界面select列表的多选值,瞎搞了两天,今天终于成功。其实后台action取前台jsp页面的值很简单,废话不多说,先贴代码:
<body>
<form action="sendMsg.action?senderId=${users.id }&username=${users.username}" m ......