快速建立Servlet和JSP的运行、调试和编译环境

2016-01-29 12:23 3 1 收藏

快速建立Servlet和JSP的运行、调试和编译环境,快速建立Servlet和JSP的运行、调试和编译环境

【 tulaoshi.com - Java 】

  相信很多刚开始学习Servlet和JSP的朋友都有一个困扰,就是如何快速方便的建立一个Servlet和JSP的运行、调试和编译环境。本人现在正在国外攻读MIT(Master of Information Technology),现在选修的这一科是WBIS(Web Based Information Systems),其包含了许多种技术,如Java,Perl,CGI,Servlet,ASP,Java 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 FilesApache 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 FilesApache Tomcat 4.0webappstestingWeb-infclasses directory

来源:https://www.tulaoshi.com/n/20160129/1485910.html

延伸阅读
标签: Web开发
Java Servlet及其特点 Servlet是Java技术对CGI编程的回答。Servlet程序在服务器端运行,动态地生成Web页面。与传统的CGI和许多其他类似CGI的技术相比,Java Servlet具有更高的效率,更容易使用,功能更强大,具有更好的可移植性,更节省投资(更重要的是, Servlet程序员收入要比Perl程序员高:-): 高效: 在传统的CGI中,每个请求都要启...
标签: Java JAVA基础
  Windows98,Windows NT 4.0,Windows 2000 professional,windows 2000 server等 jdk1_2_2-001-win.exe tomcat.zip(3.1) 一、软件下载 JDK http://java.sun.com/products/jdk/1.2/ Tomcat http://jakarta.apache.org/builds/tomcat/release/v3.1/ 二、软件安装 (一)JDK 1、...
标签: Web开发
首先是下载工具: 我建议初学者用Editplus+JDK,我觉得如果用例如JB,Eclipse,JCreator,虽然刚开始的时候比较方便,但是确使初学者门不知道怎样配置环境变量,从而难以达到知其然,知其所以然的地步。 可以通过如下地址下载: Editplus(最新版本是v2.11):http://count.skycn.com/softdown.php?id=3641&url=http://...
标签: Web开发
1.3 编译一个servlet   你如果写好了一个servlet你现在想把它编译成一个class文件该如何操作; 首先你要确认servlet-api.jar是不是配置到你的classpath之下。然后你可以像编译其他java源文件一样用javac 命令进行编译;(注意:一个servlet必须打包并且放置在classpath之下) · Tomcat 5 支持 servlet API 2.4;  jar文件...
标签: Web开发
FCKeditor是sourceforge.net上面的一个开源项目,主要是实现在线网页编辑器的功能,可以让web程序拥有如MS Word这样强大的编辑功能。官方网站为http://www.fckeditor.net ,在服务器端支持ASP.Net、ASP、ClodFusion、PHP、Java等语言,并且支持IE 5+、Mozilla 、Netscape等主流浏览器。 首先在官方网站下载fckeditor,注意有两个包,一个是主...