Dealing correctly with encodings is one of the most important things in Java web applications (if not even in Java). The best way to avoid troubles with different encodings is to use only one encoding throughout the entire web application. The encoding of choice is UTF-8 which is able to deal with almost every known written language.
The first thing you have to ensure is that every content delivery from your server tells the client (browser) the correct encoding to use. You do this by setting the meta header field in your HTML pages:
Sometimes your web applications behave different when deployed to the application server although everything worked fine when running inside Eclipse on your workstation.
In this case it is helpful to remote debug the application. In case of using Tomcat as application server just add the following VM parameters to JAVA_OPTS:
I do this inside the file setenv.sh in the bin directory by adding a line JAVA_OPTS="…options…"
The paramete -Xdebug tells the VM to start in debug mode. -Xrunjdwp selects the protocol. Change the port 8000 to an appropriate value for your server (one that is not used by another process and is reachable). By setting the value `suspend=n``` the VM does not wait until a remote debugging session connects until starting.
When using vi to edit documents on linux systems from time to time I press Ctrl-S to save my changes - damn Windows shortcuts 😉 This kind of freezes the shell because it locks the terminal output.
If this happens to you press Ctrl-Q which causes the shell to resume terminal output. See this blog for more linux terminal shortcuts.
Scoble made a really cool interview with Bill Gates and provides the video of it on his blog. Gates seems really relaxed unlike in many other interviews I have seen. He talks about his retirement and (of course) the future of Microsoft and Computers in general.
Must be great to sit on one table with one THE software pioneers - thanks for sharing this experience Scoble!
Blogs of tech enthusiasts are really busy these days ‘cause CES Las Vegas is happening. But the biggest news today may be the release of the iPhone. Steve Jobs presented it today in his Keynote.
I found an interesting blog entry about how to set up an automated backup for a windows system by using a program called SyncBackSE - I’ll have to give it a try because I am not satisfied with my current backup solution (using Windows Backup from time to time 😀)
Today a colleague of mine found nice page with the story of a java memory leak hunter. This is a story out of real life - if you ever tried to find out why huge java (server) applications get an OutOfMemoryException you’ll know what this man is talking about. He found out some very interesting things.
On this page an Eclipse profiler is mentioned - looks nice, I’ll have to test it.
I found a nice article on java.net about blackberry application development. Next time I got nothing else to todo (which wont be within the next six months) I will have to write a small application for my device.
Since I switched from my SonyEricsson P910i to a Blackberry 7290 a year ago
I missed my password safe. On the P910i I was using Handy Safe
because it had a desktop part that allowed me to sync it with my PC.
The password safe RIM provides for Blackberries could not be synchronized with the PC and so I was searching for another one. Finally I found it:MiniSafe for Blackberry - it allows me to define categories and types, has a built in password generator and I can synchronize it with my PC. The only thing missing is a password generator that generates pronounceable password like apg does. I really love these passwords, after typing them in three times you remember them.