<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jayway Team Blog » Web</title>
	
	<link>http://blog.jayway.com</link>
	<description>Sharing Experience</description>
	<pubDate>Wed, 18 Mar 2009 10:13:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/jayway/posts/web" /><feedburner:info uri="jayway/posts/web" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>On Twitter…</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/O00QsCKcGBI/</link>
		<comments>http://blog.jayway.com/2009/03/17/on-twitter/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 14:49:28 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=1161</guid>
		<description><![CDATA[Twitter has actually just recently gotten a lot of traction in Sweden and Scandinavia. Google Trends show this clearly which means that a Swedish blog-post about Twitter is still sort of relevant  
What is Twitter? Well, it’s a micro blog. Users post so called tweets, messages with 140 characters or less. You can tweet, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com">Twitter</a> has actually just recently gotten a lot of traction in Sweden and Scandinavia. <a href="http://www.google.com/trends?q=twitter&geo=swe&sa=N">Google Trends</a> show this clearly which means that a Swedish blog-post about Twitter is still sort of relevant <img src='http://blog.jayway.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What is Twitter? Well, it’s a micro blog. Users post so called tweets, messages with 140 characters or less. You can tweet, follow peoples tweets and search. That’s basically it. And this is cool why?</p>
<h3>Keep yourself updated</h3>
<p>For me, one of the key features of Twitter is that there are really interesting people twittering. If you go to <a href="http://wefollow.com">WeFollow</a> you’ll find people like <a href="http://twitter.com/kevinrose">Kevin Rose</a>, <a href="http://twitter.com/timoreilly">Tim O’Reilly</a> and <a href="http://twitter.com/guykawasaki">Guy Kawasaki</a> in the tech segment. Since they are active this means that you are able to listen to feeds from some of the, in their fields, most updated people. And Twitter is basically full of fantastic people to follow... like Chris Hughes (http://twitter.com/chews), less followed but equally interesting, who’s Twitter Bio says “I was the one of first to hack the iPhone. BOOOM”... In short, nothing is stopping anyone from evolving their web presence and getting people to follow them.</p>
<p>Before Twitter everyone knew people that where islands of new knowledge; people that seemed to have one ear to the ground and hear the most interesting things. With Twitter, these guys and girls broadcast their nuggets of information to the world, effectively building their personal brand and enabling everyone to listen to them. All of the sudden you have the opportunity to be as updated as these people are. Not only that, since you have the possibility to listen to multiple islands at once you can get a perspective of the entire world of islands... </p>
<p>Ok, there are great people to follow, and they share information, great links and insight, but this all sums up to a lot of information. Yes! In this day and age you have to accept a certain degree of white noise if you want to hear interesting signals... deal with it. Luckily there are plenty of tools to help you deal with it. I use <a href="http://www.tweetdeck.com/">TweetDeck</a> on my Mac, but there are tons of tools out there...</p>
<h3>The Twitter API</h3>
<p>The Twitter API is in my opinion is one of the most obvious reasons for Twitter success. It is an open API which anyone can use to create applications that uses Twitter data... and it’s silly simple, especially if you use the Java API <a href="http://code.google.com/p/java-twitter/">java-twitter</a>. The following is what is needed to login a user and print their friends timeline (the stream of tweets from people a person follows):</p>
<pre class="java"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> printFriendsTimeline<span style="color: #66cc66;">&#40;</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> username, <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> password<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> TwitterException<span style="color: #66cc66;">&#123;</span>
	Api api = <span style="color: #000000; font-weight: bold;">new</span> Api<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	api.<span style="color: #006600;">setCredentials</span><span style="color: #66cc66;">&#40;</span>username, password<span style="color: #66cc66;">&#41;</span>;
	Status<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> userTimeline = api.<span style="color: #006600;">getFriendsTimeline</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>Status status : userTimeline<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span>status.<span style="color: #006600;">getUser</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;:&quot;</span> + status.<span style="color: #006600;">getText</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>This means that anyone can do just about anything with the Twitter data. Your basic level of allowed requests is 100 request per hour and IP, but if your application is request-intensive you can ask Twitter for more and get up to 20.000 requests per hour and IP. Of course this has created a flora, or even an entire ecosystem, of applications and implementations where you can tweet, watch statistics, see the most tweeted links and everything you can imagine (just check out <a href="http://www.squidoo.com/twitterapps">this list</a>).</p>
<h3>Some tweeting advice</h3>
<p>Not that I’m an authority on this, but I still wanted to end with some advice on tweeting:</p>
<p>1. Create good content that you think people want to read. Did you published a blog post? Tweet about it. Going to a conference? Tweet about it. Did you find a new interesting framework? Tweet about it. Got a new fantastic insight? Tweet about it.</p>
<p>2. #tag your tweets. If you tweet “Just found out about this great API http://tr.im/hr8S” end it with describing #tags like this “Just found out about this great API http://tr.im/hr8S #java #dev #twitter” to make it searchable and to add more context. </p>
<p>3. Re-tweet/RT when you read a good tweet. RT is a user derived notation which is used when forwarding tweets. If you get “Jayway.com is a great company!” from me and love it you simply write “RT @mattiasask : Jayway.com is a great company!”. Applications like TweetDeck also help you with this...</p>
<p>4. Try to get re-tweeted if you want to spread you tweets. A tweet can travel by RT from social graph to social graph and reach a lot of people that way. Read Guy Kawasaki’s blog on how to get retweeted (http://blogs.openforum.com/2009/02/18/how-to-get-retweeted/) for more on this. </p>
<p>/Mattias Ask, <a href="http://twitter.com/mattiasask">@mattiasask</a></p>
<p>PS. I have to add cool thing about Twitter and the speed of updates, something Twitter co-founder Evan Williams <a href="http://www.ted.com/index.php/talks/evan_williams_on_listening_to_twitter_users.html">talked about at TED</a> this year. During the California forest fires in -07 Twitter followers where more updated about where the fires spread than the people listing to the traditional media sources where. Why? Because people in the actual areas where the fire spread were tweeting about it from their cellphones...</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/O00QsCKcGBI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/03/17/on-twitter/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2009/03/17/on-twitter/</feedburner:origLink></item>
		<item>
		<title>Mavenizing the Liferay Plugin SDK</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/e0p8BaaCxUQ/</link>
		<comments>http://blog.jayway.com/2009/03/14/mavenizing-the-liferay-plugin-sdk/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 08:58:00 +0000</pubDate>
		<dc:creator>Henrik Bernström</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Usability]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[archetype]]></category>

		<category><![CDATA[artifact]]></category>

		<category><![CDATA[liferay]]></category>

		<category><![CDATA[maven2]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[portlet]]></category>

		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=1094</guid>
		<description><![CDATA[Liferay is the leading Open Source enterprise portal platform in the Java market. It's certainly an impressive piece of software. I've been following it for some time now and the product is improving a great deal in many areas, perhaps most in end user usability.
One area that, in my opinion, could still be improved is [...]]]></description>
			<content:encoded><![CDATA[<p>Liferay is the leading Open Source enterprise portal platform in the Java market. It's certainly an impressive piece of software. I've been following it for some time now and the product is improving a great deal in many areas, perhaps most in end user usability.</p>
<p>One area that, in my opinion, could still be improved is the development environment. It may be a heck of a good build system <a href="http://www.liferay.com">Liferay</a> has come up with, but at the bottom line it takes time to learn it and to just start studying it you easily become a bit uncertain. It consists of homegrown ant scripts. To have a flatter learning curve for newcomers <a href="http://maven.apache.org/">Maven 2</a> might be suitable.</p>
<p>Anyway, I sat down one evening some time ago and looked into how Maven 2 could be used for creating Jsp Portlets for Liferay. Some hours later the work had resulted in a new archetype for creating Liferay Jsp Portlets. </p>
<p><a href="http://svn.liferay.com/browse/plugins/trunk/tools/portlet_tmpl">The structure and content of the standard Liferay Jsp Portlet can be viewed here.</a></p>
<h3>So, what did I do?</h3>
<p>1. I followed these instructions to manipulate the Jsp Portlet part of Liferay's plugin SDK into a maven archetype:</p>
<p><a href="http://maven.apache.org/guides/mini/guide-creating-archetypes.html">http://maven.apache.org/guides/mini/guide-creating-archetypes.html</a></p>
<p>This involved editing these property and xml files:</p>
<pre>liferay-plugin-package.properties
name=${artifactId}
module-group-id=liferay
module-incremental-version=1
tags=
short-description=
change-log=
page-url=http://www.liferay.com
author=Liferay, Inc.
licenses=MIT
</pre>
<pre class="xml">portlet.xml
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;portlet-app</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot;</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;portlet<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;portlet-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>jspPortlet<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/portlet-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;display-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>${artifactId}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/display-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;portlet-class<span style="font-weight: bold; color: black;">&gt;</span></span></span>${groupId}.JSPPortlet<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/portlet-class<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;init-param<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>view-jsp<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value<span style="font-weight: bold; color: black;">&gt;</span></span></span>/view.jsp<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/init-param<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;expiration-cache<span style="font-weight: bold; color: black;">&gt;</span></span></span>0<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/expiration-cache<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;supports<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mime-type<span style="font-weight: bold; color: black;">&gt;</span></span></span>text/html<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mime-type<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/supports<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;portlet-info<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;title<span style="font-weight: bold; color: black;">&gt;</span></span></span>${artifactId}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/title<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;short-title<span style="font-weight: bold; color: black;">&gt;</span></span></span>${artifactId}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/short-title<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;keywords<span style="font-weight: bold; color: black;">&gt;</span></span></span>${artifactId}<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/keywords<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/portlet-info<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>administrator<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>guest<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>power-user<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>user<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/role-name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/security-role-ref<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/portlet<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/portlet-app<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>to insert ${artifactId} and ${groupId} for the portlet name and package structure. These files are part of the file list finally being wrapped up within the archetype and used to generate the resulting portlet from Maven 2.</p>
<p>2. I ran '<strong>mvn install</strong>' on that particular archetype to have it installed in my local repository.</p>
<p>3. I used the archetype to create a new Liferay Jsp Portlet artifact:</p>
<pre>
mvn archetype:create -DarchetypeGroupId=com.liferay.maven.archetypes.portlet.jsp
  -DarchetypeArtifactId=liferay-jsp-portlet
  -DarchetypeVersion=1.0-SNAPSHOT
  -DgroupId=[my.package]
  -DartifactId=[MyFirstLiferayJspPortlet]
</pre>
<p>4. I stepped into the artifact and ran '<strong>mvn install</strong>' on it which generated my MyFirstLiferayJspPortlet-1.0-SNAPSHOT.war.</p>
<p>5. I then uploaded the war file to my portal instance via the Liferay admin GUI Plugin Installer.</p>
<p>6. Et voila. It worked, showing up in the portal.</p>
<p>And of course, worth mentioning, to have a development environment up and running in eclipse in seconds this is all you have to do:</p>
<pre>
1. mvn eclipse:add-maven-repo -Declipse.workspace=[full-path-to-workspace]

2. mvn eclipse:eclipse
</pre>
<p>To have the archetype play with the existing build situation of Liferay it would probably need to be generated from some ant target and be based on the portlet template in subversion located at "plugins/tools/portlet_tmpl/" to have it follow updates of Liferay.</p>
<p><a href="https://blog.jayway.com/wp-content/uploads/2009/03/jspportlet-archetype.zip">Here you can download the final result, as a zipped archetype.</a></p>
<p>If a generated archetype like this was to be uploaded to a public maven repository, working from above point #3 and down is what would be necessary for a developer to have a project and all the necessary property and xml files (correctly edited with package structures and all) in place for a Liferay Jsp Portlet development environment. It could at least become a complement to the Plugins SDK. And yes, it could for sure still be enhanced. For example, there is no JSPPortletTest class generated for the JSPPortlet class.</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/e0p8BaaCxUQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/03/14/mavenizing-the-liferay-plugin-sdk/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2009/03/14/mavenizing-the-liferay-plugin-sdk/</feedburner:origLink></item>
		<item>
		<title>OpenCauses.org - Do Good.</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/Vrxq_jF8sMA/</link>
		<comments>http://blog.jayway.com/2009/02/25/opencausesorg-do-good/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 15:32:57 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
		
		<category><![CDATA[Innovation]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[donations]]></category>

		<category><![CDATA[opencauses]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=962</guid>
		<description><![CDATA[I had the opportunity to present the Way Group initiated project OpenCauses.org at TED@PalmSprings this year. It was a fantastic experience and I got a great response on the project. But what is it we are doing with OpenCauses.org?
For good or for bad, the market is unprecedented in its power to generate wealth. What if [...]]]></description>
			<content:encoded><![CDATA[<p>I had the opportunity to <a href="http://blog.ted.com/2009/02/friday_mornings.php">present</a> the <a href="http://www.waygroup.se/">Way Group</a> initiated project <a href="http://opencauses.org">OpenCauses.org</a> at <a href="http://www.ted.com">TED@PalmSprings</a> this year. It was a fantastic experience and I got a great response on the project. But what is it we are doing with <a href="http://opencauses.org">OpenCauses.org</a>?</p>
<p>For good or for bad, the market is unprecedented in its power to generate wealth. What if we could use this power, not to generate wealth, but to generate good?</p>
<p>Since the market understands money really well, why not create representative money based on donations? If we do this, everyone will be able to handle donations as money. We could own it, measure it, trade with it, work to generate more of it... and every cent of it would represent donations for good causes.</p>
<p>This is what <a href="http://www.opencauses.org">OpenCauses.org</a> is doing.</p>
<p><a href="http://www.opencauses.org">OpenCauses.org</a> really only aims to change <em>one</em> word. Instead of saying “I <em>make</em> donations to good causes” you will say “I <em><strong>buy</strong></em> donations to good causes”. This slight change makes all the difference. </p>
<p><strong>What is it we are doing?</strong><br />
We are creating the Open Causes Platform, a non-profit donation platform, which will enable donations to causes aimed at the <a href="http://www.un.org/millenniumgoals/">UN Millennium Development Goals</a>. The Open Causes Platform will also hold Cause Credits. Causes Credits is representative money based on donations. This means that each Causes Credit represents a donation made to a good cause. </p>
<p>When you donate through the Open Causes Platform you receive Cause Credits for your donation. Your Cause Credits are measurable and accumulative, and  they are also transferable between users of the platform. All this combined effectively makes Cause Credits into a means of trade.</p>
<p>The Open Causes Platform is an infrastructural platform which exposes a number of web-services. With these services integrators can integrate basically any site or Internet connected product to the platform. Anyone can create pretty much any implementation of donation based services imaginable. They will be able to make donations, show how much users have donated, compare and transfer donation. </p>
<p><strong>Using Cause Credits</strong><br />
If you, as a person or an organization, own 100 Cause Credits you have donated $100 through the Open Causes Platform. If you later donate $10 more, you own 110 Cause Credits. </p>
<p>Now, let’s say that I have a cellular phone that I don’t use. If you give me your 110CC, I’ll give you my phone. If so, I have made the actual donations for $110 and you have bought my phone in two steps. The value of my phone has paid for the $110 donation. You now own a phone, but have not made any donations.</p>
<p><strong>Summary</strong><br />
We are implementing a currency based on donations. Essentially we want to complement the market of today with a market based on generosity. Just imagine if every corporation where to accept a currency based on donations for 1% of their services and products... What couldn’t we do then?</p>
<p>Mattias Ask,<br />
Founder of <a href="http://opencauses.org">OpenCauses.org</a></p>
<p>If you have any questions or want more information about the project,  go to <a href="http://www.opencauses.org">OpenCauses.org</a> or contact me at mattias.ask@opencauses.org.</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/Vrxq_jF8sMA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/02/25/opencausesorg-do-good/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2009/02/25/opencausesorg-do-good/</feedburner:origLink></item>
		<item>
		<title>How to get your Joomla! in a sub-directory to work at One.com</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/yOtHH6qXAlk/</link>
		<comments>http://blog.jayway.com/2009/01/31/how-to-get-your-joomla-in-a-sub-directory-to-work-at-onecom/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 08:38:06 +0000</pubDate>
		<dc:creator>Magnus Palmér</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[cms]]></category>

		<category><![CDATA[htaccess]]></category>

		<category><![CDATA[joomla]]></category>

		<category><![CDATA[mod_rewrite]]></category>

		<category><![CDATA[sef]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=831</guid>
		<description><![CDATA[I've spent quite some time getting my private Joomla!  site to work the way I want with urls.
A short good step-by-step has for me proven very hard to find.
Several guides and post have been close, but still failed at the end for various reasons, so I'll explain briefly what I wanted to achieve and [...]]]></description>
			<content:encoded><![CDATA[<p>I've spent quite some time getting my private <a href="http://www.joomla.org">Joomla! </a> site to work the way I want with urls.<br />
A short good step-by-step has for me proven very hard to find.<br />
Several guides and post have been close, but still failed at the end for various reasons, so I'll explain briefly what I wanted to achieve and then exactly what does the trick.<br />
I have my private domain, <a href="http://www.rfc-editor.org/rfc/rfc2606.txt">http://www.example.com</a> hosted by One.com.<br />
I'm using Joomla! for the main site, and then various other stuff in subdomains, like forum.example.com for my forum.<br />
However I want to have my current active Joomla! installation in a subdirectory on the server but not show in the url of the browser.<br />
I also like to have only one way of using the site, either with www or without.<br />
So my setup expressed as example is this:</p>
<blockquote><p><strong>Domain:</strong> www.example.com<br />
<strong>Webhost:</strong> One.com<br />
<strong>File path on server:</strong> /joomla/
</p></blockquote>
<p>Default links like <a href="http://longcomplexurl.example">http://www.example.com/joomla/index.php?option=com_contact&view=contact&id=1&Itemid=13&lang=en</a> it should show as <a href="http://shorturl.example">http://example.com/en/contact</a> instead.</p>
<p>I'll not go into reasoning why, this is the way I want to have it, and if this is how you want it too, please keep on reading, you are close...</p>
<p>These are the steps you need to do:</p>
<ol>1. Edit your webroot .htaccess</ol>
<ol>2. Rename and then edit your default Joomla! htaccess.txt</ol>
<ol>3. Configure Joomla! to use SEF and Apache mod_rewrite</ol>
<p>Ok, now to the task of getting that htaccess correct, checking out the mod_rewrite documentation on the <a href="http://httpd.apache.org/docs/2.2/rewrite/">Apache</a> site you get the following encouraging quotes to digest:</p>
<blockquote><p>
<em>"The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.''</em><br />
-- Brian Behlendorf<br />
Apache Group<br />
<em>"Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.''</em><br />
-- Brian Moore<br />
bem@news.cmc.net
</p></blockquote>
<p>Instead of figuring out how to to this, I of course use my favorite search engine to get a post that has already done it, but no, I didn't find a single post that gave me the answer, some were close as I've already mentioned.<br />
The thing is, it is depending upon your servers configuration, which can vary in so many ways, and by having your site on a cheap Webhost like I have, you have very scarce information. So, post that did the trick for some people, did not work for me on One.com.<br />
So I ended up actually having  to learn something about it...</p>
<p>Enough talking, now to business:</p>
<p>1. Edit your .htaccess in your webroot directory on the server. <strong>Note:</strong>www.example.com should be replaced by your domain and that /joomla with the directory you have your live joomla in.</p>
<blockquote><p>
# Make sure mod_rewrite is on, this is ok even if it is already on higher up in the hierarchy.<br />
RewriteEngine On</p>
<p>#Match all www and do a permanent redirect from www.example.com to example.com<br />
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]<br />
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]</p>
<p>#Ok, now get rid of that joomla directory in the resulting url.<br />
RewriteCond %{REQUEST_URI} !^/joomla/<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d</p>
<p>RewriteRule ^(.*)$ /joomla/$1 [L]<br />
RewriteRule ^(/)?$ joomla/index.php [L]
</p></blockquote>
<p>2. Now edit your htaccess.txt in your root Joomla directory and when done, rename it to .htaccess</p>
<blockquote><p>
#Make sure this is commented and not active, otherwise nothing will work.<br />
#Options +FollowSymLinks</p>
<p>#Uncomment all RewriteCond and RewriteRule in this section<br />
########## Begin - Joomla! core SEF Section</p>
<p>########## End - Joomla! core SEF Section</p>
<p>#Uncomment all RewriteCond and RewriteRule in this section<br />
########## Begin - Rewrite rules to block out some common exploits</p>
<p>########## End - Rewrite rules to block out some common exploits
</p></blockquote>
<p>3. Now, edit your configuration.php in your Joomla root directory.<br />
<code><br />
$live_site	='http://example.com'<br />
$sef	= '1'<br />
$sef_rewrite = '1'<br />
$sef_suffix = '0'<br />
</code><br />
Alternatively using the admin backend.<br />
Site --> Global Configuration --> Site --> SEO Settings<br />
<img src="http://blog.jayway.com/wp-content/uploads/2009/01/joomla-seo-settings.png" alt="joomla-seo-settings" title="joomla-seo-settings" width="467" height="123" class="alignnone size-full wp-image-861" /><br />
Still, you have to edit manually the configuration.php for the live_site, this was added in Joomla! 1.5.2 to enable Joomla to reside in a subdirectory and generate urls with a different root.</p>
<p>Well, that's it, now it should work like a charm <img src='http://blog.jayway.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/yOtHH6qXAlk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/01/31/how-to-get-your-joomla-in-a-sub-directory-to-work-at-onecom/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2009/01/31/how-to-get-your-joomla-in-a-sub-directory-to-work-at-onecom/</feedburner:origLink></item>
		<item>
		<title>Executable .war with winstone-maven-plugin</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/hnrVQdrj54A/</link>
		<comments>http://blog.jayway.com/2008/11/28/executable-war-with-winstone-maven-plugin/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:37:26 +0000</pubDate>
		<dc:creator>Hugo Josefson</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[executable]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[maven]]></category>

		<category><![CDATA[tricks]]></category>

		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=484</guid>
		<description><![CDATA[You don't need to install Tomcat, JBoss or any other web server in order to run a Java web application (.war file)!
If your project is configured with a Maven pom.xml and the module has &#60;packaging&#62;war&#60;/packaging&#62;, you can just add this little piece of XML inside the pom's &#60;plugins&#62; tag:
&#60;plugin&#62;
    &#60;groupId&#62;net.sf.alchim&#60;/groupId&#62;
   [...]]]></description>
			<content:encoded><![CDATA[<p>You don't need to install Tomcat, JBoss or any other web server in order to run a Java web application (.war file)!</p>
<p>If your project is configured with a Maven <code>pom.xml</code> and the module has <code>&lt;packaging&gt;war&lt;/packaging&gt;</code>, you can just add this little piece of XML inside the pom's <code>&lt;plugins&gt;</code> tag:</p>
<pre>&lt;plugin&gt;
    &lt;groupId&gt;net.sf.alchim&lt;/groupId&gt;
    &lt;artifactId&gt;winstone-maven-plugin&lt;/artifactId&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;goals&gt;
                &lt;goal&gt;embed&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;phase&gt;package&lt;/phase&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;
</pre>
<p>Then, when you run...</p>
<pre>mvn install</pre>
<p>...winstone-maven-plugin will automatically create a <code>*-standalone.jar</code> file for you, which contains your web application.</p>
<div id="attachment_501" class="wp-caption alignright" style="width: 310px"><a href="http://blog.jayway.com/wp-content/uploads/2008/11/winstone-maven-plugin-screenshot2.png"><img class="size-medium wp-image-501" title="winstone-maven-plugin-screenshot2" src="http://blog.jayway.com/wp-content/uploads/2008/11/winstone-maven-plugin-screenshot2-300x150.png" alt="Standalone .jar file, along with the .war file." width="300" height="150" /></a><p class="wp-caption-text">Standalone .jar file, along with the .war file.</p></div>
<p>You can run that .jar file as a standalone application, which runs your included web application on port 8080 by default:</p>
<pre>java -jar target/*-standalone.jar</pre>
<p>No web server installation necessary! No external files required! (You don't even need the .war file anymore.)</p>
<p>The resulting .jar file is actually <a href="http://winstone.sourceforge.net/">the servlet container Winstone</a>, with your .war file deployed inside it.</p>
<p>There are more configuration options on <a href="http://alchim.sourceforge.net/winstone-maven-plugin/usage.html">winstone-maven-plugin's usage page</a>.</p>
<p>I want to disable some default features of Winstone for security reasons, because they are not needed: ajp13 listener on a separate port, servlet invoker and directory listings. This is the complete plugin configuration I usually use myself:</p>
<pre>&lt;plugin&gt;
    &lt;groupId&gt;net.sf.alchim&lt;/groupId&gt;
    &lt;artifactId&gt;winstone-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.2&lt;/version&gt;
    &lt;configuration&gt;
        &lt;cmdLineOptions&gt;
            &lt;property&gt;
                &lt;name&gt;httpPort&lt;/name&gt;
                &lt;value&gt;8080&lt;/value&gt;
            &lt;/property&gt;
            &lt;property&gt;
                &lt;name&gt;ajp13Port&lt;/name&gt;
                &lt;value&gt;-1&lt;/value&gt;
            &lt;/property&gt;
            &lt;property&gt;
                &lt;name&gt;controlPort&lt;/name&gt;
                &lt;value&gt;-1&lt;/value&gt;
            &lt;/property&gt;
            &lt;property&gt;
                &lt;name&gt;directoryListings&lt;/name&gt;
                &lt;value&gt;false&lt;/value&gt;
            &lt;/property&gt;
            &lt;property&gt;
                &lt;name&gt;useInvoker&lt;/name&gt;
                &lt;value&gt;false&lt;/value&gt;
            &lt;/property&gt;
        &lt;/cmdLineOptions&gt;
    &lt;/configuration&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;goals&gt;
                &lt;goal&gt;embed&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;phase&gt;package&lt;/phase&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;</pre>
<p>You can temporarily override these configuration parameters if you like, using command-line options when executing the standalone .jar file. Find them with <code>--help</code> when you run the .jar.</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/hnrVQdrj54A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/11/28/executable-war-with-winstone-maven-plugin/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2008/11/28/executable-war-with-winstone-maven-plugin/</feedburner:origLink></item>
		<item>
		<title>Running Selenium RC with Firefox 3</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/JPd-a5g5P3A/</link>
		<comments>http://blog.jayway.com/2008/11/12/running-selenium-rc-with-firefox-3/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 10:22:46 +0000</pubDate>
		<dc:creator>Joakim Back</dc:creator>
		
		<category><![CDATA[Testing]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[automated testing]]></category>

		<category><![CDATA[firefox 3]]></category>

		<category><![CDATA[selenium]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=393</guid>
		<description><![CDATA[After running into proxy errors attempting to run Selenium tests with Opera 9.62 and being unable to install Firefox 2 on Ubuntu 8.10 (unsatisfied package dependencies..) I finally ran into this gem:
Hi,

On windows I succeeded to run  Selenium RC and Firefox 3 using the following steps
1. run firefox in profilemanager mode ("path\to\firefox.exe" -profilemanager)
2. create new [...]]]></description>
			<content:encoded><![CDATA[<p>After running into proxy errors attempting to run Selenium tests with Opera 9.62 and being unable to install Firefox 2 on Ubuntu 8.10 (unsatisfied package dependencies..) I finally ran into <a href="http://clearspace.openqa.org/message/48380#48380">this gem</a>:</p>
<p><em>Hi,</em><br />
<em><br />
On windows I succeeded to run  Selenium RC and Firefox 3 using the following steps</em></p>
<p><em>1. run firefox in profilemanager mode ("path\to\firefox.exe" -profilemanager)<br />
2. create new profile (e.g. selenese) with a specific path (e.g.a directory in your workspace)<br />
3. open this new profile from within the profile manager and change the proxy settings within firefox (localhost:4444 or change accordingly in case your selenium RC server runs on a different port)<br />
4. use the following browser string within Selenium RC:  *custom path\to\firefox.exe -no-remote -profile path\to\profile\selenese</em></p>
<p>I had to enable popups for the profile, but other than that.. the solution seems to work fine on ubuntu as well!</p>
<p>Edit: <a href="http://notetodogself.blogspot.com/2008/10/use-selenium-rc-in-firefox-3.html">Here's a different work-around</a>. I haven't tried it, but it does have the benefit of a generic browser path.</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/JPd-a5g5P3A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/11/12/running-selenium-rc-with-firefox-3/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2008/11/12/running-selenium-rc-with-firefox-3/</feedburner:origLink></item>
		<item>
		<title>Wicket Javascript Internals dissected</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/gUjx68Fo0Hk/</link>
		<comments>http://blog.jayway.com/2008/09/26/wicket-javascript-internals-dissected/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 12:20:25 +0000</pubDate>
		<dc:creator>Nino Martinez</dc:creator>
		
		<category><![CDATA[Frameworks]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=290</guid>
		<description><![CDATA[SO you need to do something special with a javascript and you want to integrate that with wicket. In my last article I looked at this from the wicket side and wrote about what you can do to push something out from wicket. But what if you want to interact? Then you will have to take a peek at wickets javascript internals. If you are working on an ajax component you get these wicket javascript source files included as default [...]]]></description>
			<content:encoded><![CDATA[<p>SO you need to do something special with a javascript and you want to integrate that with wicket. In my <a href="http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/">last article</a> I looked at this from the wicket side and wrote about what you can do to push something out from wicket. But what if you want to interact? Then you will have to take a peek at wickets javascript internals. If you are working on an ajax component you get these wicket javascript source files included as default:</p>
<ol>
<li>wicket-event.js</li>
<li>wicket-ajax.js</li>
</ol>
<h3>wicket-event.js</h3>
<p>This file contains everything Wicket needs for event handling, but also methods for detecting browser like Wicket.Browser.isIELessThan7() which could come in handy if youre doing your own script, no need to write it again.. </p>
<h3>wicket-ajax.js</h3>
<p>This file hold everything Wicket needs for doing ajax. So it's a big file containing a lot of interesting possibilities.</p>
<p>The most interesting method are wicketAjaxGet its the way to contact the server doing ajax. It's signature are this:</p>
<pre class="javascript">&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> wicketAjaxGet<span style="color: #66cc66;">&#40;</span>url, successHandler, failureHandler, precondition, channel<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>The first parameter are the url for wicketAjaxGet to call server side with, it usually gets generated from serverside, and you can add parameters to it and get them server side. Furthermore it takes 3 functions and a channel. Channel are also usually populated for you so dont think about that. The functions however are called either on sucess, failure or as a precondition. These supply very nice options for you if you need to do something special with the result of the wicketAjaxGet you can put in callbacks. Small example from the mooTip ajax integration:</p>
<pre class="javascript">&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> mootipAjaxtooltip022<span style="color: #66cc66;">&#40;</span>callback<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> content=<span style="color: #3366CC;">''</span>;wicketAjaxGet<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'?wicket:interface=:0:tooltip02::IBehaviorListener:1:'</span>,
 <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">var</span> tip=document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'mooTipContent'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">innerHTML</span>;
 <span style="color: #003366; font-weight: bold;">var</span> callbackInside=callback;
 <span style="color: #003366; font-weight: bold;">var</span> runCallback=  callbackInside.<span style="color: #006600;">pass</span><span style="color: #66cc66;">&#40;</span>tip<span style="color: #66cc66;">&#41;</span>;
 runCallback<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
, <span style="color: #003366; font-weight: bold;">null</span>,<span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p>As you can see, if you count the parameters, I put in a success method for wicket to call once the request has finished, in this case it sets up a tooltip and displays it, by a method thats passed along using the content of the dom element called 'mooTipContent'.</p>
<p>Theres also lighter methods like for example wicketHide and wicketshow. Methods for manipulating visibility of dom objects. Theres many more functions in there. But these should get you going.</p>
<h3>The complete package</h3>
<p>A small example that shows a invisible veil when a abstractajaxTimerEventBehavior is called:</p>
<pre class="javascript">&nbsp;
css/html:
#veil<span style="color: #66cc66;">&#123;</span>
position:absolute;top:<span style="color: #CC0000;">0</span>;left:<span style="color: #CC0000;">0</span>;
 width:<span style="color: #CC0000;">100</span>%;height:<span style="color: #CC0000;">100</span>%;
 z-index: <span style="color: #CC0000;">99</span>;
 <span style="color: #009900; font-style: italic;">/*cursor: wait;*/</span>
 <span style="color: #66cc66;">&#125;</span>
&lt;<span style="color: #3366CC;">&quot;p id=&quot;</span>veil<span style="color: #3366CC;">&quot; style='display: none;' &quot;</span>&gt;&lt;<span style="color: #3366CC;">&quot;/p&quot;</span>&gt;
Java:
		AbstractAjaxTimerBehavior ajaxTimerBehavior = <span style="color: #003366; font-weight: bold;">new</span> AbstractAjaxTimerBehavior<span style="color: #66cc66;">&#40;</span>
				Duration.<span style="color: #006600;">seconds</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			@Override
			<span style="color: #003366; font-weight: bold;">protected</span> CharSequence getCallbackScript<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #009900; font-style: italic;">// TODO Auto-generated method stub</span>
				<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;wicketShow('veil');&quot;</span> + <span style="color: #003366; font-weight: bold;">super</span>.<span style="color: #006600;">getCallbackScript</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			@Override
			<span style="color: #003366; font-weight: bold;">protected</span> CharSequence getSuccessScript<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #009900; font-style: italic;">// TODO Auto-generated method stub</span>
				<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;wicketHide('veil');&quot;</span> + <span style="color: #003366; font-weight: bold;">super</span>.<span style="color: #006600;">getSuccessScript</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
....
&nbsp;</pre>
<p>And thats it, now you should be ready to do your own stuff <img src='http://blog.jayway.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/gUjx68Fo0Hk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/09/26/wicket-javascript-internals-dissected/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2008/09/26/wicket-javascript-internals-dissected/</feedburner:origLink></item>
		<item>
		<title>Squid, the caching proxy</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/P_hk7AIWYNE/</link>
		<comments>http://blog.jayway.com/2008/06/06/squid-the-caching-proxy/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 17:37:34 +0000</pubDate>
		<dc:creator>Ulrik Sandberg</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[cache]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=85</guid>
		<description><![CDATA[I just checked out the old Squid again, the worlds most famous caching proxy. If you direct all your web access through the Squid proxy server, it will cache stuff after the first access. This would simplify for example for labs where fifty people simultaneously begin retrieving stuff from a Maven repo somewhere or downloading [...]]]></description>
			<content:encoded><![CDATA[<p>I just checked out the old <a href="http://www.squid-cache.org/">Squid</a> again, the worlds most famous caching proxy. If you direct all your web access through the Squid proxy server, it will cache stuff after the first access. This would simplify for example for labs where fifty people simultaneously begin retrieving stuff from a Maven repo somewhere or downloading required libraries, and we have a very limited bandwidth.</p>
<p>On the Mac it was easy to get running (if you have <a href="http://www.macports.org/">MacPorts</a>):</p>
<pre>% sudo port install squid
% sudo squid -z (initialize stuff if you never ran Squid before)
% sudo squid -N -d 1 (no daemon, debug level 1)</pre>
<p>Then it was running on the console, and you could test it like this:</p>
<pre>% squidclient http://google.com
...
X-Cache: MISS from myhostname
Via: 1.0 myhostname:3128 (squid/2.7.STABLE2)</pre>
<p>And again, this time fetching from the cache:</p>
<pre>% squidclient http://google.com
...
X-Cache: HIT from myhostname
Via: 1.0 myhostname:3128 (squid/2.7.STABLE2)</pre>
<p>You configure your browser by simply setting proxy server to <code>localhost:3128</code>, if you are running your Squid locally, that is.</p>
<p>Maven is probably best configured in <code>~/.m2/settings.xml</code>:</p>
<pre>&lt;settings xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/xmlSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  &lt;proxies&gt;
    &lt;proxy&gt;
      &lt;active&gt;true&lt;/active&gt;
      &lt;protocol&gt;http&lt;/protocol&gt;
      &lt;host&gt;localhost&lt;/host&gt;
      &lt;port&gt;3128&lt;/port&gt;
    &lt;/proxy&gt;
  &lt;/proxies&gt;
&lt;/settings&gt;</pre>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/P_hk7AIWYNE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/06/06/squid-the-caching-proxy/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2008/06/06/squid-the-caching-proxy/</feedburner:origLink></item>
		<item>
		<title>Using Amazon S3 for backup</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/-XSZdcPDaBk/</link>
		<comments>http://blog.jayway.com/2007/09/02/using-amazon-s3-for-backup/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 21:50:20 +0000</pubDate>
		<dc:creator>Ulrik Sandberg</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[amazon]]></category>

		<category><![CDATA[backup]]></category>

		<category><![CDATA[mac]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[s3]]></category>

		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=162</guid>
		<description><![CDATA[Amazon Simple Storage Service (S3) is cheap on-line storage with a Web Service interface. You just log in with your Amazon id, sign up for S3, designate a credit card, and that's it. You now have access to pretty much unlimited storage space, managed by Amazon. The price is $0.15 per GB-Month of storage used [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/s3">Amazon Simple Storage Service (S3)</a> is cheap on-line storage with a Web Service interface. You just log in with your Amazon id, sign up for S3, designate a credit card, and that's it. You now have access to pretty much unlimited storage space, managed by Amazon. The price is $0.15 per GB-Month of storage used (plus transfer costs). It was too tempting; I simply had to test it.</p>
<p>I used the <a href="http://jungledisk.com/">Jungle Disk</a> software to provide the mapping from the S3 web service interface to a network drive. You give Jungle Disk your S3 account information, and it provides a network disk which you can use as the backup device. I first tried my existing backup software (<a href="http://www.qdea.com/pages/pages-sprox/sprox1.html">Synchronize! Pro X</a>) and it happily began creating directories and copying files. I then tried the backup feature built into Jungle Disk, and it works fine too. It's not fast compared to a local FireWire disk. It's limited to your upload bandwidth, which often is substantially smaller than the download bandwidth.</p>
<p>Anyway, it has been tugging along today storing 5 GB of by digital photos. It feels pretty good to know that my photos are now stored encrypted and with 99.99% availability somewhere far far away, costing me only 75 cents per month after the initial $2 for the transfer.</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/-XSZdcPDaBk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2007/09/02/using-amazon-s3-for-backup/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2007/09/02/using-amazon-s3-for-backup/</feedburner:origLink></item>
		<item>
		<title>Sharing a Mac Internet Connection Through Airport</title>
		<link>http://feedproxy.google.com/~r/jayway/posts/web/~3/_Elgkf4JOBk/</link>
		<comments>http://blog.jayway.com/2007/01/20/sharing-a-mac-internet-connection-through-airport/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 21:02:03 +0000</pubDate>
		<dc:creator>Ulrik Sandberg</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[internet]]></category>

		<category><![CDATA[mac]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=183</guid>
		<description><![CDATA[I just solved a networking problem on my Macs after hours of trying. For the benefit of others, I'll describe here the problem and the solution.
Setup
Cable modem from ISP, network cable to a firewall, the private end of the firewall via network cable on to a switch. Pretty basic, I guess. No wireless base stations [...]]]></description>
			<content:encoded><![CDATA[<p>I just solved a networking problem on my Macs after hours of trying. For the benefit of others, I'll describe here the problem and the solution.</p>
<h3>Setup</h3>
<p>Cable modem from ISP, network cable to a firewall, the private end of the firewall via network cable on to a switch. Pretty basic, I guess. No wireless base stations or anything. Just an iMac connected via network cable to the switch.</p>
<h3>Problem</h3>
<p>Share the iMac's network cable connection through its Airport wireless capability. The client is a MacBook Pro. Basically, I just want to get Internet access on my laptop via the iMac. Sounds simple, but hey, it took me half a day and plenty of research to figure out.</p>
<h4>Useful pieces of information gathered during this adventure</h4>
<ol>
<li>Turning on Internet Connection Sharing (ICS) will start a DHCP server.</li>
<li>Turning on ICS will create a full Airport network (not a computer-to-computer network).</li>
<li>Turning on ICS will create a new network configuration for 10.0.2.1, which I understand is the same address as the Airport base stations use.</li>
</ol>
<h3>Solution</h3>
<ol>
<li>On the iMac, set the Airport network to "Use DHCP with manual address" and set the IP to 10.0.2.1. Set the DNS servers to the ones recommended by your ISP. Apply.</li>
<li>On the iMac, go to Sharing|Internet and choose AirPort Options. Enable WEP encryption (I chose 40-bit with a 5 character password). The default network name is your computer name. I added a postfix to the network name ("-ics") so I can distinguish it from the computer-to-computer network. Apply.</li>
<li>Now start sharing your Built-in Ethernet connection to computers using Airport. As I mentioned previously, this will create the new network and also start a DHCP server.</li>
<li>On the MacBook, set the Airport network to "Use DHCP". Leave all fields blank.</li>
<li>On the MacBook, connect to the newly created network, which should be named "hostname-ics" if you followed my naming advice earlier. Watch the network configuration. Eventually it shows the IP 10.0.2.2.</li>
</ol>
<p>That's it. You should now have access to your other machines on your private network, but also to Internet.</p>
<img src="http://feeds.feedburner.com/~r/jayway/posts/web/~4/_Elgkf4JOBk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2007/01/20/sharing-a-mac-internet-connection-through-airport/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.jayway.com/2007/01/20/sharing-a-mac-internet-connection-through-airport/</feedburner:origLink></item>
	</channel>
</rss>
