Friday, September 18, 2009


Today I found that:

Content-Disposition: attachment;filename=document.pdf
can NOT be changed to
Content-Disposition: inline;filename=document.pdf

It MUST be
Content-Disposition: inline
without the filename - if you want it to work in IE.

Got the idea after reading:

Reading a bit more in
I found my dynamic download to work nice when these headers where set:


Thursday, September 3, 2009

zktodo2 failed - but fixed again

I've installed NetBeans 6.7.1 on Ubuntu running on my Sun VirtualBox. Preferred to do so in stead of messing up my own computer ...

Got subversion and maven2 installed by using some magical
sudo apt-get commands ;-)

Got the zktodo2 installed by running mvn co (checkout).

Got the a nice dependency graph to display - WOW!!
fixed an error and got the project to build.

But the deployment failed with an error telling me that the
element type "listener" must match "(listener-class)"
Found the reason here:

So I changed the head of my web.xml from:
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"" >

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="" xmlns:xsi="" xsi:schemaLocation="">

and it worked!

Now I can go home and tell my wife tonight - and I am sure she'll fall asleep at once ;-)

So I took an exported appliance home - and imported my new environment into the VirtualBox on my laptop. And it did not work!
Could not create the entity manager! Clean and build - then run. Nope - still problems! I had to undeploy the context, then redeploy - to make it work.

Wednesday, September 2, 2009

svn - remain in conflict

A folder was marked as in conflict ... don't know why!
I had to go to dos prompt and finally found that

> svn info

told me about a conflict properties file ... so I deleted this!
Then I could commit again ;-)

Tuesday, September 1, 2009

URL to pdf-documents with search parameter

I have a servlet that reads my blob with the pdf content and used the response.setHeader to set the Content-Disposition and assign a filename. Nice!

So I was looking for a way to pass a search parameter to the PDF viewer ...
I found the spec:
so I thought I had to use something similar to post on the http header ...

But NO!
All I had to do was to put it on my URL, and that was it!
so my .../document?id=NR should just be .../document?id=NR#search=THIS

Why did it take so long to find out?
Because it DID NOT WORK in FireFox! I tested in IE and it worked.
I tested in Opera and Chome - and it worked.