WTF – backbase.com does a GET

WTF – backbase.com does a GET

While *trying* to take a look at their client edition,
i open Firebug and here’s what i see:

 GET http://www.backbase.com/registration/login.html?cmd=login&josso_username=XXX&josso_password=YYY&loginremember=1
 

Defitively a feature from the past!

Controlling Jetty port in Maven 2

Overriding the jetty port used on mvn jetty:run was always something that annoyed me…
and that was due to my solution which had been to alter the project’s pom adding:

 	<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
 		<port>9090</port>
 		<maxIdleTime>60000</maxIdleTime>
 	</connector>

One problem with this is that i only need this on one of my dev machines (where the default 8080 port is
already occupied) and additionally this is not something that one would commit and enforce it to others.
It’s just plain wrong.

Maven Profiles

So, one might think, let’s use maven’s profiles for this. In the ~/.m2/settings.xml of the machine
in question, we can add

 <profile>
      <id>override-jetty-port</id>

       <activation>
         <activeByDefault>true</activeByDefault>
        </activation>

 	<!-- something to change the port here -->

 </profile>

But the problem is that it’s not easy to figure out the ‘something to change the port here’ part.
Jetty’s docs talk about the jetty.port property but it must be a system property, i.e. adding

 	<properties>
 		<jetty.port>8084</jetty.port>
 	</properties>

doesn’t do the trick.

Custom Hack

So, i first thought, let’s modify our pom, making use of a custom {jetty.port} in the connector’s implementation,
that let’s define a default value of 8080 for it inside the pom, and then let’s override this in our settings.xml !

But of course, it doesn’t feel right + i’d have to modify too many poms to go unnoticed by others…

Enlightment

And then it hit me… Use the MAVEN_OPTS environment parameter
export MAVEN_OPTS="-Xmx768m -Xms64m -Djetty.port=9090"

is all that it takes… Aargggggg…

Sometimes, things are impossibly easy!

On LG FLATRON L1915S problems

On LG FLATRON L1915S problems

I’ve had this monitor for 1.5~2 years – no complaints so far.

But as I woke up this morning, it wouldn’t turn on. To be more exact, it would initially show the computer’s contents, then after half a second, it would simply go black… It’s neither a cable issue, nor a graphic card issue and what’s weird is that its operation light is turned on (green) as if everything works!

Fixya.com has some details on the monitor, and interestingly those two guys report the same issue. From the comments there, it looks like this is an issue of the inverter board and the Cold Compact Fluorescent bulbs and it’s supposed to be fixable though there’s no mention at the cost.

Anyway, i’ll try to get it fixed, nut i’ll probably go on to a new and bigger display, perhaps in the 21′-25′ range… Any suggestions?

Interviewed for platform.netbeans.org + Greek JUG + Geertjan

Interview

I was recently interviewed by Geertjan – mostly relating to Netbeans5.5 and the Tapestry support module. It was an interesting talk, go ahead and read it.
BTW, here’s the latest screenshot of the module’s autocomplete capabilities:

Greek JUG

So, anyway, i then ( on Dec 02 ) attended our local JUG (its schedule in greek), where i finally met those 2 Netbeans guys: Roman Strobl and Geertjan Wielenga
Their presentations were excellent and it was clear that everyone in the audience enjoyed them! I can say the exact same thing for the other 2 presentations, from T.Varias and D.Andreadis.
All in all, the event was a success – here are the photos! So, I’m already looking forward for the next one.

Geertjan

Geertjan is a very interesting and pleasant guy. We arranged for some team coding in my house where we came up with the error-annotation support for the tapestry module. Here it is in action:

We had to call it a day quite early though, cause i was once more sleepless (+ a bit sick) ! I must have been coding with my eyes closed during the last half-hour : ) So, anyway, we’ll probably meet again next week, when i’ll be at Prague… should be fun!

Java Applets Coding Contest Archives – A tribute to CFXweb

Java Applets Coding Contest Archives – A tribute to CFXweb

A few years ago I used to hang out at cfxweb.net

CFXweb is closed now, but when it started (2002) it was quite a popular site among demo sceners and amateur game developers – counting thousands of members and hosting graphics, 3D and AI related news and technical articles.

I still remembet when its creator, Civax, announced the 1st Java Applets Coding Contest… its theme was Image Distortion and more than 20 participants had sent their entries… I placed 10th with this bizzare entry … (don’t know what i was thinking of!) You can check out the rest of the entries here – many of which are still awesome.

I did better at the 7th contest, themed Particles. My entry “Gimme Pop” placed 2nd, but make sure you also check out the rest of them.

Anyway, I always get a smile on my face when i think back about that period (2000-2003) of my internet life. The previous one was a lot more darker… perhaps i’ll explain more in next posts!

Show me your desktop, and…

Show me your desktop, and…
i’ll guess your job.

Well, don’t know who has said this, but i guess it’s pretty obvious in my case. Here, take a look:

Got it?

Tacos 4.0.1 and Tapestry Support for Netbeans 5.5

We had two tapestry-related releases today:

Tacos 4.0.1

Tacos 4.0.1 was released a few hours ago.  
 
It’s mainly a stability release fixing 2 subtle bugs and  
enhancing the ajax encoder (for very pretty and short ajax urls). 
 
Make sure to also check out the previously undocumented but powerful 
ajax-enabled Table component. 
 
Thanks to all that contributed… 
 
Changes: 

