Steps to Do Part B Receiver Program

30
Steps to do Part B Receiver Program Pre-Requisites Eclipse IDE for Java EE Developers http://www.eclipse.org/downloads/ AWS Toolkit for eclipse AWS toolkit for Eclipse (http://docs.aws.amazon.com/AWSToolkitEclipse/latest/ GettingStartedGuide/tke_setup_install.html ) Go to help tab

description

Cloud ComputingJava ServletAmazon Cloud

Transcript of Steps to Do Part B Receiver Program

Steps to do Part B Receiver Program Pre-RequisitesEclipse IDE for Java EE Developers

http://www.eclipse.org/downloads/AWS Toolkit for eclipse AWS toolkit for Eclipse(http://docs.aws.amazon.com/AWSToolkitEclipse/latest/GettingStartedGuide/tke_setup_install.html)Go to help tab

Click on Install new software

Type http://aws.amazon.com/eclipse in Work With text area. Click Add button

Select All and then Click on Next

Wait for the installation to complete.

Click Next

Click on Finish button.

Click OK.

2) Servlet API.JAR fileDownload the JAR file from http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api/3.0.1Place the file in the src folder in Receiver program code.Sample Path : D:\Personal\MS 3 rd SEM\EC3 Assignment\SATHISH\ECIII-master\Receiver\src

3) Please make sure Java is installed in your machine.

Import the Receiver program code to your machine.Click on File tab ,, Import button

Click on General---Existing Projects to Workplace

Select the Receiver folder by browsing .

Click on Finish button.

After importing , you will see the below screen.

There will some errors in program code.Steps to rectify those error.

Right Click on Receiver in the project explorer

Click on Properties

Click on JAVA BUILD PATH

Click on Libraries

Click on JRE System Library JAVA SE Unbound and click Remove button

Click on Add Library

JRE System Library

Click on Next

Click on Alternate JRE and click on finish button

Now click on Add External JARs

Select the JAR file from the location which you have placed.

Click on OKNext Updating the codeChanges in code filesGo to Java Resources srccom.eciii-Select ReceiverServlet file

Changes required in Line 44 and Line 45Change the unrecognized characters with ; in both line no 44 and 45To Rectify the target runtime error Go to Window-Preferences

Go to Server---Run Time environmentsClick on AddSelect Amazon Web ServicesApache Tomcat 8.0Click on Finish Button

Click on OKChange whoami.txt with your name and Number.Change web.xml file 20 th line with your SQS end point.Change AwsCredentials.properties with your access key and secret key.After doing the changes in 4 files.Its Time to add your AWS credentials to Eclipse.1. Open Eclipse'sPreferencesdialog box and clickAWS Toolkitin the sidebar.2. Type or paste your access key ID in theAccess Key IDbox.3. Type or paste your secret access key in theSecret Access Keybox.4. ClickApplyorOKto store your access key information.

Add your access key and Secret key here in the above screen. Click OKNow its time to run the program.

Receiver----Run As---Run on ServerBefore doing this click on AWS icon

Click on Show AWS Explorer ViewIn the AWS Explorer please make sure that you have selected the region where you have your SQS configured

For example : ASIA PACIFIC (SINGAPORE)

Please bear with me .I am unable to provide screenshots for the below steps due to my local system proxy issues.Follow the steps as mentioned.Next ScreenIn this screen you will need to enter Application Name and Environment Name.Application NameEnvironment NameApplication Name and Environment Name should contain your BITS ID or name .This will appear in your URL.Click on NextNext ScreenIn this screen you will need to add a new key pair by giving only name for it and uncheck the Incremental Deployment option.Key Pair Click on Add (plus icon) Give any name Click on OKPlease remove the checked option in Incremental Deployment.In Next screen you will be able to see the Receiver program in right side.Click on Next and Click on finish button.

Now your code will be publishing to the AWS elastic beanstalk.You will be able to see the window publishing in your Eclipse screen.At this time you will be able to see your server at the bottom of Eclipse .Server -----It will stop sometimes .you need to start it manually by right click ---start. Please make sure your server is running all the time when your code is getting published to AWS.Now go to your AWS console. Click on Elastic Beanstalk.Now you should able to view your receiver application .Get the URL .Sample URL: Receiver URL:http://2013ht78094-ezwprrwmk3.elasticbeanstalk.com/

How to check whether your URLs are correct or not

http://2013ht78094-ezwprrwmk3.elasticbeanstalk.com/whoami

Sender URLhttp://vaibhavan-r-2013ht78094.elasticbeanstalk.com/

http://vaibhavan-r-2013ht78094.elasticbeanstalk.com/whoami

Send the message Hello-Everyone-Welcoming-U-All-2-The-World-Of-AWS-ServicesIn Senders send URL.http://vaibhavan-r-2013ht78094.elasticbeanstalk.com/send/Hello-Everyone-Welcoming-U-All-2-The-World-Of-AWS-Services