Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Intellij8ÖÐMaven´ò°üʱjspºÍservlet×é¼þ³åÍ»½â¾ö°ì·¨

    ×î½üÔڸıðÈ˵ÄÒ»¸öÄ£¿é³ÌÐòʱ£¬ÊÇÓÃIntellij Idea8×öµÄ£¬ÏîÄ¿ÊÇÓÃMavenÀ´¹ÜÀíµÄ£¬WebÄ£¿éÒýÓõ½ÁËjsp-api.jarºÍservlet-api.jar£¬½á¹ûÔÚÓÃMaven´ò°üʱ£¬warÎļþÖÐÖ±½Ó°ü×°ÁËÕâÁ½¸öÎļþ£¬¶øÕâÁ½¸öÎļþºÍTomcat±¾ÉíµÄÎļþÓгåÍ»£¬µ¼ÖÂÁËÓ¦ÓóÌÐò²»ÄܼÓÔØ¡£
    ±¾À´×Ô¼º¶ÔIdeaÒ²²»ÊìϤ£¬¶ÔMavenÒ²²»¶®£¬¸ãÁ˺þã¬Ê¼ÖÕûÓнâ¾ö£¬Ö»ÄÜÏÈÉú³É£¬È»ºóÔÙɾ³ýÕâÁ½¸öÎļþ¡£ÒòΪÈç¹û²»ÓÃMavenÉú³É£¬Ö±½ÓÓÃIdeaµÄBuildÉú³É£¬ÄÇôÆäÖеÄ×ÊÔ´ÎļþÓÖÊÇÂÒÂ룬½çÃæÉÏÈ«ÊÇÂìÒÏÔÚÅÀ£¬ÐÄÀïÂéµÃÂÒÆß°ËÔã¡£
    ÕÒÁ˺öà×ÊÁÏ£¬ÖÕÓÚÔÚÕâÀïÕÒµ½ÁËÐèÒªµÄ˵Ã÷£º
http://macrochen.javaeye.com/blog/246170
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html 
http://www.360doc.com/content/07/0727/14/27908_636504.shtml
    Ô­À´¿ÉÒÔÔÚpomÎļþÖÐÅäÖÃʱ¼Ó¸ö<scope>²ÎÊý£¬Ê¹ÓÃprovided¾Í¿ÉÒÔÆÚÍûÓ¦Ó÷þÎñÆ÷½«ÌṩÕâ¸öÖ§³Ö£¬È磬ÎÒÐèÒªjsp-apiºÍservlet-apiÖ§³Ö£¬ÔòÎÒ¿ÉÒÔÅäÖÃΪ£º
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>   <!--ÕâÀï˵Ã÷jsp-api.jarÎļþ½«ÓÉÓ¦Ó÷þÎñÆ÷Ìṩ£¬´ò°üʱ²»ÐèÒª°üº¬-->
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.1.2</version>   <!--ÕâÀïûÓÐÖ¸¶¨scope²ÎÊý£¬ËµÃ÷ĬÈÏ


Ïà¹ØÎĵµ£º

jspÁ¬½ÓoracleÊý¾Ý¿â

Ê×ÏÈÄãÒªÓÐtomcat,»¹ÒªÓÐoracle jdbcµÄjarµµµÈ»·¾³.
µÚÒ»²½:  дJSP
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@(des ......

JSP ÈÝÆ÷µÄ³õʼ»¯ºÍÏú»Ù ServletContext£¨×ª£©

ServletContext ±» Servlet ³ÌÐòÓÃÀ´Óë Web ÈÝÆ÷ͨÐÅ¡£ÀýÈçдÈÕÖ¾£¬×ª·¢ÇëÇó¡£Ã¿Ò»¸ö Web
Ó¦ÓóÌÐòº¬ÓÐÒ»¸öContext£¬±»WebÓ¦ÓÃÄڵĸ÷¸ö³ÌÐò¹²Ïí¡£ÒòΪContext¿ÉÒÔÓÃÀ´±£´æ×ÊÔ´²¢ÇÒ¹²Ïí£¬ËùÒÔÎÒËùÖªµÀµÄ
ServletContext µÄ×î´óÓ¦ÓÃÊÇWeb»º´æ----°Ñ²»¾­³£¸ü¸ÄµÄÄÚÈݶÁÈëÄڴ棬ËùÒÔ·þÎñÆ÷ÏìÓ¦ÇëÇóµÄʱºò¾Í²»ÐèÒª½øÐÐÂýËٵĴŠ......

jqueryÖ±½ÓÏÔʾjsp·µ»ØµÄÊý¾Ý

jQueryÊÇÄ¿Ç°Ò»¸öºÜÁ÷ÐеÄjs¿ò¼Ü£¬ËüÒ²ÌṩÁ˶ÔajaxºÜºÃµÄÖ§³Ö¡£Ê¹ÓÃajaxÒì²½ÇëÇóÊý¾Ýʱ£¬Èç¹û·þÎñÆ÷·µ»ØµÄÒ»¸öÁбíÊý¾Ý£¬Í¨³£µÄ×ö·¨ÊÇ°ÑÁбíÊý¾Ýת»»³Éjson¸ñʽµÄÊý¾Ý£¬È»ºó·µ»Øµ½Ò³Ã棬ʹÓÃjQuery½øÐнâÎö²¢Óñí¸ñÀ´ÏÔʾ£¬ÕâÒªÇóÄã¶Ôjavascript½âÎöjsonºÜÊì͸¡£
ÎÒÔÚÕâÀïÌṩһÖÖͶ»úÈ¡ÇɵÄ×ö·¨£¬Ê¹ÓÃjQuery·¢ËÍÒì²½ÇëÇó ......

×ܽ᣺JSPÒ³ÃæimgͼƬ»º´æÎÊÌâÏÖÏó±íÊö¼°ÎÊÌâ½â¾ö

JSPÒ³ÃæimgͼƬ»º´æÎÊÌâÏÖÏó±íÊö¼°ÎÊÌâ½â¾ö
l  ÎÊÌâ±íÊö£º
µ±¶Ôº¬ÓÐÍ·ÏñµÄ¿Í·þÈËÔ±ÐÅÏ¢½øÐÐÐÞ¸Ä(º¬¶ÔÍ·ÏñÐÅÏ¢µÄÐÞ¸Ä)ºó£¬ÖØдò¿ªÊý¾ÝÐ޸ĽçÃ棬·¢ÏÖÎı¾ÄÚÈÝÐ޸ijɹ¦£¬¶øÍ·ÏñÄÚÈÝÈÔÈ»ÏÔʾΪԭÀ´µÄÍ·Ïñ——Êý¾Ý¿âÖеĶÔÓ¦ÐÅϢͷÏñËùÔÚ×Ö¶ÎÊý¾ÝÒѾ­³É¹¦¸üС£
 
l  Ç°Ì᣺
jspÒ³ÃæÖнøÐÐÁËҳà ......

jspÁ¬½Óoracle£¨javabean£©


package DBbean;
import java.sql.*;
public class ConnBean
{
private Connection con;
//³õʼ»¯Á¬½Ó¡£
public ConnBean()
{
        
  try
  {
   Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