Javaweb core programming using Eclipse Development Javaweb Project

Source: Internet
Author: User

Article Directory

1.eclipse switching to a Java EE project

2. Create server (if no server option, what to do)

3. Customizing new panel Content

4. Create a Dynamic Web project

1.eclipse switching to a Java EE project

2. Create server (if no server option, what to do)

In general, there is a service action card in the lower half of eclipse, if there is no

Here is a hint, click

3. Customizing new panel content

4. Create a Dynamic Web project

File->new->dynamic Web Project

Project Name:helloworld (remaining default)->next->next-> (Generate Web. XML deployment descriptor) tick the checkmark->finish

New Package Com.helloworld.test

New Class Helloworld.java

1  Package com.helloworld.test; 2 3  Public class HelloWorld {45      Public String SayHello () {6         return "SayHello"; 7     }8 }

New hello.jsp under WebContent

1 <%@page Import="Com.helloworld.test.HelloWorld"%>2 <%@ Page Language="Java"ContentType="text/html; charset=iso-8859-1"3 pageencoding="iso-8859-1"%>4 <!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd ">5 <HTML>6 <Head>7 <Metahttp-equiv= "Content-type"content= "text/html; charset=iso-8859-1">8 <title>Insert Title here</title>9 </Head>Ten <Body> One <% A HelloWorld HW= NewHelloWorld (); - System.out.println (Hw.sayhello ()); - %> the </Body> - </HTML>

Right-Hello.jsp->run As->run on service-> all the way to the next and see the results

This is the way that normal development is used

Javaweb core programming using Eclipse Development Javaweb Project

Related Article

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.