Creating Java Web Applications for Sending Embedded Images, Page 3
Creating and Deploying the WAR File
Create a WAR file by right-clicking on your project and then clicking Run Packaging. You will have to right-click on the project and click Refresh before you see the WAR file. The file should be in the top level of your project.
Right-click on the WAR file, select Deployment, and then Deploy To. You will see a Target Choice dialog appear, allowing you to select which application server you would like to deploy to. I have JBoss 4.0.4 configured on my machine. After selecting the target configuration, you should see a dialog that confirms that the application was deployed.
Figure 1 shows the directory structure of the project in the package explorer view in Eclipse. Try to keep the structure similar to what is shown in the figure to avoid any errors and conflicts when following the steps in the article.
Figure 1: View of the Package Explorer
Running Your Application in a Browser
Now, open your Web browser and try it out. Type http://127.0.0.1:8080/embed/pages/EmbedEmail.jsp or http://localhost:8080/embed/pages/EmbedEmail.jsp. to run the Web application you just built.
I hope this application has let you practice making a Web-based application with an e-mail facility very quickly and easily. It can be modified and enhanced by the readers according to their needs.
About the Author
Fatima Ahmed has been working on C#, JSP, Servlets and Java programming since 2002 and also teaches an object-oriented course in the Computer Science Department at a university using the Java and C# languages. She likes to share her knowledge with others; therefore, she frequently writes articles and papers. Her interests include learning, teaching, adventure, and traveling.