JSP Application Development Project Tutorial Chapter 1 Practice Questions and Answers

1. Briefly describe the functions of each directory under the Tomcat server installation path.

[reference answer]

Taking Tomcat6.0 as an example, list the functions of its subdirectories:

(1) \bin\-----------------Some executable files and batch files in Tomcat,

Used to start, stop services, etc.

(2) \cong\---------------- Store various global configuration files in Tomcat.

(3) \lib\---------------Tomcat runtime library file.

(4) \logs\----------------running log.

(5) \temp\----------------Temporary directory.

(6) \webapps\----------- project release directory.

(7) \work\--------------- Store the Java code and class generated after JSP compilation.

2. Summarize the process of creating, publishing, and running Web projects in the MyEclipse environment.

[reference answer]

The first step is to create a project: create or select a workspace (Workspace, workspace), and the default view after entering is MyEclipse view. Select [File] → [new] → [Web Project], and then the window for creating a Web project will appear. Fill in the project name such as test in [Project Name], and click [finish] to complete;

The second step, project coding: (creating JSP pages, etc.) slightly;

The third step is to publish the project:

First, configure the external server. Select the [Preferences] option under [Window] in the MyEclipse menu to enter the configuration environment interface. In the left toolbar, select [Myeclipse] → [Servers] → [Tomcat] to perform related configurations.

Second, the publishing process. After the server configuration is complete, select the release tool in the toolbar to deploy the project to Tomcat.

Finally, start the project. After the project is successfully released, select the server startup tool in the tool bar to select the configured server and start the server. Enter the project address "http://localhost:8080/test/index.jsp" in the address bar to start the project.

3. In MyEclipse, sometimes when the Tomcat server is started after the project is published, the error "java.net.BindException: Address already in use: JVM_Bind<null>:8080" as shown in Figure 1.11 will be reported. Please take stock according to the knowledge you have learned and the error prompt What kind of error is this and how to fix it.

[reference answer]

It means that the Tomcat server has not been stopped after it has been started, and this situation will occur when the server is restarted again.

When this happens, first stop the server and then restart it. If this situation still occurs, you can close the MyEclipse development tool, and use ctrl+alt+del to enter the task manager, select the process option, check whether the Tomcat process in the system service is closed, if not, please stop the service and restart Just start it.

Guess you like

Origin blog.csdn.net/m0_63394128/article/details/125761549