Skip to content

Development Guide

Fransiro edited this page Jul 20, 2016 · 2 revisions

Development guide.

This guide explain how to develop SendEmailWebApp on eclipse.

Table of Contents

  1. Install Eclipse
  2. Import the project
  3. Run developer server
  4. Important files

Install Eclipse.

The firts step is install eclipse.
Download from: http://www.eclipse.org/downloads/
Follow the next installation manual and install it: https://wiki.eclipse.org/Eclipse/Installation

Import the project.

Go to "File" -> "Import" in the open window select "Maven" and click on "Existing Maven Project", on next step choose the root directory (where the pom.xml of SendEmailWebApp project is located) and click finish.
The project is imported.
Import_SendEmailWebApp_Maven_Project

Run developer server.

In this section will explain how to run the web application for developing it.
Navigate on project explorer "src" -> "main" -> "webapp" do right click on index.jsp and click on "Run as" -> "Run on Server".
Choose your web java server.
Recommended server (Download and extract it): Apache Tomcat 8
Run_on_server

Click on "Browse..." and go to the server folder, select it.
Select_the_server_folder

Add the project to "Configured" box and click finish.
Add_to_server_the_project

On Eclipse appear new tab with the URL for development, if you prefer you can put this URL on a browser. For configure the tomcat server (for choose port or other options) visit the next webpage:
http://tomcat.apache.org/tomcat-8.0-doc/config/index.html

Important files.

  1. index.jsp:
    Location: src/main/webapp/index.jsp
    This file contains the formulary for get user fullname, user email, subject and message (it have a captcha code for detect humans).
  2. sendEmail.jsp:
    Location: src/main/webapp/payments.jsp
    This file contains the code for send the email.
  3. name.fsiles.sendEmailWebApp.Config
    This class read the webapp configuration and get the messages (Language pack) for the webpage.
  4. name.fsiles.sendEmailWebApp.managers.IPManager
    This class manage the IP for security (Example: max sent email attemps, max captcha tries, etc...)