Browse Month: April 2017

How to Create Dynamic Web Project using Eclipse and Tomcat Server?

This tutorial is going to explain step by step, how to create a dynamic web project and how to print ‘Hello World’.

Tools used.

Eclipse Mars 4.5.2 – http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars2

Tomcat Server 8.0 – https://tomcat.apache.org/download-80.cgi

1. Dynamic Web Project

2. WebApp > click ‘Next’

3. Click ‘Next’

4. Click ‘Finish’

5. WebContent > New > JSP File

6. Create JSP file > index.jsp > Click ‘Next’

 

7. Click ‘Finish’

8. Add JSP file to <h1>Hello World</h1>

9. Adding Tomcat Server

 

Servers tab, right click New > Server

10. Click ‘Finish’

11. index.jsp > Run As > Run on Server

12. Click ‘Next’

13. Click ‘Finish’

14. http://localhost:8080/WebApp/index.jsp

How to Create Maven project using Eclipse?

The simple tutorial will show, how to create a simple Maven project using Eclipse IDE.

Tools, I have used.

  1. Eclipse Java EE
  2. Apache Maven and
  3. Java

Make sure, and all the above tools are installed and configured correctly.

Step: 1

File > Maven Project

Click ‘Next’ button.

Step: 2

Click ‘Next’ button.

Step: 3

Click ‘Finish’ button.

 Step: 4

Maven project is created.

Step: 5

pom file > Run As > Maven build

 

Results:

[INFO] Scanning for projects…

[INFO]

[INFO] ————————————————————————

[INFO] Building MavenTest 0.0.1-SNAPSHOT

[INFO] ————————————————————————

[INFO]

[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ MavenTest —

[INFO] Deleting C:\WorkspaceMaven\MavenTest\target

[INFO] ————————————————————————

[INFO] BUILD SUCCESS

[INFO] ————————————————————————

[INFO] Total time: 0.720 s

[INFO] Finished at: 2017-04-22T14:03:45-04:00

[INFO] Final Memory: 6M/149M

[INFO] ————————————————————————

[WARNING] The requested profile “install” could not be activated because it does not exist.