Get a Quote

Your source for insights and trends in software development

Downloading generated RTF/XLS file in IE6/7

Downloading generated RTF/XLS file in IE6/7

Today we had to do some changes in the way the reports are generated. Previously a new page has been opened and the content was sent to the browser. We used the following headers:1. Content-Type – mime type of the content2. Content-Length – length of the contents data3. Content-Disposition – this helped us to control the name of the file which browser uses during saving.This approach worked fine for IE and Firefox. Now we decided to store the generated reports…

eunit bug with timeout

From time to time in our application eunit tests we were facing with timeouts in eunit. Despite the big timeout we set in the group of tests, it anyway happened. So I started to look deeper into eunit application itself. And figured out, that in case when one of the tests throws and exception (or anything), timeout for the group sets up to the default one that is 5 sec in eunit 2.1.3 I wrote a simple module to reproduce…

Checking session expiration in GWT

Every web-application has mechanisms for checking session expiration. Most of them use standard mechanisms, which are provided by the application server. A GWT-based web application is an exception in this case and standard mechanisms will not work here. In this post I’m describing, how to implement the mechanism for checking session status. SessionExpirationException First of all, let’s create Exception, which will be used for notifying the GWT client about session expiration.

It is a simple extension of an Exception-class,…

Rounding in Java

Rounding in Java

Today I’ve got a defect from QA which deals with the rounding. During the fix of it, I’ve decided to measure which way of rounding is the fastest one. I’ve got several in my mind, so I’ve wrote a small test which measures time. Three approaches(iterations: 10.000.000, accuracy: 3 digits, value: 3.1574454353) have been tested out. My laptop configuration: 1. Fedora 11 i686 2. Sun JDK 1.6.0.16 3. CPU: Intel Core 2 Duo P7350 @ 2.00GHz 4. RAM: 3 GB…

GWT on Ubuntu x64

I have installed new Ubuntu 9.10 (karmic) x64 and found that GWT browser is not working – it shows: libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) This problem can be solved by switching on Java SE x32, but after that another problem was occurred: libstdc++.so.5 cannot open shared object file no such file or directory In previous build of Ubuntu it can be solved by simple install of libstdc++, but Ubuntu karmic does not contains it….

Invisible text in JasperReports

Invisible text in JasperReports

I really like JasperReports, it’s cool.But sometimes it can ruin your mind when you’re trying to understand why this report looks like so weird. So today I was trying to generating Excel report and saw the following picture: What the hell? Where’s my data? I had to debug JasperReports to understand why it happens. Finally I’ve got down to JRGridLayout#isOverlap which calculates whether the item intersects with some other report items. If isOverlap returns true the text is not rendered….

Date in GWT

Once more about date and its usage… In client-server application client send date to server using own TimeZone. So server receives client date and it will manipulate this client date. Sometimes it is not suitable. For example in applications, which is based on server date. So client should be also based on server date. GWT application is very similar on client desktop applications, because JavaScript code is executed on client side. So by default GWT application uses client date. Solution…

Date & Time

OK, you are thinking about date & time handling in your application. You’ve already known some obvious things such as: there are 86400 seconds in a day there are 365 days in an ordinary year there are 366 days in a leap year there are 719528 days between Jan 1, 0 and Jan 1, 1970. But do you remember about the following?: your application must somehow handle the century changes 🙂 by the Gregorian rule, a year YYYY is a…

SVN Blame/mercurial annotate

Very important feature when you are trying to figure out who is responsible for certain discrepancy within the code and bring their mistake to light, is svn blame (hg annotate, git blame). Usage is quite simple – just type “svn blame source_file” and you’ll have per line changes of the current source file with the version of the line and who changed it last. But to make it work properly, you need to agree within a project to have the same…

Contributions to erlang-web.

We’ve started to contribute to the erlang-web project from this fork The main source branch of erlang-web can be found here. Content of contribution Extended functionality for some parts of wparts (erlang-web representation of html tags): added correct work for common html attribute “value”, added possibility get “value”=<> from the new tag “valueVar” which is supposed to be a name of some available variable.These changes are available in 1.4 release of erlang-web (1.4 was released in Oct 28 2009) How…

Ready To Take The Next Step?

quote Get a Quote

Sumbit your project request by special form.
We'll get to you promtly with our costing of your project.