quote

venerdì, dicembre 07, 2007

ubuntu references

In these days I have started using ubuntu on my laptop. I have completely removed winzoz so now I am forced to learn ubuntu for doing all the things I need.
I have found in internet many useful guides like how to configure ekiga in order to use voipstunt in ubuntu, and how to setting up the microphone.
Enjoy your ubuntu.

giovedì, novembre 22, 2007

Eclipse Trick to open Type View


If you use eclipse you can use [CTRL] + [SHIFT] +[T] to open the 'open type view' mask. This allow you to search a java class using auto-complete functionality. Try to do it. Thanks to Mike.

mercoledì, agosto 29, 2007

setting proxy for subversion (svn)

If you are behind a company proxy and you have to use subversion (svn) you need to config the configuration file in order it works.
Here the steeps to follow with windows XP OS.
- go to C:\Documents and Settings\Admin\Dati applicazioni\Subversion and edit the file Servers
- remove remarks corresponding to [global] section and set your proxy configuration:
[global]
http-proxy-host = host
http-proxy-port = port
http-proxy-username = username
http-proxy-password = password

- save the file and run $ svn diff to check if it works.
- Mind the spaces corresponding to left side.

martedì, luglio 17, 2007

venerdì, giugno 29, 2007

jazoon 2007


Thanks to Paolo and Lucio for good time spent with them in Zurich during jazoon 2007.

giovedì, giugno 07, 2007

profiling access to cas using a javascript trick


CAS It's a web application to implement SSO. In order to profile accessing to cas I have used a simple javascript trick, that, is I compose username with username and profile. The custom authentication handler of cas, tokenize the global username retrieving the real username and proceed to validate it with the password sent. Acegi side I can retrieve the profile inserted by user and associate the proper roles. In the next days I'll try to improve the content of this post, now it's late (3,44am) and I go to sleep.

martedì, maggio 15, 2007

jug Padova meeting

Guys, Saturday may 18th, in Padova, there will be the java user group Padova Meeting n. 35.
We will talk about FIT - Automatic Acceptance Testing, but mainly about the great framework Parancoe.
I will not be present because I have already scheduled, for a long time, a short holiday in Bratislava for that date.
I will have, with other two guys of JUG PD, a presentation of Parancoe at jazoon 2007 in zurich.

lunedì, maggio 14, 2007

simple development roles

Here a list of simple rules that I try to follow on my job as software developer.

- Dividi et impera;
- DRY - Don't repeat yourself;
- Convention Over Configuration;
- SOC - Separation Of Concerns;
- never say "on my computer it works";
- never say "someone has changed my code";
- webapp should work for any vendor AS type.

But, most important of all... "more women in the development team".

giovedì, maggio 10, 2007

La rana e lo scorpione

Una rana e uno scorpione si incontrarono davanti a un fiume. Entrambi volevano passare dall´altra parte, e se la rana non aveva difficoltà, lo scorpione era preoccupato, perché non sapeva nuotare.

Per piacere, mia cara rana, mi porteresti dall´altra parte del ruscello?" chiese lo scorpione, con la voce più dolce che gli riuscì di fare.
"Fossi matta!" gli rispose la rana "Non provare nemmeno ad avvicinarti, non ho nessuna voglia di farmi pungere da te".
"Ma ragiona, ranocchietta: se tu mi aiuti a passare il fiume prendendomi sulla groppa, io mai e poi mai ti pungerei: se lo facessi, annegherei, perché non so nuotare".
La rana rifletté, e decise di aiutare lo scorpione, un po´ perché aveva paura che altrimenti la avrebbe punta, un po´ perché era un animale generoso, e dopo tutto lo scorpione non le aveva fatto niente di male.
E così lo scorpione saltò in groppa alla rana, e tutti e due si buttarono in acqua. Erano già a metà del percorso, proprio in mezzo al fiume, quando la rana sentì un dolore acutissimo sulla schiena. "Ma come?" esclamò "mi hai punta! E ora moriremo tutti e due, io per il veleno, e tu perché annegherai! ?Ma perché lo hai fatto?" E lo scorpione rispose: "Già, perché l´ho fatto? Perché pungere è la mia natura, e io non posso farci niente".

mercoledì, maggio 09, 2007

supplica a mia madre - Pasolini

È difficile dire con parole di figlio
ciò a cui nel cuore ben poco assomiglio.

Tu sei la sola al mondo che sa, del mio cuore,
ciò che è stato sempre, prima d'ogni altro amore.

Per questo devo dirti ciò ch'è orrendo conoscere :
è dentro la tua grazia che nasce la mia angoscia

Sei insostituibile. Per questo è dannata
alla solitudine la vita che mi hai data.

E non voglio esser solo. Ho un'infinita fame
d'amore, dell'amore di corpi senza anima.

Perché l'anima è in te, sei tu, ma tu
sei mia madre e il tuo amore è la mia shiavitù

ho passato l'infanzia schiavo di questo senso
alto, irrimediabile, di un impegno immenso.

Era l'unico modo per sentire la vita
l'unica tinta, l'unica forma : ora è finita.

Sopravviviamo : ed è la confusione
di una vita rinata fuori dalla ragione.

Ti supplico, ah, ti supplico : non voler morire.
Sono qui, solo, con te, in un futuro aprile...


martedì, aprile 24, 2007

errorPage in jsp vs error-page in web.xml

I had an argument with my colleague (and friend) Armand about how to manage exception in web application. Basically there are two ways to manage exception in web application:
- using error-page in the deployment descriptor;
- using the directive "errorPage" in the jsp.
Armand said that using the declaration in the web.xml is enough to manage all the possible error conditions. I agreed with him but I wanted to find a reason to make allowance for errorPage directive in the jsp.
I asked to Lucio the question and he said that using errorPage allow having different jsp pages, managing the error conditions, for different jsp, and you can't have the same behavior using error-page tag in web.xml because, in a such case, you can only specify the type of Exception.

venerdì, aprile 20, 2007

singleton for tomcat

If you want having just one singleton class shared by all the web applications of your tomcat instance, you have to put the jar containing your singleton class in the folder tomcat/shared and don't put it in the WEB-INF/lib folder of your webapp. In this way the instance will be created just once,after the first call to the method MySingleton.getInstance() and it will be a real singleton object shared between all the webapps.
I needed a such behavior because I want to implement a centralized management of rules, using acegi framework in my project.

mercoledì, aprile 18, 2007

switching off apache web server and using tomcat

Here my notes about how switching off apache httpd web server of my virtual server on areaserver.com.
I don't know if this solution could be applied for different domain providers.

1) vi /etc/rc.conf
2) change the entry httpd_enable="YES" to httpd_enable="NO"
3) run command rebootvs

At this point you have disabled your apache web server httpd. Now you have to change the listening port of your tomcat.

1) cd /usr/local/jakarta-tomcat/conf
2) chmod 777 server.xml
3) vi server.xml
4) search for listening port (usually is configured as 8180) and change the value to 8080.
5) save the changes and run command rebootvs.

At this point your apache tomcat is listening on port 8080 (and port 80...why?) on your virtual server.
Try to connect using http://mydomain/mywebapp.

I have applied this solution to my website, and now it works.
Many thanks to Giovanni Remigi (Ireland) for his tips.