<?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>TechJug &#187; Tutorials</title>
	<atom:link href="http://www.techjug.com/index.php/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techjug.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 02 Jan 2010 09:26:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tutorial: Java Hello World Application With MyEclipse</title>
		<link>http://www.techjug.com/index.php/2009/12/java-hello-world-application-with-myeclipse/</link>
		<comments>http://www.techjug.com/index.php/2009/12/java-hello-world-application-with-myeclipse/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 16:47:00 +0000</pubDate>
		<dc:creator>ali</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[myeclipse]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.techjug.com/index.php/2009/12/java-hello-world-application-with-myeclipse/</guid>
		<description><![CDATA[Java Hello World Web Application in MyEclipse
 
 
 
 
1- Open MyEclipse
2- Click on menu File &#62; New &#62; Web Project


 


3- Give a name to the project. Here I use “Helloworld”

4- Click on Finish
5- MyEclipse will automatically create some files. Project hierarchy is show here

6- Open index.jsp. It contains the following code or [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Java Hello World Web Application in MyEclipse</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>1- Open MyEclipse</p>
<p>2- Click on menu <strong>File &gt; New &gt; Web Project</strong></p>
<p><strong><br />
</strong></p>
<p><strong> </strong></p>
<p><a href="http://www.techjug.com/wp-content/uploads/2009/12/clip_image001.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" title="clip_image001" src="http://www.techjug.com/wp-content/uploads/2009/12/clip_image001_thumb.jpg" border="0" alt="clip_image001" width="244" height="207" /></a></p>
<p><span id="more-62"></span></p>
<p>3- Give a name to the project. Here I use “<strong>Helloworld</strong>”</p>
<p><a href="http://www.techjug.com/wp-content/uploads/2009/12/clip_image002.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" title="clip_image002" src="http://www.techjug.com/wp-content/uploads/2009/12/clip_image002_thumb.jpg" border="0" alt="clip_image002" width="228" height="244" /></a></p>
<p>4- Click on <strong>Finish</strong></p>
<p>5- MyEclipse will automatically create some files. Project hierarchy is show here</p>
<p><a href="http://www.techjug.com/wp-content/uploads/2009/12/clip_image003.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" title="clip_image003" src="http://www.techjug.com/wp-content/uploads/2009/12/clip_image003_thumb.jpg" border="0" alt="clip_image003" width="122" height="244" /></a></p>
<p>6- Open index.jsp. It contains the following code or put the following code in <strong>index.jsp </strong></p>
<p><br/></p>
<pre class="java">&nbsp;
&nbsp;
&lt;%@ page language=<span style="color: #ff0000;">&quot;java&quot;</span> <span style="color: #a1a100;">import=&quot;java.util.*&quot; pageEncoding=&quot;ISO-8859-1&quot;%&gt;</span>
&lt;%
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> path = request.<span style="color: #006600;">getContextPath</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> basePath = request.<span style="color: #006600;">getScheme</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #ff0000;">&quot;://&quot;</span>+request.<span style="color: #006600;">getServerName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #ff0000;">&quot;:&quot;</span>+
request.<span style="color: #006600;">getServerPort</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+path+<span style="color: #ff0000;">&quot;/&quot;</span>;
%&gt;
&nbsp;
&lt;!DOCTYPE <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AHTML+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">HTML</span></a> <span style="color: #000000; font-weight: bold;">PUBLIC</span> <span style="color: #ff0000;">&quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;</span>&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;base href=<span style="color: #ff0000;">&quot;&lt;%=basePath%&gt;&quot;</span>&gt;
&nbsp;
    &lt;title&gt;My JSP <span style="color: #ff0000;">'index.jsp'</span> starting page&lt;/title&gt;
	&lt;meta http-equiv=<span style="color: #ff0000;">&quot;pragma&quot;</span> content=<span style="color: #ff0000;">&quot;no-cache&quot;</span>&gt;
	&lt;meta http-equiv=<span style="color: #ff0000;">&quot;cache-control&quot;</span> content=<span style="color: #ff0000;">&quot;no-cache&quot;</span>&gt;
	&lt;meta http-equiv=<span style="color: #ff0000;">&quot;expires&quot;</span> content=<span style="color: #ff0000;">&quot;0&quot;</span>&gt;
	&lt;meta http-equiv=<span style="color: #ff0000;">&quot;keywords&quot;</span> content=<span style="color: #ff0000;">&quot;keyword1,keyword2,
         keyword3&quot;</span>&gt;
	&lt;meta http-equiv=<span style="color: #ff0000;">&quot;description&quot;</span> content=<span style="color: #ff0000;">&quot;This is my page&quot;</span>&gt;
	&lt;!--
&lt;link rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> href=<span style="color: #ff0000;">&quot;styles.css&quot;</span>&gt;
	--&gt;
  &lt;/head&gt;
&nbsp;
  &lt;body&gt;
    <span style="color: #000000; font-weight: bold;">This</span> is my JSP page. &lt;br&gt;
  &lt;/body&gt;
&lt;/html&gt;
&nbsp;</pre>
<p><br/></p>
<p>7- The only line of code for our interest is following</p>
<p><br/></p>
<pre class="html4strict">&nbsp;
&nbsp;
  <span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span>
    This is my JSP page.
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span>
&nbsp;</pre>
<p><br/></p>
<p>8- The other file of your interest is web.xml. Open the file and &lt;welcome-file&gt; tag should point to index.jsp<br />
<br/></p>
<pre class="xml">&nbsp;
&nbsp;
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;welcome-file-list<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;welcome-file<span style="font-weight: bold; color: black;">&gt;</span></span></span>index.jsp<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/welcome-file<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/welcome-file-list<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p><br/></p>
<p>9- That’s it, no more coding and now we will deploy the web application on tomcat web server.</p>
<p>10- I am using MyEclipse 7.5, Tomcat is already configured with the IDE and you just need to run the server and your application is ready.</span></p>
<p><a href="http://www.techjug.com/wp-content/uploads/2009/12/clip_image004.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" title="clip_image004" src="http://www.techjug.com/wp-content/uploads/2009/12/clip_image004_thumb.jpg" border="0" alt="clip_image004" width="244" height="228" /></a></p>
<p><span style="font-weight: normal;">11- Tomcat is running now</span></p>
<p><span style="font-weight: normal;">12- Open browser and navigate to following URL </span><a href="http://localhost:8080/Helloworld/"><span style="font-weight: normal;">http://localhost:8080/Helloworld/</span></a></p>
<p><a href="http://www.techjug.com/wp-content/uploads/2009/12/clip_image005.jpg"><img style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" title="clip_image005" src="http://www.techjug.com/wp-content/uploads/2009/12/clip_image005_thumb.jpg" border="0" alt="clip_image005" width="244" height="89" /></a></p>
<p><span style="font-weight: normal;">13- That’s it, your first java web application is up and running.</span></p>
<p><strong>Downloads</strong></p>
<p>Download the full project from <a href="http://www.box.net/shared/jfpk3lzrzo">here</a></p>
<p><span style="font-weight: normal;">Enjoy!</span></p>
<p></strong><br />
<br/><br/><br />
<strong>Related Links</strong></p>
<p><a href="http://www.techjug.com/index.php/2009/12/javajsp-hello-world-web-application-in-eclipse/#more-131">Java/JSP Hello World Web Application in Eclipse</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techjug.com/index.php/2009/12/java-hello-world-application-with-myeclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
