Graphical use Eclipse3 + Sysdeo Tomcat Plugin editing and debugging JSP (1)

xiaoxiao2021-03-06  91

This article mainly introduces how to use Sysdeo Eclipse Tomcat Launcher Plugin to edit and debug JSP and servlet, it is best to refer to my previous article.

"Graphical use Eclipse3.0.1 Lomboz3.0.1 Tomcat5.0.28 Development JSP" series can deepen the understanding of the article.

I. need software

Sysdeo Eclipse Tomcat Launcher Plugin

Homepage

Http://www.sysdeo.com/eclipse/tomcatplugin.html

download

http://www.sysdeo.com/eclipse/tomcatpluginv3.zip

This is an Eclipse plugin that helps to edit the JSP file.

Install plugin, reference

"Installing the Eclipse plugin using the LINKS"

2. Environmental configuration

In order to edit and debug JSP files, environmental configuration is a bit trouble, there are several points to pay attention.

1. Check the settings of the environment variable.

Right click on "My Computer" -> Advanced -> Environment Variable,

Check if java_home, whether the Tomcat_Home variable points to its installed directory;

Does the PATH variable contain "% java_home% / bin;";

Does the ClassPath variable contains "% java_home / lib / Tools.jar;"

2. Point the Java running environment in Eclipse to JDK, not JRE.

In the Eclipe main window, "Window" -> Preferences -> Java-> Installed JRE

3. Configure the Sysdeo Tomcat plugin

Context explanation

The Context element represents a web application and runs on a particular virtual host. Each web application is based on a Web Application Archive (WAR) file, or a directory containing the content after the WAR file is decompressed.

Match the URI's maximum possible prefix with each context path, Catalina selects the corresponding web application to process HTTP requests. Once selected, according to the servlet map defined in the Web Application Deployment Descriptor file, Context selects a correct servlet to handle the request. The servlet mapping must be defined in /web-inf/web.xml in the web application directory hierarchy.

You can nest any of the context elements in a host element. The path to each context must be unique and defined by the Path property. In addition, you must define a context path length of 0, which is called the default web application of the virtual host to handle those requests that cannot match any Context path.

In addition to nesting the Context element in the Host element, you can also store them in a single file (in .xml as a suffix), place below the $ CATALINA_HOME / CONF / [Enginename] / [Hostname] / directory.

(Note: Catalina is Tomcat notior)

Switch to Advanced Options

Switch to JVM Setting options

Switch to Tomcat Manger App to add a user to the management interface.

Click "Apply" and "OK".

4. Add "Tomcat Project" to the New menu.

Window -> Custom Perspective -> Shortcut -> New -> Java

Graphical use Eclipse3 Sysdeo Tomcat Plugin editing and debugging JSP (2)

Graphical use Eclipse3 Sysdeo Tomcat Plugin editing and debugging JSP (3)

转载请注明原文地址:https://www.9cbs.com/read-104808.html

New Post(0)