天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

快速建立Servlet和JSP的運行、調試和編譯環境

相信很多剛開始學習Servlet和JSP的朋友都有一個困擾,就是如何快速方便的建立一個Servlet和JSP的運行、調試和編譯環境。本人現在正在國外攻讀MIT(Master of Information Technology),現在選修的這一科是WBIS(Web Based Information Systems),其包含了許多種技術,如Java,Perl,CGI,Servlet,ASPJava Script,JSP,OO,UML等等。下面的這篇文章是學校所提供的相關軟件的下載地址、安裝方法以及相關說明,其中的所需的軟件(學校已經給我們提供了CD)我已經全部安裝并測試過。這里,我極力推薦給大家,因為整個安裝過程非常的簡單,只要按照下面文章中的方法一步一步做,100%可以成功,相信會給你帶來幫助。雖然文章是全英文的,但很簡單,相信大家都能明白。如果有什么問題,希望大家能提出來我們一起討論。







(注:文章中所提到的四個軟件分別是JDK 1.3.1,BlueJ 1.2.0,Apache Tomcat 4.0和bluej_tomcat_config.zip。其中BlueJ是用來創建、編譯Servlet的,而最后那個zip文件則是配置BlueJ和Tomcat的。)







BlueJ, Jakarta Tomcat and Java 2 SDK Installation







1. Install the Java 2 Software Development Kit (JDK)







It is recommended that you install JDK 1.3.1, which can be downloaded from here(http://www.csu.edu.au/faculty/sciagr/sis/subjects/itc357/j2sdk-1_3_1-win.exe), or from http://Java.sun.com (unfortunately it is a 30M download so if you have a slow modem it may be better to acquire it on CD. For example, there is a CD containing JDK with many Java text books).







Install JDK to the default directory, which is c:/jdk1.3.1







You may use a different version of JDK (1.2 or later) but you will need to change the Tomcat configuration files startup.bat and shutdown.bat to point to the directory location.







2. Install BlueJ (BlueJ is a basic Java editing and compilation environment that sits on top of JDK)







It is recommended that you install BlueJ 1.2.0, which can be downloaded from here(http://www.csu.edu.au/faculty/sciagr/sis/subjects/itc357/bluejsetup-120.exe) or from http://bluej.org







Install BlueJ to the default directory c:/BlueJ







If you install a different version of BlueJ or place it in a different directory the configuration files provided in bluej_tomcat_config.zip will not automatically go into the correct directories and you will have to manually extract each one.







3. Install Apache Tomcat (Tomcat is a Java web application server and will allow you to test your Servlets and JSP files locally)







It is recommended that you install Apache Tomcat 4.0, which can be downloaded from here(http://www.csu.edu.au/faculty/sciagr/sis/subjects/itc357/jakarta-tomcat-4.0.4.exe) or from http://jakarta.apache.org/







Install Tomcat to the default directory c:/Program Files/Apache Tomcat 4.0







If you install a different version of Tomcat or place it in a different directory, you will need to configure it manually as the configuration files provided in bluej_tomcat_config.zip will not automatically go into the correct directories and various paths settings contained in them will not be correct.







4. Configure BlueJ and Tomcat to work together







The recommended way to do this is to download the file bluej_tomcat_config.zip(http://www.csu.edu.au/faculty/sciagr/sis/subjects/itc357/bluej_tomcat_config.zip) and extract the files to the root directory on drive c:, making sure that you choose the option to use folder names.







If you need to manually configure BlueJ or Tomcat, you need to troubleshoot problems or you want to examine the configuration options chosen, they are explained here.



Compiling and Running Servlets on Your Local Machine







1. Run BlueJ and open the existing project in the c:/Program Files/Apache Tomcat 4.0/webapps/testing/Web-inf/classes directory







2. Create a new class and enter the code for your servlet, or use Edit-Add class from file to import an existing servlet source file.







3. Compile the servlet.







4. Start tomcat by double-clicking on startup.bat in the c:/Program Files/Apache Tomcat 4.0/bin directory. This will start Tomcat listening on port 8080 on your local machine (you don't need to be online).







5. Start up your web browser and open the URL http://localhost:8080/testing/servlet/Servletname where Servletname is the name of your servlet.



File locations and relative references within local and remote servlets







HTML files located in a directory like c:/Program Files/Apache Tomcat 4.0/webapps/testing will be accessible through a URL like http://localhost:8080/testing/filename.html







Similarly if you place an HTML file in your home directory on the SWAP server it will be assessible through a URL like http://swap.csu.edu.au:8080/username/filename.html







If you need to place an image in a page generated by a servlet, you can place it in c:/Program Files/Apache Tomcat 4.0/webapps/testing (or on the swap server in your home directory) and refer to it in the HTML as ../imagename.jpg (eg. <IMG SRC="../imagename.jpg">)







If you need to link to another servlet or specify another servlet within the ACTION attribute of a form, you can simply use the servlets name. For example you could use the code <A HREF="OtherServlet"> to link to another servlet assuming that you have a file in the testing/Web-inf/classes directory called OtherServlet.class (or in your Web-inf/classes directory on the SWAP server)







If you have a static HTML page that has a link to a servlet or a form with an ACTION attribute that refers to a servlet, and the HTML page is located in the c:/Program Files/Apache Tomcat 4.0/webapps/testing directory or in your home directory on the SWAP server, use the URL servlet/ServletName to refer to the servlet (eg. ACTION="servlet/ServletName").







It is recommended that you use relative references like these in your HREF, SRC and ACTION attributes so that you can easily move your pages from the local machine to the server.

jsp技術快速建立Servlet和JSP的運行、調試和編譯環境,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产亚洲精品久久77777 | 日本视频一区二区免费观看 | 狼人大香伊蕉国产WWW亚洲 | 欧美成ee人免费视频 | 色www.亚洲免费视频 | 精品一品国产午夜福利视频 | 国产精品久人妻精品 | 亚洲视频免费看 | 国产av在线看的 | 果冻传媒视频在线播放 免费观看 | 天天爽夜夜爽8888视频精品 | 亚洲精品国产第一区第二区 | 一二三四在线播放免费观看中文版视频 | 神马电影我不卡4k手机在线观看 | 一边亲着一面膜下奶韩剧免费 | 永久免费在线看mv | JK白丝校花爽到娇喘视频 | 精品国产自在天天线2019 | 久久99热只有频精品 | 成人午夜精品无码区久久漫画日本 | 久久成人伊人欧洲精品AV | 国产精品久免费的黄网站 | 99热这里只有的精品 | 成人a视频片在线观看免费 成人a毛片久久免费播放 | 厨房玩朋友娇妻中文字幕 | 人妻插B视频一区二区三区 人妻 中文无码 中出 | 大相蕉伊人狼人久草av | 某上海少妇3P黑人完整版BD | 一个人看的www视频动漫版 | 精品亚洲欧美中文字幕在线看 | 天堂无码人妻精品AV一区 | 中文字幕不卡一区二区三区 | 伊人久久大线蕉香港三级 | 国产精品大全国产精品 | 性欧美videos俄罗斯 | 小寡妇好紧进去了好大看视频 | 91精品国产色综合久久 | 91久久精一区二区三区大全 | 手机看片成人 | 美女国产毛片A区内射 | 中文字幕乱偷无码AV蜜桃 |