Simple j2EE Web Application Development - HelloWorld

I straight away jump into the deployment of a simple j2EE web application. I assume you already know about the following tasks and you did it.

  1. Your machine is a Java Virtual Machine. that is you have already setup your machine into Java environment. 
  2. You have basic understanding of the Java Development and its concepts. 
  3. You have enough experience on how to configure and run the Apache Tomcat server. Hope your server runs on http://localhost:8080 
  4. You know the basics of you Eclipse or any IDE which supports for Java application development. (you may the fan of notepad or notepad++ Don't worry) 
  5. You have simple understanding of maven build tools.

Lets begins. 

I have create this web application structure using maven building tool, using the following archetype 

mvn archetype:generate -DgroupId=com.nifrasismail.com
-DartifactId=Exmaple1
-DarchetypeArtifactId=maven-archetype-webapp 
-DinteractiveMode=false

If you are using Eclipse as your IDE. you need to import eclipse settings, for this using the following mvn command to import the settings from the maven repository.

mvn eclipse:eclipse -Dwtpversion=2.0

Yeah! you done. you create the basic structure now. Import the project into Eclipse IDE. 

Hope you will get the structure like this below


















If you are not get like this. Don't worry create the folders and files manually and create it. 

Let's run the project and see whether it is work or not. Ok. to build your project open your pom.xml in Eclipse IDE and right click, from the opened context menu Run As Maven build.















Then you will get a war file in your target folder. Deploy this folder into your /webapps directory of tomcat. 

Then run your application using http://localhost:8080/Example1/ 

Hope you would be get the HelloWorld page like as below










Yeah! You Did it. Let's meet with another session. 

Thank you for reading.....


Comments

Popular posts from this blog

Missionaries & Canibal Problem in AI using Pro Log

Hide the navigation bar in jHipster Angular 2

Spring Boot - No Need to Restart the Development Server for Each Time