JSPÖÐ±íµ¥Êý¾Ý´æ´¢µÄͨÓ÷½·¨
ÀÊÎÖ½ÌÓý³É¶¼¼ÆËã»úÅàѵ-JSPƪ
J2EE(Java 2 Enterprise Edition)¼¼ÊõÒѹ㷺ӦÓÃÔÚWebÓ¦Óÿª·¢ÖУ¬ÆäÖеÄJavaBean¡¢Servlet¼¼ÊõΪ¿ª·¢ÕßÌṩÁ˸üΪÇåÎúµÄ¿ª·¢»·¾³£¬Ê¹ÓÃJSP¼¼Êõ±íÏÖÒ³Ã棬ʹÓÃServlet¼¼ÊõÍê³É´óÁ¿µÄÒµÎñ´¦Àí£¬Ê¹ÓÃBeanÀ´´æ´¢Êý¾Ý¼°Ò»Ð©ÒµÎñ´¦Àí¡£ÔÚWEBÓ¦ÓÃÖУ¬ÒµÎñÊý¾Ý´æ´¢µ½Êý¾Ý¿âÖеĴ¦Àí¹¤×÷¾³£ºÜ·±ÖØ£¬ÆäÖÐÒ»ÖÖÖ÷ÒªµÄÐÎʽ¾ÍÊÇ±íµ¥Êý¾Ý´æ´¢µ½Êý¾Ý¿â£¬Õû¸öÓ¦Óô¦Àí¹ý³ÌÇ£Éæµ½´óÁ¿µÄÕâÖÖÊý¾Ý´æ´¢²Ù×÷£¬¶Ôÿ¸ö±íµ¥¶¼Òªµ¥¶À±àдÏàÓ¦µÄÊý¾Ý´æ´¢³ÌÐò£¬»¨·ÑÁË¿ª·¢ÈËÔ±´óÁ¿µÄʱ¼äºÍ¾«Á¦¡£²ÉÓÃʲô·½·¨À´¼õÇá±íµ¥Êý¾Ý´æ´¢µÄ¿ª·¢¹¤×÷Á¿ÊÇÖµµÃÑо¿µÄÎÊÌâ¡£
Á½ÖÖ³£¼ûµÄ±íµ¥Êý¾Ý´æ´¢´¦Àí·½·¨
1¡¢¶Ôÿһ±íµ¥¶¼±àдÏàÓ¦µÄ³ÌÐò´úÂë
ÔÚJSPÒ³Ãæ»òJavaBean»òServletÖУ¬Ê¹ÓÃrequest. getparameter()º¯ÊýÖðÒ»ÌáÈ¡±íµ¥Ìá½»µÄÊý¾Ý£¬»ò±àдÏàÓ¦µÄJavaBean£¬Ê¹ÓÃsetProperty·½·¨½«Êý¾Ý×Ô¶¯È¡µ½JavaBeanÖУ¬È»ºóÉú³ÉSQLÓï¾ä£¨insert£¬update£¬delete£©£¬×îºóÖ´ÐÐexecuteupdate()º¯ÊýÍê³ÉÊý¾Ý±í´æ´¢¡£
2¡¢¶ÔÿһÊý¾Ý±í×Ô¶¯Éú³ÉÒ»¸öJavaBean³ÌÐò´úÂë
Êý¾Ý¿âϵͳ±ØÐëÖ§³ÖÓû§Äܹ»¶ÁÈ¡±í½á¹¹£¬²¢Ê¶±ð¹Ø¼ü×ֶΡ£ÀûÓÃÃæÏò¶ÔÏó¿ìËÙ¿ª·¢¹¤¾ß£¬ÈçPowerBuilder¡¢DelphiµÈ£¬×ÔÐпª·¢Ò»¸öjava´úÂë×Ô¶¯Éú³É³ÌÐò¡£ÔڸóÌÐòÖжÁÈ¡Êý¾Ý¿â±íµÄ½á¹¹£º×Ö¶ÎÃû¡¢Êý¾ÝÀàÐÍ¡¢Êý¾Ý³¤¶È£¬×Ô¶¯Éú³ÉÒ»¸öJavaBean´úÂë¡£ÔڸôúÂëÖж¨ÒåÓë±íÖÐ×ֶζÔÓ¦µÄͬÃû±äÁ¿£¬½¨Á¢ËùÓбäÁ¿µÄsetValueºÍgetValue·½·¨£¬½¨Á¢insert¡¢update¡¢deleteº¯Êý·Ö±ð´¦Àíinsert¡¢update¡¢deleteµÄSQLÓï¾äÉú³ÉºÍÖ´ÐС£
ÔÚ±íµ¥Ìá½»µÄÊý¾Ý´¦ÀíÒ³ÃæÖУ¬±àдÈçÏ´úÂ룬½«±íµ¥Êý¾Ý´æ´¢µ½JavaBeanÖУº
£¼jsp£ºuseBean id="table" class="table1_bean" /£¾
£¼jsp£ºsetProperty name="table" property="*" /£¾
(×¢£ºtable1_beanΪÉÏÊö×Ô¶¯Éú³ÉµÄ¶ÔӦijһ¸ö±íµÄJavaBean)
È»ºóµ÷ÓÃtable1_beanÖÐinsert¡¢update¡¢deleteº¯ÊýÍê³ÉÊý¾Ý±í´æ´¢£¬²¢·µ»ØÖ´Ðнá¹û¡£È磺
£¼%boolean success =table.insert()£» %£¾
µÚÒ»ÖÖ·½·¨¼òµ¥Ö±¹Û£¬µ«¶Ôÿһ±íµ¥¶¼ÐèÒª±àдÏàÓ¦µÄÊý¾Ý´¦Àí³ÌÐò¡£¶ÔÉÔ΢´óÒ»µãµÄÓ¦Óã¬±íµ¥ÊýÁ¿¿ÉÄܺܶ࣬¿ª·¢¹¤×÷Á¿ºÜ´ó£¬¿ª·¢¹¤×÷ЧÂʵ͡£±í½á¹¹±ä¶¯ÈçÔö¼Ó¡¢¼õÉÙ×Ö¶Îʱ£¬ÐèÐÞ¸ÄÏàÓ¦µÄÊý¾Ý´¦Àí³ÌÐò¡£
µÚ¶þÖÖ·½·¨Ïà¶ÔµÚÒ»ÖÖ¼ò±ãµÃ¶à£¬Ã¿Ò»Êý¾Ý±íµÄÊý¾Ý´¦ÀíÓɶÔÓ¦µÄJavaBeanʵÏÖ£¬JavaBean×Ô¶¯Éú³É£¬²»Ðè±àд£¬±í½
Ïà¹ØÎĵµ£º
<%@ page contentType="text/html; charset=gbk" language="java" import="java.io.*" buffer="64kb" %>
<%
String path_in = "";
String content = "";
path_in = request.getRealPath("/")+"admin"+File.separator+ ......
FCKeditor jsp ÅäÖà ʹÓÃ
2009-04-07 16:57
FCKeditorÊÇÒ»¿î¿çƽ̨µÄÔÚÏß±à¼Æ÷£¬µ½ÎÒ·¢²¼±¾ÎÄ£¬FCKeditorµÄ¹Ù·½°æ±¾ÒѾ·¢Õ¹µ½ÁË2.6.4
µã»÷½øÈë ¹ÙÍø
1¡¢Ê×Ïȵǽwww.fckeditor.net/downloadÏÂÔØFCKeditorµÄ×îа汾£¬ÐèÒªÏÂÔØ2¸öѹËõ°ü£¬Ò»¸öÊÇ»ù±¾Ó¦Óã¬ÁíÒ»¸öÊÇÔÚΪÔÚjspÏÂËù×¼±¸µÄÅäÖá£
  ......
½¨Á¢Ìõ¼þÊ×ÏÈÒ»¶¨ÒªÈ·¶¨×Ô¼ºµÄmysql£¬tomcat,eclipseÁ¬½ÓÊÇÕýÈ·µÄ¡£
index.jspºÜ¼òµ¥£¬¾ÍÒ»¸öÌøת¡£
<%
response.sendRedirect("lg.jsp");
%>
lg.jsp ʵÏֵǼ¿ò¼Ü
<%@ page contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>
login
</title>
</hea ......
·½·¨Ò»¡¢
login.html
<html>
<head>
<title>Óû§µÇ¼</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<script language="javascript">
&nbs ......
µÚÒ»ÖÖ£º
¾ÍÊÇÖ±½Ó¸ø³öÏÂÔصĵØÖ·£¬ÕâÖÖ·½Ê½ºÜ²»ºÃ£¬ÒòΪ»á±©Â¶ÄãµÄµØÖ·£¬´øÀ´ºÜ¶à²»°²È«µÄÒòËØ£¬¿ÉÒÔ˵ÊÇǧÍò²»ÒªÓÃÕâÖÖ
µÚ¶þÖÖ£º
ÏÂÔØÒ³Ãæ
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<html>
<head>
<title>download</title>
</head>
< ......