
If you have added a server to Eclipse, you can also run the application in Eclipse. Note: By naming the file index.jsp, there will be no need to modify the welcome-file-list section of the web.xml file, because there should also be a default document for index.jsp.

Add the text Hello World to the index.jsp file. The index.jsp file should now be listed under the WebContent folder in the left panel of Eclipse. This is only needed if you are going to be exporting the WAR and deploying the WAR onto an Application Server (e.g. You may need to also right click on the project, select Properties, select Deployment Assembly, and add. You may need to right click on the project, select Properties, select Java Build Path, and add. Select the WebContent folder, give the file a name such as index.jsp, and select Finish. In the left panel of Eclipse, right-click on myApp and select New > JSP File. At the Web Module prompt, check Generate web.xml deployment descriptor and select Finish. Give your project a name, such as myApp, setup a server target runtime, and select Next.Īt the Java prompt, select Next.

In Eclipse, select File > New > Dynamic Web Project. If you do not have an option to select Dynamic Web Project, select Help > Install New Software, select a site from the drop down, and then select the following:

When possible, I like to ensure that Eclipse is configured with the same Java Runtime Environment (JRE) as the application server. Almost always, you will be deploying your Java application to an application server such as JBoss, Tomcat, or WebSphere.
