没有合适的资源?快使用搜索试试~ 我知道了~
(word完整版)计算机类外文翻译.doc
需积分: 5 0 下载量 110 浏览量
2022-10-24
01:49:33
上传
评论
收藏 56KB DOC 举报
温馨提示
试读
11页
(word完整版)计算机类外文翻译.doc
资源详情
资源评论
资源推荐
(word 完整版)计算机类外文翻译
1
外文原文
Introducing JSP、JAVA、Tomcat
By: Gary H。 Sockut, Balakrishna R。 Iyer
Source: Beginning JSP, JSF and Tomcat
Introducing JSP and Tomcat
Interactivity is what makes the Web really useful. By interacting with a
remote server , you can findthe information you need, keep in touch with your
friends, or purchase something online. And everytime you type something into a web
form, an application “out there” interprets your request and prepares a web page
to respond.
1。Installing Java
JavaServer Pages (JSP) is a technology that helps you create such dynamically
generated pages by converting script files into executable Java modules; JavaServer
Faces (JSF) is a package that facilitates interactivity with the page viewers; and
Tomcat is an application that can execute your code and act as a web server for
your dynamic pages.
Everything you need to develop JSP/JSF web applications is available for free
download from the Internet; but to install all the necessary packages and tools
and obtain an integrated development environment, you need to proceed with care。 There
is nothing more annoying than having to deal with incorrectly installed software。 When
something doesn’t work, the problem will always be difficult to find.
In this chapter, I’ll introduce you to Java servlets and JSP, and I'll show you
how they work together within Tomcat to generate dynamic web pages. But, first of
all, I will guide you through the installation of Java and Tomcat: there wouldn’t
be much point in looking at code you can't execute on your PC, would there?
You'll have to install more packages as you progress. Do these installations
correctly, and you will never need to second guess yourself. In total, you will
need at least 300MB of disk space for Java and Tomcat alone and twice as much
space to install the Eclipse development environment.To run all the examples
contained in this book, I used a PC with a 2.6GHz AMD Athlon 64x2(nothing fancy, nowadays)
with 1GB of memory and running Windows Vista SP2 。 Before performing any
installation, I reformatted the hard disk and re-installed the OS from the original
DVD。 I don’t suggest for a moment that you do the same! I did it for two opposite
(word 完整版)计算机类外文翻译
2
but equally important reasons: first, I didn’t want existing stuff to interfere
with the latest packages needed for web development; second, I didn’t want to rely
on anything already installed。 I wanted to be sure to give you the full list of what
you need。
2.Installing Tomcat
This is the Java web server, which is the servlet container that allows you to
run JSP。 If you have already installed an older version of Tomcat, you should remove
it before installing a new version.
Tomcat listens to three communication ports of your PC ( 8005 , 8009, and
8080)。 Before you install Tomcat, you should check whether some already-installed
applications are listening to one or more of those ports. To do so, open a DOS window
and type the command netstat /a. It will display a list of active connections in
tabular form。 The second column of the table will look like this:
Local Address
0。0。0。0:135
0。0.0.0:445
0.0。0。0:3306
The port numbers are the numbers after the colon. If you see one or more of
the ports Tomcat uses, after installing Tomcat, you will have to change the ports it
listens to.Here’s how to install Tomcat 7 correctly:
(1).Go to the URL http://tomcat。apache。org/download—70。cgi. Immediately
below the second heading (“Quick Navigation”), you will see four links:
KEYS,7.0.26, Browse, and Archives。
(2)。By clicking on 7.0.26, you will be taken toward the bottom of the same page
to a heading with the same version number。 Below the version heading, you will see
the subheading “Core”。 Below that, immediately above the next subheading, you will
see three links arranged as follows: 32-bit/64-bit Windows Service Installer (pgp,
md5).
(3).Click on 32—bit/64—bit Windows Service Installer to download the file:
apache-tomcat-7。0.26.exe (8。2 MB).
(4).Before launching the installer file, you have to check its integrity. To do
so, you need a small utility to calculate its checksum. There are several freely
available on the Internet. I downloaded WinMD5Free from http://www。winmd5。com/, and
it worked for me, but this doesn’t mean I consider it better than any other
similar utility. It just happened to be the first one I saw. The program doesn't
(word 完整版)计算机类外文翻译
3
require any special installation: just unzip it and launch。 When you open the Tomcat
installer file , you will see a 32-digit hexadecimal number very much like
this:8ad7d25179168e74e3754391cdb24679。
(5)。Go back to the page from which you downloaded the Tomcat installer and click
on the md5 link (the third one, and second within the parentheses)。 This will open
a page containing a single line of text, like this:
8ad7d25179168e74e3754391cdb24679 *apache-tomcat-7。0.26。exe
If the hex string is identical to that calculated by the checksum utility, you
know that the version of Tomcat installer you have downloaded has not been
corrupted or modified in any way.
(6)。Now that you have verified the correctness of the Tomcat installer, launch
it。
(7)。After you’ve agreed to the terms of the license, you will then see the dialog
shown in Figure 1—5. Click on the plus sign before the Tomcat item and select
“Service” and “Native” as shown in the figure before clicking on the “Next
>” button。
(8)。I chose to install Tomcat in the directory “C:\Program Files\Apache Software
Foundation\Tomcat” instead of the default “Tomcat 7。0". This is because sometimes
you might like to point to this directory (normally referred to as %CATALINA_HOME
%) from within a program, and one day you might replace Tomcat 7。0 with Tomcat
8.0. By calling Tomcat’s home directory “Tomcat" you are “safe" for years to
come. You can also decide to leave the default 。 In general , by using the
defaults, you are likely to encounter fewer problems, because the default settings
of any applications are always tested best!
(9).Next, the Tomcat installer will ask you to specify the connector port and UserID
plus password for the administrator login。 Leave the port set to 8080, because all
the examples in this book refer to port 8080. If you want, you can always change
it later to the HTTP standard port (which is 80). As UserID/Password, you might as
well use your Windows user name and password。 It is not critical。
(10)。Lastly, you will need to provide the path of a Java Runtime Environment. This
is the path you saw when installing Java (see previous section)。 With the version of
Java I installed, the correct path is C:\Program Files\Java\jre7.
3.What is JSP
JSP is a technology that lets you add dynamic content to web pages. In absence
of JSP, to update the appearance or the content of plain static HTML pages, you always
剩余10页未读,继续阅读
智慧安全方案
- 粉丝: 3679
- 资源: 59万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0