JSP¹ýÂËÆ÷ȨÏÞ
½ñÌìÏÂÎ磬ÁÙÏ¿εÄʱºòÓиöѧÉúÎÊÁ˸ö¹ØÓÚ¹ýÂËÆ÷µÄʹÓõÄÎÊÌ⣬Ҳ²»ÖªµÀËý´Ó¸ãÏëµ½µÄ£¬¹À¼ÆÒ²ÊÇÍøÉÏÄÄλ´ïÈ˵ÄÑÝʾ£¬Ëý˵ÔÀ´ÄǸö¹¦ÄÜÓÐЩ¾ÖÏÞ£¬×Ô¼ºÀ©ÕÅÁËһϣ¬µ«ÀÏÊÇ´ï²»µ½Ð§¹û¡£ÓÚÊǾÍÀ´ÕÒÎÒÁË¡£
ËýµÄÐèÇóÈçÏ£º
1¡¢Ä¿±ê£ºÏÞÖƵǼÓû§µÄ·ÃÎÊÒ³Ã棬¸ù¾Ý²»Í¬µÄȨÏÞ¿ÉÒÔ²éѯÏàÓ¦µÄÒ³Ãæ¡£
2¡¢³¡¾°£ºÒÑÓÐÈý¸öÓû§admin¡¢normal1¡¢normal2£¬ÆäÖÐnormal1Ö»ÄÜ·ÃÎÊpage/jsp1ϵÄÒ³Ã棬normal2Ö»ÄÜ·ÃÎÊpage/jsp2ϵÄÒ³Ã棻
¸ù¾ÝËýµÄÃèÊö£¬ÎÒ´ò¿ªËýµÄ´úÂëÒ»¿´£¬Ò»¸ö×Ö“ÂÒ”£¬Á½¸ö×Ö“ºÜÂÒ”£¬ÍêÈ«¿´²»µ½ÈκÎÂß¼ÔÚÀïÃ棬ÓÚÊÇƾמÑé´óµ¶À«¸«µÄ¸øËüÀ´¸öÐÞÕý£¬ÐÞÕý´úÂëÈçÏ£º
Java´úÂë
if (session.getAttribute("user") != null) {
if(((UserInfo)session.getAttribute("user")).getName().equals("normal1") && !uri.startsWith("/page/jsp1")){
request.getRequestDispatcher("/page/jsp1/normal1.jsp").forward(request, response);
}
if(((UserInfo)session.getAttribute("user")).getName().equals("normal2") && !uri.startsWith("/page/jsp2")){
request.getRequestDispatcher("/MyJsp.jsp").forward(request, response);
}
}else{
if(!(uri.endsWith("result.jsp") || !uri.endsWith("index.jsp"))){
request.getRequestDispatcher("/MyJsp.jsp").forward(request, response);
}
}
if (session.getAttribute("user") != null) {
if(((UserInfo)session.getAttribute("user")).getName().equals("normal1") && !uri.startsWith("/page/jsp1")){
request.getRequestDispatcher("/page/jsp1/normal1.jsp").forward(request, response);
}
if(((UserInfo)session.getAttribute("user")).getName().equals("normal2") &&am
Ïà¹ØÎĵµ£º
Ç°ÑÔ
ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬²»¿É±ÜÃâµÄÐèҪʹÓõ½·ÖÒ³µÄ¹¦ÄÜ£¬¿ÉÊÇJDBCµÄ¹æ·¶¶Ô´ËȴûÓкܺõĽâ¾ö¡£¶ÔÓÚÕâ¸öÐèÇóºÜ¶àÅóÓѶ¼ÓÐ×Ô¼ºµÄ½â¾ö·½°¸£¬±ÈÈçʹÓÃVectorµÈ¼¯ºÏÀàÏȱ£´æÈ¡³öµÄÊý¾ÝÔÙ·ÖÒ³¡£µ«ÕâÖÖ·½·¨µÄ¿ÉÓÃÐԺܲÓëJDBC±¾ÉíµÄ½Ó¿ÚÍêÈ«²»Í¬£¬¶Ô²»Í¬ÀàÐ͵Ä×ֶεÄÖ§³ÖÒ²²»ºÃ¡£ÕâÀïÌṩÁËÒ»ÖÖÓëJDBC¼æÈÝÐԷdz£ºÃµÄ·½°¸ ......
ʹÓÃ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 ......
´ËÖÖ·½·¨Ê¹ÓÃexcelµÄ×é¼þ£¬ÒªÇó¿Í»§¶Ë±ØÐë×°ÓÐexcel³ÌÐò¡£·½·¨Êǽ«±í¸ñÖеÄÿ¸ötd±êÇ©µÄÄÚÈÝÈ¡³ö£¬×÷ΪexcelÎļþÖÐÒ»¸öµ¥Ôª¸ñµÄÄÚÈÝ¡£
1¡¢ÔÚÍøÒ³ÖÐÌí¼Ójava½Å±¾
function AutomateExcel(tableid,unusecolumn)
{
// »ñÈ¡excel×é¼þ
var oXL = new ActiveXObject("Excel.Application");
// ......
½øÈëMyEclipse6.XÏÂ
Ð޸ģºeclipse.ini Îļþ
-Duser.language=en
¸Ä³É
-Duser.language=zh
µ¯³öÌáʾ£ºCtrl+"/"
dtd ÃüÃû¿Õ¼äµÄÌáʾÐÅÏ¢
window-->Preference-->xml-->XML Catalog-->add
Location :sql-map-2.dtd
key type :pubic ID
key:-//ibatis.apache.org//DTD SQL Map 2.0//EN (XMLÎļþÃüÃû¿Õ¼ ......