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.
- Your machine is a Java Virtual Machine. that is you have already setup your machine into Java environment.
- You have basic understanding of the Java Development and its concepts.
- You have enough experience on how to configure and run the Apache Tomcat server. Hope your server runs on http://localhost:8080
- 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)
- You have simple understanding of maven build tools.
I have create this web application structure using maven building tool, using the following archetype
mvn archetype:generate -DgroupId=com.nifrasismail.com
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…..