eclipse JDBC连接数据库及jsp操作数据库数据详细教程.docx
找如你是一个对这些东西一窍不通的同学,而且已经在网上查阅了各种资料,还是没做til来加么我吊学母CX文或川以是个终结.MyEcIipseRunWndow环境win7ESqlser还有s<InyeCliTomcaJdbcJdk(默”MewWindowNewEditorOpenPerspectiveShowViewCUStOmePerspective.5vePerspective's.ReietPerspectiveCkWePerspectiveCloseAllPerspectivesNavigationWorlingSetsWebBrowserPrefaences.一点也不了解,都是自己一点一行了,后来有人说发到网上吧,£择混合方式即有windows号份rtup.bat双击即可se、tomcat)Ok打算工作。了,起先做:1、安装jdk怎么配置路径自己网查吧,我写在这里也是复制的教程特殊多比较荷单2、Tomcat电的bin有个如up.bat双击即可,在阅读器中输入出现下图就算是胜利rW*rMngtMp9*awbbrw>v>R*mywVm¾vTaeKatauccM*yCoeratUtkM'悠mzr*ejnMJ6HfiZ<XMlTc*<Mf<mAIon»WtOMravMvttf4TU三aJKWWtXR*WTMJC.htMXVtMaICATAlX*WOMFZg(fZYdUMKe5Bfpt11"m0HVMEtf«M»«2rMHvt*MStwlfit>rtfawy*(4«TyWt*M*WM*v*MV119V¼WM<C>>>jMMP»JMdnQHeMt«*He<MCiMC*to.yUfyw->,jup3224nnM>x¼x*MOTt,«rewy,wcrn.twvwh*vbwr*WMtuwf*mv,.«tOB*JHUttl.««/1,MMdCBM*mwemvc8MKIZSPsiKMflM”(BKEtrer*eXE*M*y05*a>UOsr>Mwv»MDw(4mr«vutrwMMBMMM*IWhmfMf WMfYflttfTCftV<h9»»RWom9ttrM>Micv*9*gandSTC M<tf*cM«<*»MtargonTcnotnw*IW<g!RC<3、安装myeclipse和配置tomcat及之相连后动MyEcIipse选择Window->Preferences.在冲出的窗I选择MyEclipsc->ApplicationScncrs->Tomcat6(这里选择的tomcat必莒是你已羟胜利安奘的版本),选择TomcatHomeDirector>,右边的"Bmwsc”如图Preferencestypefilterte5ctJavaIsMyEdosc三Ap5caboServersTomcat6<108.囹.(S国*用ffi.bb.闺08.倒田囹囹BeTigerGefOrtmo1Qasish1.JBoss2JBOSS3JBoss43tty4Mty5xi53Jonas4JRun4OracteASOrion1Orlon2Resin2Resn3SunJaVaSystemAcokattonServ<SunJavaSystemApplicationServtSunJovaSystemArokotKxiSorvcTOmCdt4TomcatSTomcatServerOEnabte®DiMbteTorrtCatIReslorc(efAUUppyIomcatbTomccServerErWeQ5UcI纵QW<TOmCaHomeDrectory更l,选疥Eo选齐选择/OracleASOnon13tOrionZR5n2好RK3tSmJavaSystemApatonSetv<S3avaSystemApkationServe±SunJavaSystemApp4ationServe磁Tcmcat4王T8K&5ITomcate"王WeaOggTonxatServernaWaODttabteTocncatHomeDirectoryTomcat8aseDirectoryTomcatTempDrectoryOptionalProgram2qUrnenbC:ITCmCt6.0UITCnK6.0C:ITOnKat6.0te<rIMOeSe里。神转Igro*seWettogc7£WeUogic8Wettogc9应WcbSphere-4±VVetSgere5,WcbSpherc6±WebSphere6.1802ilBExptoretFios&EditorstInternetTookt)J2EEProjectaPrnmrfOnAHWirIRertOceulte>lyI族IICanCel选中TomCat6中的JDK一项.这里要特殊留意,默认的是JRE的运行环境,这里要设定成JDKMr否则,MyEdiPSC无法正常部属WCb版用.也无法正常运行IbmartJR务蒙.我们点击Add按钮ereesJDKTcmcatJDKnameIyel.5.0J)6IOptionalJavaVMAfgjrrfent5typeftkcrtext±5JavaSystemApPkatSServe*SunAavaSystemARkatigServe£Tomcat4TomcatST<xnc4t6-JDK1.dunchPaths国Weblogic6±Web1.ogc70WcblogiC8是(依据个人书目不同),其他的默认,点击OK按钮在TomCalJDKNamC中选择我们刚才创建的那个,就是jdkl50J)6点击APPly按钮,每次都点吧,有时候EdiPSe出河题,你不点这个跑到另一个配汉页面就会丢失上面的配汽referencestypemtextMOteSUX(1.5.006后SunJavaSystemAppkationServe1先SJavaSystemA卬ltatxServeGETocncat4他TocncatS密TOfnC以6JDK0t3aiJavaVWArgurrtentst*±.,IaJnChPathsWeb1.ogic6VZeb1.ogic7Web1.ogic8VZeb1.ogic9WebSchcrc4VZebSphere5WebSchcre6VZebSphere6.1JCXVUtudMchiemustSPeCfyaFdlJDKinstallation.SpwifytigaJREvdlre$ultinanSurtUPexception.bjgzibReaoreefodt5PPy11u>>aOiiavm<vv1.J八ix-*rjMuvc>vnnrr.r><,在弹出的窗I选择webProject,选择NCXt进入下步划Zaras:IlypefiUrSd、.EJBProfect口EnterpriseAppIkaUcnProject虑JaVaPfOleCt去JavaProjectfromExlstngAntBufdfleJ>Mg-nProjectWebProject占VZebServiceProject '1.>General品&CVS方e*Java i卷Myfdipe iHQ<nDevctopmcrtOgho*vAllVzard5.©<Back1.J×t>什yreiiCd一领人制111已的,小女也知人WCn心,j(他按默认,选舞"Fin认h”完成工程的创建。NewJ2EEWebProjectCreateWebprojectJZfESpwifkaUonlevdOJZEE1.30l4<dtjJSl1.SupportAddJSnIbCarieStoWEB-INF/ibSHeC完成Wcb工程的创建并生成的相关文件佶息:MyfclipscJ2EEDevelopment-MyEcfipsc1.ntcrpriscV/orkbcncHeEdtSourceRefactcrMavigateSearchPfoiectFtIyEcIpseRunWi一AU::古SG,力fMImage.Snppets°三,ProblemsWebBrowsCrConsoleServer疏Tomcate文件.如卜图:3SrcJRESystemUbroryjrel.6.J2EE1.4UbraryContanerIW5S3S3I=Ja-MEIAINew11jPlOjert.诧M-WEB-;GoIrtOOpecCNeVJWirvdwHrP*geClassWIg)copy助CopyQuaiifedNameSEte×DeleteQrkCQrl+VDd&eOInterface5ScmjtccFoWerCSFcrfder1.?HeBUkjPathRefaClOr>凶AWM*HTM(AdvancedTemplMes)lKJSP(AdverxedTe11d<e)jIrrport.©Servlet囹S选择“Finish”完成JSP文件的创建得Pa.汉He.:二0.日/R=点VZebTest1.SsrcJRESystem1.traryj王4J2EE1,1.braryCOnl三(WebRootC1.META-INF2)MANIFE51.MISbWEB-INF1.lt>XVAeb.xml附即所"三lm.K"Sm.*,0v<0pagelanguagenyavawmport三,java.utll.,rpageEncodlng=,ISO-8859-1,F<*Stringpathrequest.gecConcextPath();StringbasePath三request.gecS