
<?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>Chasing Daydreams &#187; java</title>
	<atom:link href="http://www.chasingdaydreams.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chasingdaydreams.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 10 Feb 2012 00:50:02 +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>Objective-C: Getting Down and Dirty</title>
		<link>http://www.chasingdaydreams.com/2011/03/objective-c-getting-down-and-dirty/</link>
		<comments>http://www.chasingdaydreams.com/2011/03/objective-c-getting-down-and-dirty/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 23:15:05 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.chasingdaydreams.com/?p=2223</guid>
		<description><![CDATA[Delved deeper into Objective-C programming over the weekend. As a challenge, I ported a Java program  that I cooked up in roughly 30 minutes. No, it&#8217;s not Hello World :P After several hours, I was still not done! Okay, so &#8230; <a href="http://www.chasingdaydreams.com/2011/03/objective-c-getting-down-and-dirty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Delved deeper into Objective-C programming over the weekend. As a challenge, I ported a Java program  that I cooked up in roughly 30 minutes. No, it&#8217;s not Hello World :P After several hours, I was still not done! Okay, so I got a little bit fancy with the Objective-C version but most of the time I was slowed down by syntax, API adjustments, and memory management. That&#8217;s just the way learning goes, I guess. I certainly look forward to the day when I can cook up an Objective-C program in 30 minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chasingdaydreams.com/2011/03/objective-c-getting-down-and-dirty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective: Objective-C</title>
		<link>http://www.chasingdaydreams.com/2010/11/objective-objective-c/</link>
		<comments>http://www.chasingdaydreams.com/2010/11/objective-objective-c/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 13:05:32 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[phones]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.chasingdaydreams.com/?p=1918</guid>
		<description><![CDATA[Since I&#8217;ve recently decided to study iPhone programming and and since Starcraft II is still a few days away, I was able to spend some time learning Objective-C, the programming language of choice for iPhone development. Since, I&#8217;ve gone through quite a &#8230; <a href="http://www.chasingdaydreams.com/2010/11/objective-objective-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve recently <a href="http://www.chasingdaydreams.com/2010/11/joining-the-side-of-the-light/">decided to study iPhone programming</a> and and since Starcraft II is <a href="http://www.chasingdaydreams.com/2010/11/buying-starcraft-ii/">still a few days away</a>, I was able to spend some time learning Objective-C, the programming language of choice for iPhone development. Since, I&#8217;ve gone through quite a few programming languages (LOGO, BASIC, Pascal, C, some C++, Java, and more recently Flex), picking up the syntax and the basics was a relative breeze. I expect, as usual, things will get exciting once I start working with the iOS APIs. Haven&#8217;t felt this excited in a while!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chasingdaydreams.com/2010/11/objective-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rolling My Own Java Security Framework</title>
		<link>http://www.chasingdaydreams.com/2010/02/rolling-my-own-java-security-framework/</link>
		<comments>http://www.chasingdaydreams.com/2010/02/rolling-my-own-java-security-framework/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 02:30:05 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.chasingdaydreams.com/?p=1337</guid>
		<description><![CDATA[I needed to quickly roll out a small security framework for an app at work. Since it&#8217;s a security framework, it must have at the minimum: User Management &#8211; add/edit/delete users for administrators and change password for users. Authentication &#8211; &#8230; <a href="http://www.chasingdaydreams.com/2010/02/rolling-my-own-java-security-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed to quickly roll out a small security framework for an app at work. Since it&#8217;s a security framework, it must have at the minimum:</p>
<ul>
<li>User Management &#8211; add/edit/delete users for administrators and change password for users.</li>
<li>Authentication &#8211; establish identity of a user by getting user credentials typically via a login page.</li>
<li>Authorization &#8211; establish if an authenticated user is allowed access to a resource.</li>
</ul>
<p><span id="more-1337"></span>For user management, I cheated and decided to have ActiveDirectory handle it. System administrator can add/edit/delete users using Windows admin console and users can change their passwords via ctrl+alt+delete.</p>
<p>For authentication, I made login.jsp and loginhandler.jsp. loginhandler.jsp uses authenticates against ActiveDirectory and, when authenticated, forwards the user to the previously requested URI. This URI was saved by the authorization filter.</p>
<p><a href="http://ahm507.blogspot.com/2007/01/authenticating-users-with-windows.html">Ahmed  Hammad</a> provided the reference code for authenticating against an  ActiveDirectory server.</p>
<p>For the authorization check. Every time a user accesses a certain  resource, we check if he is allowed access to that resource&#8217;s URI. If he  is authorized,  he is allowed to continue on to the resource.</p>
<p><a href="http://www.developer.com/security/article.php/3467801/Securing-J2EE-Applications-with-a-Servlet-Filter.htm">Michael Klaene</a> provided the reference code for the authorization filter.</p>
<p>And that was all there is to it.</p>
<p>Next, I&#8217;m thinking of using j_security_check if it has no platform-dependency issues.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">&lt;%@ page language=&#8221;java&#8221; contentType=&#8221;text/html; charset=ISO-8859-1&#8243;<br />
pageEncoding=&#8221;ISO-8859-1&#8243;%&gt;<br />
&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/html4/loose.dtd&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=ISO-8859-1&#8243;&gt;<br />
&lt;title&gt;Login&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;b&gt;Login&lt;/b&gt;&lt;br&gt;<br />
&lt;form method=&#8221;POST&#8221; action=&#8221;&lt;%=request.getContextPath()%&gt;/loginhandler.jsp&#8221;&gt;<br />
Username: &lt;input type=&#8221;text&#8221; name=&#8221;username&#8221;/&gt;&lt;br/&gt;<br />
Password: &lt;input type=&#8221;password&#8221; name=&#8221;password&#8221;/&gt;&lt;br/&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;Login!&#8221;/&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.chasingdaydreams.com/2010/02/rolling-my-own-java-security-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebSphere 6 Error: Unsupported major.minor version 49.0</title>
		<link>http://www.chasingdaydreams.com/2009/12/websphere-6-error-unsupported-major-minor-version-49-0/</link>
		<comments>http://www.chasingdaydreams.com/2009/12/websphere-6-error-unsupported-major-minor-version-49-0/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 05:47:49 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[websphere]]></category>

		<guid isPermaLink="false">http://www.chasingdaydreams.com/?p=1231</guid>
		<description><![CDATA[I was trying to test a web application in WebSphere 6 when I encountered this error: Error 500: java.lang.LinkageError: LinkageError while defining class: aiu.webservices.bean.ConfigServiceProxy Could not be defined due to: aiu/webservices/bean/ConfigServiceProxy (Unsupported major.minor version 49.0) This is often caused by &#8230; <a href="http://www.chasingdaydreams.com/2009/12/websphere-6-error-unsupported-major-minor-version-49-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was trying to test a web application in WebSphere 6 when I encountered this error:</p>
<blockquote><p>Error 500: java.lang.LinkageError: LinkageError while defining class: aiu.webservices.bean.ConfigServiceProxy Could not be defined due to: aiu/webservices/bean/ConfigServiceProxy (Unsupported major.minor version 49.0) This is often caused by having a class defined at multiple locations within the classloader hierarchy.  Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature.</p></blockquote>
<p>After a little bit of puzzling and googling, the problem turned out to be that I have been compiling using JDK 1.4. while the WebSphere VM only has Java 1.4. The solution was to Project-&gt;Properties-&gt;Java Compiler-&gt;Compiler Compliance Level to 1.4. And Project-&gt;Properties-&gt;Java Build Path-&gt;Libraries-&gt;JRE System Library-&gt;Alternate JRE to 1.4.</p>
<p>I exported to WAR, updated the application via WebSphere console, and it worked! couldn&#8217;t believe it was that simple :P</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chasingdaydreams.com/2009/12/websphere-6-error-unsupported-major-minor-version-49-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Services with Apache Axis2</title>
		<link>http://www.chasingdaydreams.com/2009/08/web-services-with-apache-axis2/</link>
		<comments>http://www.chasingdaydreams.com/2009/08/web-services-with-apache-axis2/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 10:27:00 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.chasingdaydreams.com/?p=1087</guid>
		<description><![CDATA[Since my new project would require me to use web services, I decided to get my hands at it. Bottom-Up Approach To Writing Web Services The logical place to start would be take your plain old Java classes (POJOs, I &#8230; <a href="http://www.chasingdaydreams.com/2009/08/web-services-with-apache-axis2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since my new project would require me to use web services, I decided to get my hands at it.</p>
<p><strong>Bottom-Up</strong> <strong>Approach To Writing Web Services</strong></p>
<p>The logical place to start would be take your plain old Java classes (POJOs, I love them) and expose their methods to to the web. Since you already have the implementation, this is called a bottom-up approach. And with Eclipse Ganymede and Apache Axis2 1.4.1, it was all a breeze. Just create a dynamic web project, create your POJO(s), create Web Service, choose bottom-up. The Axis2 plug-in  then creates a web service complete with WSDL (web service definition language) file and all. <a href="http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html">Here</a> are the details.</p>
<p>With some groping and googling, I was able to successfully connect my test Adobe Flex application to my web service with no problems.</p>
<p><strong>Top-Down</strong> <strong>Approach To Writing Web Services</strong></p>
<p>The next step was to do it the other way around, given a WSDL file which describes your web service in great detail, and implement your service. Since you start with just the web service description, it&#8217;s called a top-down approach. It was also a breeze. Create a dynamic web project, create a web service, choose top-down, give the location of the WSDL file (I used the WSDL generated earlier), and generate all the necessary classes along with TODO tags where you&#8217;re supposed to add your code. Put it in your implementation, compile, deploy, and you&#8217;re good to go. <a href="http://www.eclipse.org/webtools/community/tutorials/TopDownAxis2WebService/td_tutorial.html">Here</a> are the details.</p>
<p>With just a small adjustment in the WSDL URI, I was again able to successfully connect my test Adobe Flex application to my web service with no problems.</p>
<p>All this with no need to mess around with HTTP (it&#8217;s just the transport), SOAP (it&#8217;s just the protocol), or WSDL (it is generated). Java tooling sure makes web services easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chasingdaydreams.com/2009/08/web-services-with-apache-axis2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

