Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Posts syndicated from ParasDoshi.com.
Browse by Tags · View All
beyondrelational.com 87
Cloud computing 34
Microsoft 32
sql 32
SQL 32
sql azure 32
#sqlazure 28
Database 24
Microsoft SQL Server 24
#azure 12

Archive · View All
April 2012 12
June 2012 11
February 2012 11
July 2012 10
August 2012 8
May 2012 8
March 2012 8
January 2012 6
October 2012 3
November 2011 3

ParasDoshi.com

Getting started with creating Java app on Google App engine – Guest Post by Dhwaneet Bhatt

Apr 15 2012 12:00AM by Paras Doshi   

This is a Guest Post by Dhwaneet Bhatt. He’s one awesome programmer and technologist with an innate ability to master any technical topic very quickly. Here’s his twitter profile: https://twitter.com/#!/dhwaneetbhatt for you to able to connect with him.

If you searching for tutorial to get you started with python app on Google App engine. click here. And Here’s his post which would help you to get started with creating a java app on Google App engine:

1. We will be using Eclipse IDE to code a simple Java App for Google App Engine because it is very simple, the other option is building the application using Ant script, which involves a lot of code writing, and I prefer to keep things simple.

2. Download Eclipse from the following URL:

http://www.eclipse.org/downloads/

The App Engine has support for all the versions but we prefer to use the latest version, so download Eclipse Indigo (3.7.x). On the web page, download from the first link that reads “Eclipse IDE for Java EE Developers”. That will download Eclipse 3.7.x.

3. Extract eclipse and start, you will be prompted to create a workspace, create it anywhere you like and proceed.

image

4. Once in eclipse, we need to install the Google App Engine plugin. Go to Help->Install New Software, once there, enter the following URL in the “Work With” text box: http://dl.google.com/eclipse/plugin/3.7

Note: 3.7 in the URL corresponds to the Eclipse version, if you are using some other version, change the last number according to that. Or you can visit this link that gives all the URLs:

https://developers.google.com/eclipse/docs/download

Click on the “Add” button and this repository will be added to Eclipse. Next time you can directly use this repository name for downloading any Google related plugin. It will then download a list of plugins associated with this URL.

image

Select the options “Google Plugin for Eclipse 3.7” under Google Plugin for Eclipse and Google App Engine Java SDKunder SDKs. These are the basic tools required for deploying a simple app to App Engine.

Click Next (2 times), and Accept the Terms of Agreement (after reading of course) and then it will take a couple of minutes for the plugins to get installed. Go grab a cup of coffee.

5. After it is installed, Eclipse will prompt for restart. Restart the Eclipse.

6. Click on New -> Other… and from the list select “Web Application Project” under Google”, give a name for your project and a package structure, and untick Use Google Web Toolkit and click Finish.

image

7. Now comes the surprise, you don’t need to do anything now. Eclipse has already created all the files required for the Hello World App, but still, I will be taking them one by one so that you can understand the necessary steps for writing a custom app.

8. First comes the deployment descriptor (for people who are new to J2EE, I recommend reading about J2EE first), it is the file web.xml located in the location war/WEB-INF/web.xml.

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
		<servlet>
			<servlet-name>Dhwaneetbhattjavaapp</servlet-name>
<servlet-class>com.dhwaneetbhatt.helloworldjavaapp.DhwaneetbhattjavaappServlet</servlet-class>
		</servlet>
		<servlet-mapping>
			<servlet-name>Dhwaneetbhattjavaapp</servlet-name>
			<url-pattern>/dhwaneetbhattjavaapp</url-pattern>
		</servlet-mapping>
		<welcome-file-list>
			<welcome-file>index.html</welcome-file>
		</welcome-file-list>
</web-app>

The web.xml contains mapping for the default servlet created with the name DhwaneetbhattjavaappServlet, and its URL mapping. This is the URL which will allow the servlet to give a response. And index.html located under war/ is the first file to be loaded when the application is started.

9. The next file is a pretty simple HTML file that contains nothing but a simple link to call the servlet.

 

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Hello App Engine</title>
</head>
<body>
		<h3>Hello App Engine!</h3>
		<a href="dhwaneetbhattjavaapp">Servlet</a>
</body>
</html>

10. The next important file is the servlet itself – which responds to the request by the html file. The doGet method means that the request coming from the html file is a GET request. You can repond to a POST request by implementing the doPost method and changing the type of request coming from html form to POST.

package com.dhwaneetbhatt.helloworldjavaapp;

import java.io.IOException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class DhwaneetbhattjavaappServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("text/plain");
		resp.getWriter().println("Hello, world");
	}
}

11. The last file is the appengine-web.xml file which is located in the WEB-INF/ directory. pp Engine needs one additional configuration file to figure out how to deploy and run the application. This file includes the registered ID of your application (Eclipse creates this with an empty ID for you to fill in later), the version number of your application, and lists of files that ought to be treated as static files (such as images and CSS) and resource files (such as JSPs and other application data). In thetag, enter the name of your App Id that you had chosen while registering for the app previously. (step 3)

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  		<application>dhwaneetbhattjavaapp</application>
  		<version>1</version>
  		<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
  		</system-properties>
</appengine-web-app>

12. That’s about all the files we’ve covered. There are a couple of other files – configuration files in META-INF, logging.properties file and a favicon file that are unimportant at the moment. As I said Keep it Simple.

13. Now we are ready for a test run. Right click on the project from the Project Explorer, Run As -> Web Application, it will start the server. The default port is 8888. Open any web browser, type http://localhost:8888, you web application will run.

image

image

14. Now that we have tested the code on our machine, it is time to deploy it go Google App Engine. Right click on the project, Google -> Deploy to App Engine, login with your credentials and on the next screen that comes, click on Deploy.

image

15. Your app will be deployed on the App Engine. Open any browser and enter the URL: http://dhwaneetbhattjavaapp.appspot.com and you will have the “Hello, world” app ready for the world to access.



Republished from Paras Doshi's Blog [61 clicks].  Read the original version here [5 clicks].

Paras Doshi
17 · 10% · 3265
2
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"Getting started with creating Java app on Google App engine – Guest Post by Dhwaneet Bhatt" rated 5 out of 5 by 2 readers
Getting started with creating Java app on Google App engine – Guest Post by Dhwaneet Bhatt , 5.0 out of 5 based on 2 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]