<?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>Code3 &#187; JEE</title>
	<atom:link href="http://www.code3.dk/tag/jee/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code3.dk</link>
	<description>Techchat</description>
	<lastBuildDate>Thu, 17 Nov 2011 13:10:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Groovy web shells – ajaxgroovyshell</title>
		<link>http://www.code3.dk/groovy-web-shells-%e2%80%93-ajaxgroovyshell/</link>
		<comments>http://www.code3.dk/groovy-web-shells-%e2%80%93-ajaxgroovyshell/#comments</comments>
		<pubDate>Tue, 19 May 2009 14:16:39 +0000</pubDate>
		<dc:creator>AN</dc:creator>
				<category><![CDATA[Techchat]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[JEE]]></category>

		<guid isPermaLink="false">http://www.code3.dk/?p=298</guid>
		<description><![CDATA[For the JEE web-app I am currently working on the main audience is power users/admins. So while I can code [...]]]></description>
			<content:encoded><![CDATA[<p>For the JEE web-app I am currently working on the main audience is power users/admins. So while I can code some usecases as nice seam pages that help the user solve a task, other usecase are difficult. The most difficult are the general batch processes that take the form &#8220;select, filter, apply&#8221;.</p>
<p>Unix users (who use shell scripts) know that a small amount of programming is effective at solving these problems. So for my web-app I was contemplating how to get something &#8220;shell-like&#8221; into the project. There are several projects that present a nice AJAX based web interface to the system shell on unix machines. Eg. <a href="http://code.google.com/p/shellinabox">shellinabox</a> and <a href="http://antony.lesuisse.org/software/ajaxterm/">ajaxterm</a>. And there are several programming languages that seem suited for interacting with a Java app. Eg. <a href="http://groovy.codehaus.org/">Groovy</a>, Jython, or Beanshell.</p>
<p>So I decided to try to combine the interactive groovy shell with an ajax frontend. After looking around quite a lot I found shellinabox which has a nice GPL&#8217;ed javascript vt100 front end (I found another <a href="http://fzort.org/bi/o.php">here</a> which is LGPL&#8217;ed).</p>
<p>After a some weekend studies of shellinabox I could make a prototype with the vt100.js of shellabox and the nice little python webserver of ajaxterm. With a little more hacking I was able to hook up the groovyshell as a web-app through a java servlet. The interactive performance sucked, because of some weirdness in standard java.io.PipedInput/OutputStream classes, but fortunately I was not the first with that problem so with some small hacks to the replacement classes from <a href="http://www.live-graph.org">LiveGraph</a> the interactivity became tolerable.</p>
<p>From this working state there is actually still quite a bit of work to have something that I can deploy on a customer production server. But when Guillaume Laforge announced his cool little app <a href="http://groovyconsole.appspot.com/">&#8220;GroovyWebConsole&#8221;</a> to run a groovyshell on the Google AppEngine I figured that I might as well upload what I had and announce it as well. Here is the announcement I sent to groovy-users</p>
<blockquote><p>I have made a similar app to administer a JEE app I&#8217;m doing. It is<br />
similar but is stateful and uses a vt100 interpreter in javascript (from<br />
shellinabox).</p>
<p>You can find it here</p>
<p><a href="http://code.google.com/p/ajaxgroovyshell">http://code.google.com/p/ajaxgroovyshell</a></p>
<p>It is mostly a prototype &#8211; to be really useful for me I need to add</p>
<p>1) Access control<br />
2) A way to paste text from the system (a pop-up textarea?)<br />
3) Proper sessions<br />
4) A robust way to handle threads<br />
5) Syntax highlighting?<br />
6) Better tab completion in GroovyShell (more like ipython)<br />
Unfortunately it won&#8217;t run on the Google AppServer since I need a thread<br />
for the GroovyShell.</p>
<p>Best<br />
Anders
</p></blockquote>
<p>Since then I have noticed several java server projects that have some kind of console facility. But not as an ajax webpage (yet). I have suggested it a couple of places (like <a href="http://weblogs.java.net/blog/kohsuke/archive/2009/05/hudson_cli_and.html">for Hudson</a>, and <a href="http://in.relation.to/11439.lace">for FRESH</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code3.dk/groovy-web-shells-%e2%80%93-ajaxgroovyshell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

