易截截图软件、单文件、免安装、纯绿色、仅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 ......

简单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页面乱码问题

分两种:
Get方式传递数据解决办法:
<%
String username = request.getParameter("username");
byte[] bytes = username.getBytes("iso-8859-1");
String result = new String(bytes, "gb2312");
out.print(result);
%>
Post方式解决办法:request.setCharacterEncoding("gb2312");
......

JSP 得到页面点击radio的值

<SCRIPT LANGUAGE="JavaScript">
var tt = "";
   var flag = false;
   var radios = document.getElementsByName("t1");//从jsp中取radio的id或radio的name
   for(var i=0;i<radios.length;i++){
   //如果当前有选中
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号