* Docs for tacos:Table component. 
* Load external js synchronously. Fixes Bug127. 
* AjaxSubmit posts all the AjaxLinkSubmits before it. Fixes Bug130. 
* Do not clear current document after error (a failed ajax-post). 
* Jdk1.4 compatible class format for maven generated artifacts. 
* Add StringToListConverter. Allows updateComponents parameter to be specified as a comma-delimited String. 

* Add uniqueNames parameter in AjaxForm – forces the html name of each input control to stem from the component’s idPath (instead of the component’s id). 
* Support validators and translator in HtmlArea. Fixes Bug128. 
* Make buttons in tacos:Palette work. Fixes Bug129. 
* Remove hardcoded class attribute from tacos:Table. 
* Easier way for defining ajax exception and stale-session pages. 
* Enhance AjaxDirectServiceEncoder for ever prettier ajax urls.  

* Corrected links to tapestry’s component docs. 

nbtapestrysupport

Just released the first version of nbtapestrysupport.

It provides:

  • Hyperlink support in Tapestry configuration files for class names, files and libraries… CTRL+click everywhere!!!
  • Autocomplete in Tapestry configuration files for class names, files and others
  • Templates for new Tapestry files

Download the 2 nbms, then install the generic module first and then the tapestry module.

Enjoy!

English2Greek translation in Firefox

English2Greek translation in Firefox

I’ve been busy translating to greek an OS app lately… http://www.in.gr/dictionary has been a friend, but i needed more!

So, upon taking a look at Build Your Own Firefox Search Engine i quickly came up with this. As the article describes, copy it in your Firefox/searchplugins folder (optionally adding there this icon) and you’re ready to go.

But as always, there’s a faster way for this… Mozilla’s directory already contains this… grrrrrrrr… Which reminds me of a quote of the first chess coach of the very best Garry Kasparov : “I always tell Garry to think first and then move. But sometimes he does the opposite!”

PS. Just saw this
new tutorial. It contains the OpenSearch description format for search plugins that is supported by both FF 2.0 and IE7… Interesting read.

Topalov loses to Kramnik

Topalov loses to Kramnik
… or a tale of how the most exciting chess player has lost to the most boring chess player.

Of course i’m over-simplifying matters, but i can’t help it… that’s simply how i feel.

Anyway,
TWIC has more on this.

Implementing a Firefox Plugin for Tapestry’s Reset Service

Implementing a Firefox Plugin for Tapestry’s Reset Service
Actually, i decided to make this a greasemonkey script, instead of a full FF plugin…

So, here’s the process:

  • 12:25. Install greasemonkey. ( http://greasemonkey.mozdev.org/ )
  • 12:27 Restart Firefox
  • 12:28 Search for a good tutorial on writing greasemonkey scripts.
  • 12:32 Hmm, http://greasemonkey.mozdev.org/authoring.html is a starting point, as is the http://mozdev.elliptic.fr/greasemonkey/linkify.user.js example.
  • 12:33 Create a file named tapestry.user.js somewhere. Open it up in an editor and also in FF. Make your changes in the editor, refresh in FF and click on install to use it.
  • 12:37 After the first hello world examples, let’s create something that adds an absolute positioned div in the current page, containing a static link for the moment.
  • 12:41 I used document.createElement(‘div’) to create the div and document.getElementsByTagName(“body”)[0].appendChild(resetDiv) to add it in the dom.
  • 12:44 I can write links in the div… with the ugly way (hope Jesse isn’t reading this), i.e. resetDiv.innerHTML='<a href=”…”>Cool</a>’
  • 12:45 location.href gives us the current url. we’ll have to hack it a bit to contruct a valid Tapestry reset url. For now, we’ll keep the url from the beggining to the last occurance of slash ‘/’ and append app?service=reset&page=Home afterwards.
  • 12:50 Done! Here’s the result.

Remember to configure the script so that it’s active only on the pages you want. Further updates might:

  • Recognize Tapestry sites and auto-enable the plugin.
  • Recognize and use the current page so that you won’t get redirected to Home.
  • Use better styling for the added div… It should be on the top of the page, with absolute positioning and semi-transparent.
  • See if this also works in Tapestry 3.

So, watch out for an update on this!

P.S.1 You have to enable Tapestry’s reset service for this to work.
P.S.2 If you’re wondering why you need this, then read on : )

While editing Tapestry’s templates (*.html) or configuration files (*.page, *.jwc, *.application, *.library) you can get instant save-refresh functionality if you disable cache (that’s org.apache.tapestry.disable-caching ). This however slows down request handling by a noticable amount and results in memory leaks because classloaders are thrown away on each request. I generally wouldn’t mind about this since it’s only used on development and it takes a LOT of refreshes before one gets an OutOfMemoryException.

But if you’re on AJAX ( read tacos or tapestry 4.1 ) then you’ll get that exception a lot more faster. So, in the last few months I’ve got into the habit of enabling cache + enabling the reset service ( that’s org.apache.tapestry.enable-reset-service. I usually keep an extra tab open in Firefox (having the url of the reset service) and whenever I make changes I hit refresh on that tab (so that all templates and Tapestry configurations are reloaded) and then return to my normal tab.

P.S.3 This was initially written in my internal TiddlyWiki, an awesome javascript-only wiki. I was really surprised when Howard recently commited (!!!) this wiki in Tapestry 5 trunk. In fact, I never knew a wiki could get itself committed! Well done Jeremy.