jspÀ¹½ØÆ÷
ActionContext.getContext().getSession().put("login", "1");
<%
String flag=(String)session.getAttribute("login");
if(flag==null)
response.sendRedirect("login.jsp");
%>
Ïà¹ØÎĵµ£º
¼¸ºõËùÓеÄWeb¿ª·¢ÓïÑÔ¶¼Ö§³ÖSession¹¦ÄÜ£¬ServletÒ²²»ÀýÍâ¡£ Servlet/JSPÖеÄSession¹¦ÄÜÊÇͨ¹ý×÷ÓÃÓò(scope)Õâ¸ö¸ÅÄîÀ´ÊµÏֵġ£
×÷ÓÃÓò·ÖΪËÄÖÖ£¬·Ö±ðΪ£º
page
ÔÚµ±Ç°Ò³ÃæÓÐЧ(½öÓÃÓÚJSPÖÐ)
request
ÔÚµ±Ç°ÇëÇóÖÐÓÐЧ
session
ÔÚµ±Ç°»á»°ÖÐÓÐЧ
application
ÔÚËùÓÐÓ¦ÓóÌÐòÖÐÓÐЧ
ÊDz»ÊÇ¿´²»Ì«Ã÷°×£¿pageÒòΪ½ ......
±êÇ©¿âTaglib
±êÇ©±»¶¨ÒåºÍ·Ö²¼ÔÚÒ»¸ö³ÆΪ±êÇ©¿âµÄ½á¹¹ÖУ¬Ò»¸ö±êÇ©¿âÊÇÓÉÔªÐÅÏ¢ºÍÀà×é³ÉµÄ¼¯ºÏ£º
1.±êÇ©´¦ÀíÆ÷£ºÊµÏÖ¶¨ÖƱêÇ©¹¦ÄܵÄJavaÀà¡£
2.±êÇ©¸½¼ÓÐÅÏ¢£¨TEI£©£ºÏòJSPÈÝÆ÷Ìṩ±ß¼ÒÔÈ·ÈϱêÇ©ÊôÐԺʹ´½¨±äÁ¿µÄÀà¡£
3.±êÇ©¿âÃèÊöÆ÷£¨TLD£©£ºÃèÊöµ¥¸ö±êÇ©ºÍÕû¸ö±êÇ©¿âÊôÐÔµÄXMLÎĵµ¡£
±êÇ©´¦ÀíÆ÷ºÍ±êÇ©¸½¼ÓÐÅÏ¢Ðè ......
»·¾³£º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 ......
java web¿ª·¢ÖУ¬ÈçºÎ²é¿´JSPºÍServlet°æ±¾
2008-12-10 09:00
ÎÒÃÇÔÚjava web¿ª·¢µÄ¹ý³ÌÖУ¬ÓÐʱÔÚ×ÊÁÏÉÏ¿ÉÄÜ»áÌáµ½»·¾³ËùÒªÖ§³ÖµÄJSP£¬Servlet°æ±¾¡£Èç¹û°æ±¾µÍ¾Í¿ÉÄܳöÏÖ²âÊÔ´íÎó¡£
·½·¨£º´ò¿ªtomcatµÄcommon\lib Ŀ¼Ï£¬ÓÐÁ½¸öJARÎļþ£º jsp-api.jar servlet-api.jar ¡£Èç¹ûûÓУ¬ÄÇ¿ÉÄÜÊÇÄãûÓÐÌí¼Ó½øÀ´¡£½âѹÕâÁ½¸ ......
´ËÖÖ·½·¨Ê¹ÓÃexcelµÄ×é¼þ£¬ÒªÇó¿Í»§¶Ë±ØÐë×°ÓÐexcel³ÌÐò¡£·½·¨Êǽ«±í¸ñÖеÄÿ¸ötd±êÇ©µÄÄÚÈÝÈ¡³ö£¬×÷ΪexcelÎļþÖÐÒ»¸öµ¥Ôª¸ñµÄÄÚÈÝ¡£
1¡¢ÔÚÍøÒ³ÖÐÌí¼Ójava½Å±¾
function AutomateExcel(tableid,unusecolumn)
{
// »ñÈ¡excel×é¼þ
var oXL = new ActiveXObject("Excel.Application");
// ......