Remember the first GET request for Java learning.

Source: Internet
Author: User

Environment, variables and tools:

1.java jdk1.8.x

2.tomcat 8.5.11

3. Environment variable: Catalina_home:tomcat Install address java_home:jdk install address path:jdk\bin\ directory CLASS_PATH:JDK dt.jar Tools.jar package Directory

Tool: Eclipse:java EE version developers.

In Eclipse Introduction tomcat:windows---perferences---server----runtime environm--add Choose the version you installed.

Create a new Dynamic Web project.

A new class file is created under the SRC directory, and the contents of the new classes file are processed for get post requests.

Create a new JSP file, write an Ajax GET request,

Under the Web-inf folder, create a new Web. xml file management class that points to

Add the naming and pointing of classes between Web-app

<servlet>
<servlet-name>getname</servlet-name>
<servlet-class>panwei.getname</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>getname</servlet-name>
<url-pattern>/getname</url-pattern>
</servlet-mapping>

Turn on the Tomcat run button

Open Browser: Localhost:8080/namespace (Panwei)/index.jsp

success~

Remember the first GET request for Java learning.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.