데이터 베이스 MySQL 튜토리얼 快速建立Servlet和JSP的运行、调试和编译环境_MySQL

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

Jun 01, 2016 pm 02:09 PM
the 설립하다 빠른 환경 엮다 디버그 달리다

servlet

   相信很多刚开始学习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 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. 快速建立Servlet和JSP的运行、调试和编译环境_MySQL)







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 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.

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
2 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
2 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

C++ 함수 디버깅에 대한 자세한 설명: 다중 스레드 함수의 문제를 디버깅하는 방법은 무엇입니까? C++ 함수 디버깅에 대한 자세한 설명: 다중 스레드 함수의 문제를 디버깅하는 방법은 무엇입니까? May 02, 2024 pm 04:15 PM

C++ 다중 스레드 디버깅은 GDB를 사용할 수 있습니다. 1. 디버깅 정보 컴파일을 활성화합니다. 2. 중단점을 설정합니다. 3. 스레드를 보려면 infothread를 사용합니다. 4. 스레드를 전환하려면 next, stepi 및 locals를 사용합니다. 실제 사례 디버깅 교착 상태: 1. threadapplyallbt를 사용하여 스택을 인쇄합니다. 2. 스레드 상태를 확인합니다. 3. 기본 스레드를 한 단계씩 진행합니다. 4. 교착 상태를 해결하기 위해 액세스를 조정합니다.

LeakSanitizer를 사용하여 C++ 메모리 누수를 디버깅하는 방법은 무엇입니까? LeakSanitizer를 사용하여 C++ 메모리 누수를 디버깅하는 방법은 무엇입니까? Jun 02, 2024 pm 09:46 PM

LeakSanitizer를 사용하여 C++ 메모리 누수를 디버깅하는 방법은 무엇입니까? LeakSanitizer를 설치합니다. 컴파일 플래그를 통해 LeakSanitizer를 활성화합니다. 애플리케이션을 실행하고 LeakSanitizer 보고서를 분석합니다. 메모리 할당 유형과 할당 위치를 식별합니다. 메모리 누수를 수정하고 동적으로 할당된 모든 메모리가 해제되었는지 확인하세요.

golang 함수 디버깅 및 분석 바로가기 golang 함수 디버깅 및 분석 바로가기 May 06, 2024 pm 10:42 PM

이 기사에서는 실행을 일시 중지하고, 변수를 확인하고, 중단점을 설정하는 데 사용되는 내장 디버거 dlv를 포함하여 Go 기능 디버깅 및 분석을 위한 바로 가기를 소개합니다. 로깅 - 로그 패키지를 사용하여 메시지를 기록하고 디버깅 중에 확인합니다. 성능 분석 도구 pprof는 호출 그래프를 생성하고 성능을 분석하며, gotoolpprof를 사용하여 데이터를 분석합니다. 실제 사례: pprof를 통해 메모리 누수를 분석하고 호출 그래프를 생성하여 누수를 일으키는 함수를 표시합니다.

Java 람다 표현식에서 효율적인 디버깅을 수행하는 방법은 무엇입니까? Java 람다 표현식에서 효율적인 디버깅을 수행하는 방법은 무엇입니까? Apr 24, 2024 pm 12:03 PM

효율적으로 Lambda 표현식을 디버그합니다. IntelliJ IDEA 디버거: 변수 선언이나 메서드에 중단점을 설정하고, 내부 변수와 상태를 검사하고, 실제 구현 클래스를 확인합니다. Java9+JVMTI: 런타임 JVM에 연결하여 식별자를 얻고, 바이트코드를 검사하고, 중단점을 설정하고, 실행 중에 변수와 상태를 모니터링합니다.

Java 동시 프로그래밍에서 동시성 테스트 및 디버깅을 수행하는 방법은 무엇입니까? Java 동시 프로그래밍에서 동시성 테스트 및 디버깅을 수행하는 방법은 무엇입니까? May 09, 2024 am 09:33 AM

동시성 테스트 및 디버깅 Java 동시 프로그래밍의 동시성 테스트 및 디버깅은 매우 중요하며 다음 기술을 사용할 수 있습니다. 동시성 테스트: 단위 테스트: 단일 동시 작업을 격리하고 테스트합니다. 통합 테스트: 여러 동시 작업 간의 상호 작용을 테스트합니다. 부하 테스트: 부하가 심한 상황에서 애플리케이션의 성능과 확장성을 평가합니다. 동시성 디버깅: 중단점: 스레드 실행을 일시 중지하고 변수를 검사하거나 코드를 실행합니다. 로깅: 스레드 이벤트 및 상태를 기록합니다. 스택 추적: 예외의 원인을 식별합니다. 시각화 도구: 스레드 활동 및 리소스 사용량을 모니터링합니다.

PHP 비동기 코드를 디버깅하는 방법 PHP 비동기 코드를 디버깅하는 방법 May 31, 2024 am 09:08 AM

PHP 비동기 코드 디버깅을 위한 도구는 다음과 같습니다. Psalm: 잠재적인 오류를 찾는 정적 분석 도구입니다. ParallelLint: 비동기 코드를 검사하고 권장 사항을 제공하는 도구입니다. Xdebug: 세션을 활성화하고 코드를 단계별로 실행하여 PHP 애플리케이션을 디버깅하기 위한 확장입니다. 다른 팁으로는 로깅 사용, 어설션, 로컬에서 코드 실행, 단위 테스트 작성 등이 있습니다.

PHP 디버깅 오류: 일반적인 실수에 대한 가이드 PHP 디버깅 오류: 일반적인 실수에 대한 가이드 Jun 05, 2024 pm 03:18 PM

일반적인 PHP 디버깅 오류는 다음과 같습니다. 구문 오류: 코드 구문을 확인하여 오류가 없는지 확인하세요. 정의되지 않은 변수: 변수를 사용하기 전에 변수가 초기화되고 값이 할당되었는지 확인하세요. 세미콜론 누락: 모든 코드 블록에 세미콜론을 추가합니다. 함수가 정의되지 않았습니다. 함수 이름의 철자가 올바른지 확인하고 올바른 파일이나 PHP 확장이 로드되었는지 확인하세요.

C++ 함수 디버깅에 대한 자세한 설명: 예외 처리가 포함된 함수의 문제를 디버깅하는 방법은 무엇입니까? C++ 함수 디버깅에 대한 자세한 설명: 예외 처리가 포함된 함수의 문제를 디버깅하는 방법은 무엇입니까? Apr 30, 2024 pm 01:36 PM

예외 처리가 포함된 C++ 디버깅 함수는 예외 지점 중단점을 사용하여 예외 위치를 식별합니다. 예외 정보와 스택 추적을 인쇄하려면 gdb에서 catch 명령을 사용하십시오. 예외 로거를 사용하여 메시지, 스택 추적 및 변수 값을 포함한 예외를 캡처하고 분석합니다.

See all articles