<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technology Blog &#124; Tutorials</title>
	<atom:link href="http://ajax911.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ajax911.com</link>
	<description>PHP JAVA AJAX JAVASCRIPT JSON</description>
	<lastBuildDate>Fri, 18 May 2012 19:32:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Dynamically display images via Java Servlet, Tomcat</title>
		<link>http://ajax911.com/dynamically-display-images-java-servlet-tomcat/</link>
		<comments>http://ajax911.com/dynamically-display-images-java-servlet-tomcat/#comments</comments>
		<pubDate>Fri, 18 May 2012 19:29:33 +0000</pubDate>
		<dc:creator>Dima Svirid</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Servlets]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[dynamically display images]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=769</guid>
		<description><![CDATA[<p>This is a standard way of showing an image via Servlet. However this way is not very efficient. <br /> It will work fine for one or two images on the same page but if you have a gallery full of the thumbnails and every thumb uses<br /> simular request &#8211; I would consider re-designing [...]]]></description>
			<content:encoded><![CDATA[<p>This is a standard way of showing an image via Servlet. However this way is not very efficient. <span id="more-769"></span><br />
It will work fine for one or two images on the same page but if you have a gallery full of the thumbnails and every thumb uses<br />
simular request &#8211; I would consider re-designing your application a bit.</p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;domain.com/ImageServerServlet?image=test.jpg&quot; /&gt;
</pre>
<p>ImageServerServlet will look like that:</p>
<pre class="brush: java; title: ; notranslate">

package com.test;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ImageServerServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public ImageServerServlet() {
		super();
	}

	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException {

		try {
			ServletContext servletContext = getServletContext();
			String fileName = request.getParameter(&quot;image&quot;);
			FileInputStream fis = new FileInputStream(new File(servletContext.getRealPath(&quot;images/&quot; + fileName)));
			BufferedInputStream bis = new BufferedInputStream(fis);
			response.setContentType(&quot;image/jpeg&quot;);
			BufferedOutputStream output = new BufferedOutputStream(response.getOutputStream());
			for (int data; (data = bis.read()) &gt; -1;) {
				output.write(data);
			}
		} catch (IOException e) {

		}

	}

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/dynamically-display-images-java-servlet-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Is the Point of: #Hashtags?</title>
		<link>http://ajax911.com/point-of-hashtags/</link>
		<comments>http://ajax911.com/point-of-hashtags/#comments</comments>
		<pubDate>Fri, 18 May 2012 18:28:02 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=766</guid>
		<description><![CDATA[<p>Whenever a new Web trend comes along, there are people who ask, &#8220;What is the point of this?&#8221; If millions of people are using something, there has to be a reason. In our What Is the Point of&#8230; series, we&#8217;ll explain it to you.</p> <p>This week, we&#8217;re asking, What is the point of #hashtags?</p> What Is a Hashtag? [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever a new Web trend comes along, there are people who ask, &#8220;What is the point of this?&#8221; If millions of people are using something, there has to be a reason. In our <strong>What Is the Point of&#8230;</strong> series, we&#8217;ll explain it to you.</p>
<p>This week, we&#8217;re asking, <strong>What is the point of #hashtags?</strong></p>
<h2><strong>What Is a Hashtag?</strong></h2>
<p>The hashtag was invented as a label for groups and topics in IRC chat. By adding the &#8216;#&#8217; sign before a string of text, users made that string easy to find in a search. But the hashtag went mainstream thanks to Twitter.</p>
<p>In 2007, as Twitter was just picking up steam, Chris Messina - an open-source software champion currently at Google &#8211; tweeted what is believed to be the original proposal that Twitter users adopt hashtags as well.</p>
<p><strong>Related: The First Hashtag Ever Tweeted on Twitter &#8211; They Sure Have Come a Long Way</strong></p>
<p>It caught on. For a long time, it was just a hack; hashtags were simply plain text in a tweet that could show up easily in search. Twitter&#8217;s early-adopter crowd used hashtags like &#8220;#barcamp&#8221; (for BarCamp open-source conferences) or &#8220;#sxsw&#8221; (for South by Southwest) to filter their messages. Nate Ritter&#8217;s #sandiegofire hashtag became one of the first news topics to go viral during the October 2007 California wildfires.</p>
<h2><strong>Twitter Makes It Official</strong></h2>
<p>By July 2009, Twitter had realized what an ingenious trick its users had invented, so it began to turn hashtags into links. When a Twitter user clicks on a hashtag, it goes to the stream of tweets containing that hashtag. You can also find hashtags using search. This is how you find things on Twitter by topic.</p>
<p><strong>Related: How To #FollowFriday</strong></p>
<p>In 2010, Twitter introduced Trending Topics, so Twitter users could see what the world was talking about right this minute. Hashtags that became popular quickly would shoot to the top.</p>
<p>Then something terrible happened.</p>
<p>Trending topics became completely full of stupid. As Twitter&#8217;s user base climbed into the hundreds of millions, the kinds of hashtags that won out were quite unlike the newsworthy or conference-centered ones that early adopters used. A trending hashtag in the past year or two was more likely to be something like &#8220;#ThingsISed2UrMamaLastNight&#8221; or &#8220;#ReplaceMovieTitlesWithPoop.&#8221;</p>
<p>But it&#8217;s getting better. As Twitter turns its new Discover section into its business, it has begun to do much more diligent filtering of trending topics, as well as better localization of the topics it shows to you. So hashtags are becoming useful for <strong>finding out what&#8217;s going on</strong>.</p>
<h2><strong>How To Use Hashtags</strong></h2>
<p>Joke hashtags can be fun when they&#8217;re popular, but remember that <strong>a hashtag is a search</strong>. They&#8217;re meant to<strong>label a topic</strong> or <strong>filter a conversation</strong>. In some Twitter apps, you can mute a hashtag to avoid seeing chatter you don&#8217;t want to see. So for instance, if you hate when people live-tweet sports games, you could mute #sports, so you wouldn&#8217;t have to see tweets containing that tag.</p>
<p>The problem is, everyone would have to include #sports in their sports tweets for that to work. If you&#8217;re <strong>tweeting a lot about a topic</strong>, you should probably include a good, general hashtag. That way, your followers can mute it if they don&#8217;t care, or they can explore it if they do.</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/point-of-hashtags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook became a $104.2 billion company</title>
		<link>http://ajax911.com/facebook-104-2-billion-company/</link>
		<comments>http://ajax911.com/facebook-104-2-billion-company/#comments</comments>
		<pubDate>Fri, 18 May 2012 18:24:19 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=762</guid>
		<description><![CDATA[<p>Facebook became a $104.2 billion company Friday in much the same way it became the world’s biggest social network and a cultural game-changer: by stubbornly forging ahead despite criticism and calls that it couldn’t be done.</p> <p>Last week, rumors turned into full-blown financial news stories that the initial public offering was getting a lukewarm reception in [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook became a $104.2 billion company Friday in much the same way it became the world’s biggest social network and a cultural game-changer: by stubbornly forging ahead despite criticism and calls that it couldn’t be done.</p>
<p>Last week, rumors turned into full-blown financial news stories that the initial public offering was getting a lukewarm reception in road-show presentations to investors in New York City, Boston and Palo Alto, Calif. CEO Mark Zuckerberg was criticized for wearing his trademark hoodie to the event in New York and skipping the event altogether in Boston, and some analysts said Facebook could open with a value as low as $75 billion.</p>
<p>And yet, by this week Facebook had raised its expected share price and was making more shares available to meet demand. By the close of markets Thursday afternoon, Facebook had set its opening share price at $38 (after considering levels as high as $40). Whatever happens in trading today, Facebook will be the third-largest IPO in history and will net the company $16 billion.</p>
<p>“It shows tremendous confidence in the guy wearing the hoodie,” Erik Gordon, a professor at the University of Michigan’s Ross School of Business, told Bloomberg. “He hasn’t specified how he’s going to do it, but he’ll have to do it to justify this price.”</p>
<h2>Market Cap Now More Important than Number of Registered Users</h2>
<p>But share price doesn&#8217;t really matter. The most important number for now is that $104.2 billion. The $100 billion marker is symbolic, as is so much that surrounds Facebook’s evolution into a publicly traded company. Beyond the hoodie, Zuckerberg has been sending all sorts of signals that he’ll be a different kind of CEO, from his decision to not travel to New York to ring today’s opening Nasdaq bell, to celebrating the IPO not with champagne but with Red Bull (the company had one of its famed hackathons last night).</p>
<p>And while $104.2 billion can (and will) change as Facebook ebbs and flows through the ups and downs of being a publicly traded company, at least for now it makes the eight-year-old company more valuable than all but a handful of U.S. companies. Facebook is bigger than McDonald’s, bigger than Citigroup and &#8211; also symbolically &#8211; bigger than Amazon, arguably the biggest success story from the first dot-com boom.</p>
<p>“Facebook is here to stay,” Navin Chaddha, a managing director of the Mayfield Fund, a venture capital firm, told The New York Times. “It’s a virtual economy where people are spending more time than any other Internet property.”</p>
<p>Still, its stock is still highly speculative, leaving investors unsure of what to do. A steady stream of them have been interviewed on cable television and all make the same basic point: Invest in the company and you may see it wither, much as Groupon, last year’s IPO darling, did. Skip putting money down, however, and you may kick yourself if Facebook ends up like Google, which now trades about 100 times higher than its IPO price.</p>
<p>At its open this morning, Facebook was trading at 100 times its earnings for the previous 12 months. By comparison, the Standard &amp; Poor’s 500-stock index trades at 14 times earnings. People who run the price up today are mainly buying into the hype, and may be too late: The true short-term winners are the company’s early investors, people who bought shares on private exchanges and Zuckerberg (his stake is now worth about $19 billion).</p>
<p>“It could take many years to calculate Facebook’s impact,” Martin Sorrell, chief executive of advertising company WPP, told The New York Times. “There’s a lot of pressure for them to monetize their content and demonstrate productivity, but you can’t do it overnight.”</p>
<p>&nbsp;</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/facebook-104-2-billion-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling Images preserving Aspect Ratio. Universal method for Java and Javascript.</title>
		<link>http://ajax911.com/scaling-images-preserving-aspect-ratio-universal-method-java-javascript/</link>
		<comments>http://ajax911.com/scaling-images-preserving-aspect-ratio-universal-method-java-javascript/#comments</comments>
		<pubDate>Fri, 18 May 2012 18:20:53 +0000</pubDate>
		<dc:creator>Dima Svirid</dc:creator>
				<category><![CDATA[Application development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[aspect ratio]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scale image]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=757</guid>
		<description><![CDATA[<p>While developing web application for digital publications using Java and Javascript, I was forced to resize images on server and<br /> client sides by width or height and the main concern was to keep the aspect ratio of the images. So here is a simple solution, better say method,<br /> how you can calculate the [...]]]></description>
			<content:encoded><![CDATA[<p>While developing web application for digital publications using Java and Javascript<span id="more-757"></span>, I was forced to resize images on server and<br />
client sides by width or height and the main concern was to keep the aspect ratio of the images. So here is a simple solution, better say method,<br />
how you can calculate the ratio. You can pass either only width, or height, or both of them.</p>
<p>Java example</p>
<pre class="brush: java; title: ; notranslate">
/*
	@originalWidth 	- is required
	@originalWidth 	- is required
	@newWidth	- width to resize to, pass 0 if you want to resize only by height
	@newHeight	- height to resize to, pass 0 if you want to resize only by width
*/
private double getAspectRatio(int originalWidth, int originalHeight, int newWidth, int newHeight) {
	double ratioX = (double) newWidth / originalWidth;
	double ratioY = (double) newHeight / originalHeight;
	return Math.max(ratioX, ratioY);
}
</pre>
<p>Javascript example</p>
<pre class="brush: jscript; title: ; notranslate">
/*
	@originalWidth 	- is required
	@originalWidth 	- is required
	@newWidth	- width to resize to, pass 0 if you want to resize only by height
	@newHeight	- height to resize to, pass 0 if you want to resize only by width
*/
var getAspectRatio = function(originalWidth, originalHeight, newWidth, newHeight) {
	var ratioX = newWidth / originalWidth;
	var ratioY = newHeight / originalHeight;
	return Math.max(ratioX, ratioY);
};
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/scaling-images-preserving-aspect-ratio-universal-method-java-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomcat webapps folder in Eclipse</title>
		<link>http://ajax911.com/tomcat-webapps-folder-eclipse/</link>
		<comments>http://ajax911.com/tomcat-webapps-folder-eclipse/#comments</comments>
		<pubDate>Thu, 17 May 2012 19:53:32 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=753</guid>
		<description><![CDATA[<p>Eclipse provides a very convenient way to create a dynamic web application (J2EE) and configure it with a server like tomcat or JBoss within eclipse itself. When you deploy your web application in the tomcat separately, you copy the web module directory or the war file to the webapps folder of tomcat. But when you [...]]]></description>
			<content:encoded><![CDATA[<p>Eclipse provides a very convenient way to create a dynamic web application (J2EE) and configure it with a server like tomcat or JBoss within eclipse itself.<span id="more-753"></span> When you deploy your web application in the tomcat separately, you copy the web module directory or the war file to the webapps folder of tomcat. But when you do the same using eclipse, it does not copy any file related to the web application to your tomcat deployment. So when sometime you need to debug your web application, say, by making some temporary changes in JSP files or to see the java files generated for the JSP files, at that time you need to know the actual path where eclipse stores the web application. Eclipse actually creates a tomcat like folder structure in the current workspace. Following is the path of the webapps folder where you can find your web application:</p>
<div></div>
<div>
<pre class="brush: bash; title: ; notranslate">Eclipse_Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps</pre>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/tomcat-webapps-folder-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Buy Facebook Stock</title>
		<link>http://ajax911.com/buy-facebook-stock/</link>
		<comments>http://ajax911.com/buy-facebook-stock/#comments</comments>
		<pubDate>Thu, 17 May 2012 13:48:09 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=750</guid>
		<description><![CDATA[<p>Facebook goes public tomorrow. It could be worth well over $100 billion dollars. Want to get a piece of that? It&#8217;s going to be very tricky for mere mortals to get Facebook stock in the IPO. If you want shares, here&#8217;s what you have to do.</p> &#8220;First, get a ton of money. Like tons. I [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook goes public tomorrow. It could be worth well over $100 billion dollars. Want to get a piece of that? It&#8217;s going to be very tricky for mere mortals to get Facebook stock in the IPO. If you want shares, here&#8217;s what you have to do.</p>
<ol>
<li><em>&#8220;First, get a ton of money. Like tons. I am talking gazillions.&#8221;</em>
<p>So says Peter Kupferberg, a principal at Chicago investment counseling firm Gofen and Glossberg. Most of the large online brokerage firms will at least take requests for Facebook shares, but they have rules. Some require existing balances of $500,000. Some will only consider people who already trade 30 times a day. Some even decide whether you&#8217;re worthy on a case-by-case basis.</li>
<li><em>&#8220;Then open a brokerage account at Goldman Sachs or Morgan Stanley, but only open the account if they promise you Facebook stock.&#8221;</em>
<p>Kupferberg says the deal stock goes first to the preferred customers of the banks underwriting the deal. Then it goes to the people with brokerage accounts who pass all the tests in Step 1. The scarce remainder goes to small investors to whom we wish the best of luck. If you make it that far, don&#8217;t expect the current estimated share price of $40 to last long. Add scarcity of shares and stratospheric hype, stir, and you&#8217;ll get what Kupferberg expects to be &#8220;a frenzy like we haven&#8217;t seen in a while that will drive the price up to ridiculous levels.&#8221;</li>
</ol>
<p>Basically, if you want Facebook IPO shares, you have to be rich and powerful in order to be taken seriously.</p>
<p>&nbsp;</p>
<p><big><strong>Is Facebook A Good Investment?</strong></big></p>
<p>&#8220;Long, long term, this could turn out to be a very good investment,&#8221; Kupferberg says. &#8220;Do you see people not using it anytime soon?&#8221;</p>
<p>Kupferberg says that his firm&#8217;s model thinks that Facebook is still reasonably valued around $40 per share. But in the very short term, it will be almost impossible for most people to get a piece of Facebook&#8217;s IPO, and those who do will pay a high price for it. We&#8217;re not investment counselors at ReadWriteWeb, but if you really want a piece of the Facebook action and didn&#8217;t buy one on the private market five years ago, it seems like it couldn&#8217;t hurt to wait a little while for the hype to burn off.</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/buy-facebook-stock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Totally Blows Away Facebook On Ad Performance</title>
		<link>http://ajax911.com/google-totally-blows-facebook-ad-performance/</link>
		<comments>http://ajax911.com/google-totally-blows-facebook-ad-performance/#comments</comments>
		<pubDate>Thu, 17 May 2012 13:38:17 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=747</guid>
		<description><![CDATA[<p>&#8220;No one ever got fired for telling clients to advertise on Facebook.&#8221; That&#8217;s the sarcastic mantra making its way round the digital advertising world right now. But is Facebook actually an efficient vehicle for marketers compared to the other digital ad giant, Google?</p> <p>&#160;</p> <p>A comparison of the two companies from WordStream, a search marketing management company, suggests [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;No one ever got fired for telling clients to advertise on Facebook.&#8221; That&#8217;s the sarcastic mantra making its way round the digital advertising world right now. But is Facebook actually an efficient vehicle for marketers compared to the other digital ad giant, Google?</p>
<p>&nbsp;</p>
<p>A comparison of the two companies from WordStream, a search marketing management company, suggests that Facebook is a much less effective ad medium than Google. (The caveat here is that WordStream is, obviously, rather more dependent on Google than Facebook as a medium.)</p>
<p>Facebook has less reach, and its individual ads are less effective, than old fashioned web advertising, according to WordStream&#8217;s numbers, which it delivered—naturally—in the form of an infographic.</p>
<p>Most alarming for Facebook: The average click-through rate for an ad on the internet generally is just 0.1 percent. At Facebook, it&#8217;s even lower: <strong></strong>0.051 percent. Google&#8217;s CTR is 0.4 percent.</p>
<p>Here&#8217;s a summary:</p>
<p><strong>Total Reach</strong></p>
<p><strong>Facebook:</strong> 51% of all internet users<br />
<strong>Google:</strong> 90% of all internet users</p>
<p><strong>Q1 Revenues</strong></p>
<p><strong>Facebook:</strong> $1.06 billion, down 6.5 percent year on year and down 32 percent sequentially.<br />
<strong>Google:</strong> $2.9 billion, up 1 percent year on year and up 0.7 percent sequentially.</p>
<p><strong>Click through rates</strong></p>
<p><strong>Facebook: </strong>0.051%<br />
<strong>Google: </strong>0.4%<br />
<strong>Average:</strong> 0.1%</p>
<p><strong>Targeting</strong></p>
<p><strong>Facebook:</strong></p>
<ul>
<li>Education</li>
<li>Workplace</li>
<li>Likes</li>
<li>Location</li>
<li>Demographics</li>
</ul>
<p><strong>Google:</strong></p>
<ul>
<li>Interest</li>
<li>Keywords</li>
<li>Remarketing</li>
<li>Location</li>
<li>Demographics</li>
</ul>
<p><strong>Formats</strong></p>
<p><strong>Facebook:</strong> standard display ad, Sponsored Stories<br />
<strong>Google:</strong> Text ads, image ads, video text overlay ads, mobile web game ads</p>
<p>“So far, Facebook’s advertising platform hasn’t kept pace with the explosive growth of its social network, and it remains to be seen if CEO Mark Zuckerberg even wants to focus on advertising as a source of revenue. In his 2,500+ word letter to shareholders this month, he mentioned advertising just once,” said Larry Kim, Founder and CTO of WordStream.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/google-totally-blows-facebook-ad-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Servlet &#8220;Hello World&#8221;</title>
		<link>http://ajax911.com/java-servlet-hello-world/</link>
		<comments>http://ajax911.com/java-servlet-hello-world/#comments</comments>
		<pubDate>Wed, 16 May 2012 19:41:40 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Servlets]]></category>
		<category><![CDATA[Java Tutorials]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=731</guid>
		<description><![CDATA[<p>We should start understanding the servlets from the beginning. Lets start by making one program which will just print the &#8220;Hello World&#8221; on the browser. Each time the user visits this page it will display &#8220;Hello World&#8221; to the user.</p> <p>As we know that the our servlet extends the HttpServlet and overrides the doGet() method [...]]]></description>
			<content:encoded><![CDATA[<p>We should start understanding the servlets from the beginning. Lets start by making one program which will just print the &#8220;Hello World&#8221; on the browser. Each time the user visits this page it will display &#8220;Hello World&#8221; to the user.<span id="more-731"></span></p>
<p>As we know that the our servlet extends the HttpServlet and overrides the doGet() method which it inherits from the HttpServlet class. The server invokes doGet() method  whenever web server recieves the GET request from the servlet. The doGet() method takes two arguments first is HttpServletRequest object and the second one is HttpServletResponse object and this method throws the ServletException.</p>
<p>Whenever the user sends the request to the server then server generates two obects, first is HttpServletRequest object and the second one is HttpServletResponse object. HttpServletRequest object represents the client&#8217;s request and the HttpServletResponse represents the servlet&#8217;s response. </p>
<p>Inside the doGet(() method our servlet has first used the setContentType() method of the response object which sets the content type of the response to text/html. It is the standard MIME content type for the Html pages. After that it has used the method getWriter() of the response object to retrieve a PrintWriter object.  To display the output on the browser we use the println() method of the PrintWriter class. </p>
<p>The code the program is given below:</p>
<pre class="brush: php; title: ; notranslate">
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet{
  public void doGet(HttpServletRequest request,
  HttpServletResponse response)
  throws ServletException,IOException{
  response.setContentType(&quot;text/html&quot;);
  PrintWriter pw = response.getWriter();
  pw.println(&quot;&lt;html&gt;&quot;);
  pw.println(&quot;&lt;head&gt;&lt;title&gt;Hello World&lt;/title&gt;&lt;/title&gt;&quot;);
  pw.println(&quot;&lt;body&gt;&quot;);
  pw.println(&quot;&lt;h1&gt;Hello World&lt;/h1&gt;&quot;);
  pw.println(&quot;&lt;/body&gt;&lt;/html&gt;&quot;);
  }
}
</pre>
<p>web.xml file for this program:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;web-app&gt;
 &lt;servlet&gt;
  &lt;servlet-name&gt;Hello&lt;/servlet-name&gt;
  &lt;servlet-class&gt;HelloWorld&lt;/servlet-class&gt;
 &lt;/servlet&gt;
 &lt;servlet-mapping&gt;
 &lt;servlet-name&gt;Hello&lt;/servlet-name&gt;
 &lt;url-pattern&gt;/HelloWorld&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;
&lt;/web-app&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/java-servlet-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Engine Optimization – Do It Yourself! (Part 3)</title>
		<link>http://ajax911.com/search-engine-optimization-diy-3/</link>
		<comments>http://ajax911.com/search-engine-optimization-diy-3/#comments</comments>
		<pubDate>Tue, 15 May 2012 15:49:33 +0000</pubDate>
		<dc:creator>Dima Svirid</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[search optimization]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[sitelinks]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=716</guid>
		<description><![CDATA[Content Really Matters! <p><br /> Yes, it is true! Your website content is really matters and it matters the most. If you want to raise positions of your website in Google, provide your visitors with the quality content and Google will “pay you back”.</p> Content tips <p>I will be talking about some of the main [...]]]></description>
			<content:encoded><![CDATA[<h2>Content Really Matters!</h2>
<p><span id="more-716"></span><br />
Yes, it is true! Your website content is really matters and it matters the most. If you want to raise positions of your website in Google, provide your visitors with the quality content and Google will “pay you back”.</p>
<h2>Content tips</h2>
<p>I will be talking about some of the main points, how you should optimize your website content. Of course there are a lot more, however I am sure, that if at least you follow all the steps below you will be happy with the results.</p>
<h3>Preferred Domain with www. or without it</h3>
<p>You have to make a hard decision how would you like your website to appear in Google’s search results, with www. or without it.<br />
The problem with having multiple URLs for the same page is that you’re effectively diluting your link authority. For example, if you rank for both website.com and www.website.com, Google sees these links as two different websites. Pick one URL and stick to it.</p>
<h3>Page Title</h3>
<p>Make sure every page of your website has an individual title. The title helps search engines assess page relevance and provides a description for search results. Create a unique title tag for each page of your site briefly describing that page&#8217;s content.<br />
It might be hard to check 100s of pages, making sure they have no duplicated titles,  just use Google’s Webmaster Tools from time to time (it might not index all of your pages yet right now).</p>
<p><a href="http://ajax911.com/wp-content/uploads/2012/05/results-4.jpg"><img class="aligncenter size-full wp-image-722" title="results-4" src="http://ajax911.com/wp-content/uploads/2012/05/results-4.jpg" alt="" width="799" /></a></p>
<p>If you are using a WordPress, make sure you have this plugin installed, it will let seamlessly change your website titles and descriptions:<br />
<a href="http://wordpress.org/extend/plugins/seo-ultimate/" target="_blank">http://wordpress.org/extend/plugins/seo-ultimate/</a></p>
<h3>Page Heading &lt;H1&gt;</h3>
<p>Search engines use target keywords in  H1 tag to determine a page&#8217;s relevance and rankings. Make sure the heading uses natural and grammatical wording.</p>
<p>Examples of really bad headings:</p>
<ul>
<li>log in</li>
<li>forgot username?</li>
<li>forgot password?</li>
<li>search</li>
<li>top categories</li>
<li>recent searches</li>
</ul>
<p>Try to have H1 tag heading appear only once within a page, you can use H2, H3 for other headings if needed.</p>
<h3>Duplicated Homepage</h3>
<p>Multiple versions of a homepage can be a problem if search engines index them all. Your site should contain one version of your home page with a single URL. Use either a 301 redirect or a canonical rel=&#8221; &#8221; attribute to eliminate duplicates.</p>
<p>Examples:</p>
<ul>
<li>http://www.website.com</li>
<li>http://www.website.com/index.htm</li>
<li>http://www.website.com/index.html</li>
<li>http://www.website.com/index.php</li>
</ul>
<h3>No Flash</h3>
<p>You have to make sure you have an indexable content on your website. NO FLASH! Flash is in the past and its not indexable by Google. If your website still in Flash or parts of it, such as navigation or content blocks, I think its time to design a new one.</p>
<h3>Sitelinks via Top Level navigation</h3>
<p>At the beginning it might sound like a small and not important thing to have. I would insist it is important. Have a good, clean top level navigation with descriptive anchor text is a MUST thing to have! So if you have “Contact” or “About” anchors in website navigation you might want to think again.</p>
<p>Below is a simple example how your website will look like in when it gets to the top of Google results if you have a properly built main navigation. Also Google will use your navigation as a sitemap to index other pages.</p>
<p><a href="http://ajax911.com/wp-content/uploads/2012/05/results-1.jpg"><img class="aligncenter size-full wp-image-719" title="results-1" src="http://ajax911.com/wp-content/uploads/2012/05/results-1.jpg" alt="" width="536" height="113" /></a><br />
<a href="http://ajax911.com/wp-content/uploads/2012/05/results-2.jpg"><img class="aligncenter size-full wp-image-720" title="results-2" src="http://ajax911.com/wp-content/uploads/2012/05/results-2.jpg" alt="" width="522" height="284" /></a></p>
<p>How to check if you have your navigation built properly ?<br />
In Chrome or IE (Firefox, if you have Firebug plugin installed) press F12. Inside the opened console pick “Element selector” button and mouse over to the top of your main website navigation, click to fix the position.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;/signup/&quot;&gt;Sign Up&lt;/a&gt; - This is Perfect!
&lt;a onclick=&quot;gotoPage('signup')&quot;&gt;Sign Up&lt;/a&gt; - Not Good!</pre></div></div>

<p><a href="http://ajax911.com/wp-content/uploads/2012/05/results-3.jpg"><img class="aligncenter size-full wp-image-721" title="results-3" src="http://ajax911.com/wp-content/uploads/2012/05/results-3.jpg" alt="" width="613" height="619" /></a></p>
<p>To be continued!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/search-engine-optimization-diy-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Payback: Apple to Cut Google Out of Stunning New 3D Maps App in iOS6</title>
		<link>http://ajax911.com/android-payback-apple-cut-google-stunning-3d-maps-app-ios6/</link>
		<comments>http://ajax911.com/android-payback-apple-cut-google-stunning-3d-maps-app-ios6/#comments</comments>
		<pubDate>Tue, 15 May 2012 14:59:39 +0000</pubDate>
		<dc:creator>Alex Smirnov</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://ajax911.com/?p=714</guid>
		<description><![CDATA[<p>One of the most immediate effects of Steve Jobs’ legacy on Apple is an animosity towards Google fueled by what Jobs saw as the outright copying of iOS by Android. Big tech companies will always be battling titans, but this is more. This is personal.</p> <p>Still, the two companies have been bound by the mutual dependence since Google’s [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most immediate effects of Steve Jobs’ legacy on Apple is an animosity towards Google fueled by what Jobs saw as the outright copying of iOS by Android. Big tech companies will always be battling titans, but this is more. This is personal.</p>
<p>Still, the two companies have been bound by the mutual dependence since Google’s services are bundled into iOS. And iMore reports that Google may make four times the ad revenue off of their use in iOS than they do from their own Android platform. Apple wants to change that. Apple has already begun intermediating search queries though Siri, effectively cutting Google out of the valuable identity information associated with those searches. Next up is that other large data components on iOS, maps.</p>
<p>It was widely reported yesterday that Apple will likely announce at its WWDC in June that the new version of the built-in maps app in iOS6 will not be fed by Google maps. Instead, Apple has developed its own, in-house 3-D mapping database, based on the acquisition of three mapping software companies between 2009 and 2011, Placebase, C3 Technologies, and Poly9. The stunning 3D image above is from C3, which, according to the company, uses “previously classified image processing technology… automated software and advanced algorithms… to rapidly assemble extremely precise 3D models, and seamlessly integrate them with traditional 2D maps, satellite images, street level photography and user generated images.” The video below shows a flyover of Oslo using C3′s technology.</p>
<p>So if this report is true, Apple will have a new maps app with much more highly-detailed imagery than Google, collected through military-style reconnaissance without the (ahem) gathering of any personal information. It is a good bet that Apple will finesse the transitions between the different map modes far better than Google’s wonky shift from “map view” to “street view.” What could go wrong? Although Apple now owns the source and can engineer accordingly, the new app likely runs more image data through the pipe, so performance on mobile devices—where it’s most critical—is going to be an issue. Apple may have to build in detection of the processor speed of the requesting iOS device and send a thinner stream to older iPhones than to the new quad-core iPads.</p>
<p>There is obviously an interesting business story here about how Apple and other tech companies are trying to chip away at Google’s dominance of web services. But even more interesting, to me, is the end-user’s story. The bloody competition between Apple and Google is leading Apple to create more innovative user experiences for its customers, and that is a good thing. An operating system is just a container for content, and recreating content is much more difficult than just knocking off its container. By creating a new source for the content of maps on iOS, Apple is making their platform more distinct from Android, as if to say, “You can only copy so much.” Although Apple is always improving user experience, this particular effort might have not happened had Steve Jobs not threatened to go “thermonuclear.”</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://ajax911.com/android-payback-apple-cut-google-stunning-3d-maps-app-ios6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

