<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1254590620920264461</id><updated>2012-02-16T08:21:28.455+02:00</updated><category term='project-management'/><category term='maven2'/><category term='build'/><category term='collaboration'/><category term='programming'/><title type='text'>Tsukur Vladimir's Blog</title><subtitle type='html'>This blog is dedicated to software development in general and Grails, Groovy, Java and JavaScript in particular. Additionally I tell about the startups which I have personal connection with.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-7246528484319486871</id><published>2009-05-15T07:13:00.003+03:00</published><updated>2009-05-15T07:54:01.835+03:00</updated><title type='text'>Ganttzilla Beta is Released!</title><content type='html'>I am very proud to announce the beta release of &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt;, online project plan documents viewer with versioning, sharing and publishing capability. Our team has been working hard last 3 months to create user friendly and reliable web solution to view MPP, MPX, XML and Planner project plans.&lt;br /&gt;&lt;br /&gt;Well, what's interesting about the project? First of all, the idea. There are situations in our professional career when IT project plan needs to be submitted to higher management for discussion and approval, but people who are interested in viewing it cannot open the document since they do not have desktop software with corresponding capability. In this case &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; may help. You simply create document in &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; workspace, upload the document file and view the Gantt! Each document has several versions, so if you upload new document file under the same document it is treated as new version of this document and called document revision. Each document revision has its own sharing and publishing settings. Sharing is a secure way to share document version - invitations for viewing are sent to users explicitly specified by document author. All collaborators may post comments. Publishing differs from sharing in the way how the security is being applied: published document may be viewed by any user of the Internet by navigating to document version URL.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; supports viewing of Microsoft Project 98, 2000, 2003 and 2007 formats and also Planner files.&lt;br /&gt;&lt;br /&gt;Technically, &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; is built on top of &lt;a href="http://grails.org"&gt;Grails&lt;/a&gt; framework. We are the developers with Java background and found &lt;a href="http://grails.org"&gt;Grails&lt;/a&gt; and &lt;a href="http://groovy.codehaus.org"&gt;Groovy&lt;/a&gt; to be mature for the project like this one. The bad thing about &lt;a href="http://grails.org"&gt;Grails&lt;/a&gt; is that several bugs we've identified were severe enough and made us spend some time to find a resolution or a workaround for the problem, but on the other hand we are very pleased with development productivity that &lt;a href="http://grails.org"&gt;Grails&lt;/a&gt; give us and we will eventually stay with &lt;a href="http://grails.org"&gt;Grails&lt;/a&gt; for &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; and will choose it for our future projects.&lt;br /&gt;&lt;br /&gt;It would be much harder to implement &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; without &lt;a href="http://mpxj.sourceforge.net/"&gt;MPXJ&lt;/a&gt; library which provides capability for reading and writing Microsoft Project and Planner files. &lt;a href="http://mysql.com"&gt;MySQL&lt;/a&gt; is used as database management system. &lt;a href="http://jetty.mortbay.org/"&gt;Jetty&lt;/a&gt; is our development and production application server. On the client side we stick to &lt;a href="http://jquery.com"&gt;jQuery&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What's coming up next? Well, we are going to make preparations for Professional account support in &lt;a href="http://www.ganttzilla.com"&gt;Ganttzilla&lt;/a&gt; and look forward to implement export of project Gantt into image files soon. Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-7246528484319486871?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/7246528484319486871/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=7246528484319486871' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/7246528484319486871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/7246528484319486871'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2009/05/ganttzilla-beta-is-released.html' title='Ganttzilla Beta is Released!'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-6864820116189874624</id><published>2008-07-15T21:37:00.002+03:00</published><updated>2008-07-15T21:51:54.685+03:00</updated><title type='text'>Defining and Changing Image Size in JavaScript</title><content type='html'>How can one define the size of the image in JavaScript?&lt;br /&gt;&lt;br /&gt;I've come up with the approach of handling &lt;span style="font-family: courier new;"&gt;onload&lt;/span&gt; event for image element like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;imageElement.onload = function() {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    var width = imageElement.width;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    var height = imageElement.height;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    ...&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once image is loaded browser knows for sure the width and height of this image and developer can reference actual values from &lt;span style="font-family: courier new;"&gt;width&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;height&lt;/span&gt; properties of image DOM element.&lt;br /&gt;&lt;br /&gt;By changing image height or width it will be proportionally resized. BUT it is important to remember that corresponding image element properties are changed only when image is displayed!&lt;br /&gt;&lt;br /&gt;Let's say there is an image 10 pixels long and 20 pixels high. JavaScript code sets width to be 50 pixels, thus demanding height to be increased 5 times, resulting in 100 pixels. If image was visible at the moment width value was overriden, height property will be updated as well, with 100 pixels. And if image was invisible, height property is not updated and left as it is before image si actually displayed!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-6864820116189874624?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/6864820116189874624/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=6864820116189874624' title='Комментарии: 4'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/6864820116189874624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/6864820116189874624'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2008/07/defining-and-changing-image-size-in.html' title='Defining and Changing Image Size in JavaScript'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-7459372183433331832</id><published>2008-07-10T22:42:00.005+03:00</published><updated>2008-07-10T23:36:48.783+03:00</updated><title type='text'>Attaching/deattaching DOM elements in IE</title><content type='html'>Today I've faced an interesting issue with attaching and deattaching DOM elements in Internet Explorer.&lt;br /&gt;&lt;br /&gt;The issue was around the creation of so called Thumbnail Bar component: visual representation of photo strip which supports scrolling with buttons:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_GEGc8KRiQ54/SHZnywMYqDI/AAAAAAAAAcU/2It5VKM5icc/s1600-h/Thumbnail+Bar.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_GEGc8KRiQ54/SHZnywMYqDI/AAAAAAAAAcU/2It5VKM5icc/s320/Thumbnail+Bar.PNG" alt="" id="BLOGGER_PHOTO_ID_5221474939610638386" border="0" /&gt;&lt;/a&gt;All thumbnails to be displayed are loaded and stored in the array. Initially each thumbnail was represented by separate object, defined as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ThumbnailBar.prototype.Thumbnail = function(imageAttachment) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.imageAttachment = imageAttachment;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.containerElement = document.createElement("div");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.containerElement.className = "eyestride-Thumbnail";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.imageElement = document.createElement("img");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.imageElement.src = imageAttachment.image.thumbnailFile.url;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.containerElement.appendChild(imageElement);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So, thumbnail instance held a reference to container element and then used this reference to attach thumbnail container to Thumbnail Bar's image container. Each time Thumbnail Bar needs to be refreshed, inner HTML of &lt;span style="font-family:courier new;"&gt;imageContainerElement&lt;/span&gt; is first cleared:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;this.imageContainerElement.innerHTML = "";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;for (var i = startPosition; i &amp;lt; endPosition; ++i) {&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.imageContainerElement.appendChild(this.thumbnails[i].domElement);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt;Code works fine in Mozilla Firefox but refuses to work properly in Internet Explorer. In Internet Explorer appending of child &lt;/span&gt;&lt;span style="font-family: verdana;font-family:courier new;" &gt;div&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt; element &lt;/span&gt;&lt;span style="font-family: verdana;"&gt;(&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt;see &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;containerElement&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt; in &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Thumbnail&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt;) actually works, but image is appended only once. So, if container element of &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Thumbnail&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt; was removed by clearing &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;innerHTML&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt; of &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;imageContainerElement&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt; the link between &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;div&lt;/span&gt;&lt;span style="font-family:arial;"&gt; &lt;span style="font-family: verdana;"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;img&lt;/span&gt;&lt;span style="font-family:arial;"&gt; &lt;span style="font-family: verdana;"&gt;is lost: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: verdana;font-family:courier new;" &gt;div&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt; is appended without its child elements.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-family: verdana;"&gt;In order to fix this I've stored two references in&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Thumbnail&lt;/span&gt;&lt;span style="font-family:arial;"&gt;: &lt;span style="font-family: verdana;"&gt;one for&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;div&lt;/span&gt;&lt;span style="font-family:arial;"&gt; &lt;span style="font-family: verdana;"&gt;and another for &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;img&lt;/span&gt;&lt;span style="font-family: verdana;font-family:arial;" &gt;, then added a method which performs attaching of thumbnail to specific container, in such a way:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;EyeStride.UI.Viewer.ThumbnailBar.prototype.Thumbnail = function(imageAttachment) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;this.imageAttachment = imageAttachment;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;this.containerElement = document.createElement("div");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.containerElement.className = "eyestride-Thumbnail";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;this.imageElement = document.createElement("img");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    this.imageElement.src = imageAttachment.image.thumbnailFile.url;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;this.attachTo = function(domElement) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        domElement.appendChild(this.containerElement);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        this.containerElement.appendChild(this.imageElement);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;for (var i = startPosition; i &amp;lt; endPosition; ++i) {&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;    this.thumbnails[i].attachTo(this.imageContainerElement);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Another solution for the problem is to clear the contents of &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;imageContainerElement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family: verdana;"&gt; not by setting empty string for &lt;span style="font-family: courier new;"&gt;innerHTML&lt;/span&gt; property, but using &lt;span style="font-family: courier new;"&gt;removeChild&lt;/span&gt; method to remove elements from the image container, one by one. This solution works in both browsers too.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-7459372183433331832?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/7459372183433331832/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=7459372183433331832' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/7459372183433331832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/7459372183433331832'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2008/07/attachingdeattaching-dom-elements-in-ie.html' title='Attaching/deattaching DOM elements in IE'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_GEGc8KRiQ54/SHZnywMYqDI/AAAAAAAAAcU/2It5VKM5icc/s72-c/Thumbnail+Bar.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-5223055324253614661</id><published>2008-07-03T23:34:00.008+03:00</published><updated>2008-07-04T00:18:00.281+03:00</updated><title type='text'>Redirect Browser to Custom URL with HTTP POST Method</title><content type='html'>Recently I've investigated how to redirect browser to custom URL using HTTP POST method.&lt;br /&gt;&lt;br /&gt;This problem is &lt;a href="http://forum.java.sun.com/thread.jspa?threadID=509779&amp;amp;messageID=2420664"&gt;not new&lt;/a&gt;, many people looked for the solution. The one I've come up with my colleague, Yury Povhanych, is a bit different from others. But inly in details, not in idea.&lt;br /&gt;&lt;br /&gt;In order to be more specific let me describe the case in more detail. Now our company is building application for Facebook. Well, there are two ways to build applications for Facebook:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;use FBML and Facebook-specific JavaScript&lt;/li&gt;&lt;li&gt;implement IFrame-based application&lt;/li&gt;&lt;/ul&gt;For a number of reasons we've gone the second way and our application is being displayed as internal frame.&lt;br /&gt;&lt;br /&gt;Now, we want to get use of Facebook's friend selection system, i.e. use similar UI to select friends and send them message or request. There are specific controls which help to achieve this goal, but they are FBML-based, so they are of no real value in our case. Basically, Facebook developed a solution for this situation. They have a page called &lt;a href="http://wiki.developers.facebook.com/index.php/Multi_friend_selector"&gt;Multi Friend Selector&lt;/a&gt;. This page is hosted on Facebook. In order to use the page, it should be fed with parameters. Some of these parameters are messages to be displayed on the selector itself, others represent application API key and call signature. All these staff may be the part of URL, but this is BAD for at least two reasons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;URL may become long, thus it may be handled badly by some browsers&lt;br /&gt;&lt;/li&gt;&lt;li&gt;URL is bloated with data that should not be seen so easily by the user&lt;/li&gt;&lt;/ul&gt;In order to resolve that POST request must be sent instead of GET. Parameters in POST request become the part of the request body, not the URL.&lt;br /&gt;&lt;br /&gt;First thing I wanted to know is whether I can achieve such redirection by using only server-side capabilities. In Java EE stack I've found two methods which deal with redirection: &lt;span style="font-family:courier new;"&gt;request.forward&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;response.sendRedirect()&lt;/span&gt; but both of them has nothing to do with POST. First one is used to forward the request within the same servlet container while &lt;span style="font-family:courier new;"&gt;sendRedirect&lt;/span&gt; can be used to perform GET based redirection to any URL, both internal and external.&lt;br /&gt;&lt;br /&gt;Well, there is no way to do it in pure server-side. It is because of redirection nature, which is implemented in the following way. When server wants to say browser "User is boring, send him to xxx site", it means that HTTP response status code must be set to 302 (which means "Moved Temporarily") and URL of "xxx site" must be specified under "Location" header entry in that response. "Location" is just a string. It doesn't have some POST-specific format. Pure URL, nothing more. Browser should open "xxx site" and will use GET method in order to achieve that.&lt;br /&gt;&lt;br /&gt;Solution for the problem is easy: use DOM forms, on the client side. Forms may be given a method to be used for request sending, including POST. Forms may be created dynamically, like any other DOM element. So, what you need to do, is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create form&lt;/li&gt;&lt;li&gt;Set URL to send request to in action parameter&lt;/li&gt;&lt;li&gt;Set HTTP method in method parameter&lt;/li&gt;&lt;li&gt;Optionally specify target&lt;/li&gt;&lt;li&gt;Insert hidden input elements inside the form, give them the name and values which correspond to parameters to be sent via POST&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make form the part of DOM by appending it to one of the DOM nodes&lt;/li&gt;&lt;li&gt;Submit the form&lt;/li&gt;&lt;li&gt;Destroy the form by&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;I've implemented this functionality as the part of my open-source framework, called &lt;a href="http://code.google.com/p/digr2id/"&gt;Digr2iD&lt;/a&gt;. Here is the code that does the trick, dynamically (comments are removed):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Digr2iD.Controller.PostRedirector = {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;go: function(url, parameters, target) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;if (!url) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;var form = document.createElement("form");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        form.id = "org_flushpongle_digr2id_js_controller_postredirector_form";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        form.name = form.id;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        form.action = url;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        form.method = "post";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;if (!target) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            target = "_self";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        form.target = target;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;document.body.appendChild(form);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;for (var parameterName in parameters) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            var input = document.createElement("input");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            input.name = parameterName;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            input.value = parameters[parameterName];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            input.type = "hidden";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            form.appendChild(input);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;form.submit();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;document.body.removeChild(form);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-5223055324253614661?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/5223055324253614661/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=5223055324253614661' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/5223055324253614661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/5223055324253614661'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2008/07/redirect-browser-to-custom-url-with.html' title='Redirect Browser to Custom URL with HTTP POST Method'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-7903419690425869374</id><published>2008-06-30T19:44:00.010+03:00</published><updated>2008-06-30T20:37:45.912+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>New Line at End of File - What For?</title><content type='html'>When composing code style rules for my &lt;a href="http://code.google.com/p/digr2id"&gt;Digr2iD project&lt;/a&gt;, I've asked myself a question: "Why there is a demand to insert new line at end of source file?". Yeah, such a dumb silly question. But why?&lt;br /&gt;&lt;br /&gt;Certain compilers emit warnings when dealing with files without line at end. I've also found this rule as a check module in &lt;a href="http://checkstyle.sourceforge.net/config_misc.html#NewlineAtEndOfFile"&gt;CheckStyle configuration&lt;/a&gt;. Moreover, &lt;span style="font-weight: bold;"&gt;vi&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;emacs&lt;/span&gt; support these conventions: &lt;span style="font-weight: bold;"&gt;vi&lt;/span&gt; inserts line at the end automatically, &lt;span style="font-weight: bold;"&gt;emacs&lt;/span&gt; needs &lt;span style="font-family:courier new;"&gt;require-final-newline&lt;/span&gt; variable to be set with appropriate value.&lt;br /&gt;&lt;br /&gt;Theory behind this rule is the following: "source file is a text file, each text file comprises zero or more lines, each line comprises zero or more line characters terminated by a newline character". So unterminated text line is not a proper text line. Well, it's ok but what's the practical side of this?&lt;br /&gt;&lt;br /&gt;Careful reading of &lt;a href="http://bytes.com/forum/thread439816.html"&gt;this post&lt;/a&gt; and some thinking made me understand why it is important to have a new line at end of source file:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;When source files are merged, there is a potential to have unterminated line of one source file inproperly united with the first line of another source file. For example if you are writing in &lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;C++&lt;/span&gt; and include the header file which contains unterminated line with &lt;span style="font-family:courier new;"&gt;#define&lt;/span&gt; syntax, expect &lt;span style="font-family:courier new;"&gt;#define&lt;/span&gt; directive to be appended with the contents which goes right after &lt;span style="font-family:courier new;"&gt;#include&lt;/span&gt; statement. You may receive compilation error, or, even worse, don't receive it :) and be frustrated by strange program behaviour. As far as many header files end up with preprocessor directives probability of receiving a headache for a newbie is high.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It complicates pattern-based search. If you are looking for a piece of text that appears at the end of line, match result should not include the snippet which appears at the end of the file, which doesn't have new line as the last symbol. For example if you are trying to determine the number of lines in the file(s) using regular expression based search by simply couting number of CR or LF or CR-LF symbols, you will have a problem because unterminated line is not a line.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-7903419690425869374?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/7903419690425869374/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=7903419690425869374' title='Комментарии: 2'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/7903419690425869374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/7903419690425869374'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2008/06/new-line-at-end-of-file-what-for.html' title='New Line at End of File - What For?'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-8462555909238741223</id><published>2008-06-30T00:50:00.008+03:00</published><updated>2008-06-30T19:52:28.504+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maven2'/><category scheme='http://www.blogger.com/atom/ns#' term='build'/><title type='text'>Maven 2 - Site Plugin Specifics</title><content type='html'>&lt;span style="font-size:100%;"&gt;Recently I've tried to use &lt;a href="http://maven.apache.org/plugins/maven-checkstyle-plugin"&gt;CheckStyle plugin for Maven 2&lt;/a&gt; and had the following problem.&lt;br /&gt;&lt;br /&gt;I've followed basic instructions on plugin setup &lt;a href="http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html"&gt;here&lt;/a&gt;, but when executing &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;mvn site&lt;/span&gt;&lt;span style="font-size:100%;"&gt; the following error appeared on the screen:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;[ERROR] BUILD ERROR&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[INFO] ------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[INFO] Error parsing site descriptor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Embedded error: expected = after attribute name (position: START_DOCUMENT seen ...mitations\r\nunder the License.\r\n--&gt;\r\n\r\n&lt;project name=""&gt;&lt;/project&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's look at how I've defined the name of the module in &lt;span style="font-family:courier new;"&gt;pom.xml&lt;/span&gt;:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;project&gt;&lt;/project&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;name&gt;"flushpongle" Framework&lt;/name&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Soon it became obvious that the cause of the problem is double quotes which are present in the module name. Module name is taken 'as is' for the attribute value inside the root element of project site descriptor XML. After removing the double quotes plugin started working normally.&lt;br /&gt;&lt;br /&gt;Afterwards I've identified that it wasn't the problem of &lt;a href="http://maven.apache.org/plugins/maven-checkstyle-plugin/"&gt;CheckStyle plugin&lt;/a&gt;, it was the problem of &lt;a href="http://maven.apache.org/plugins/maven-site-plugin/"&gt;Site plugin&lt;/a&gt;, because after removing &lt;span style="font-family:courier new;"&gt;reporting&lt;/span&gt; section and keeping double quotes characters in the module name I've got the same error as before. So I decided to open an item in &lt;a href="http://jira.codehaus.org/browse/MSITE-342"&gt;Codehaus JIRA&lt;/a&gt;&lt;a href="http://jira.codehaus.org/browse/MSITE-342"&gt; of Maven 2 Site plugin&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-8462555909238741223?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/8462555909238741223/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=8462555909238741223' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/8462555909238741223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/8462555909238741223'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2008/06/maven-2-site-plugin-specifics.html' title='Maven 2 - Site Plugin Specifics'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1254590620920264461.post-5989611779865999407</id><published>2008-06-15T18:04:00.010+03:00</published><updated>2008-06-30T19:53:02.870+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='collaboration'/><category scheme='http://www.blogger.com/atom/ns#' term='project-management'/><title type='text'>Notes on Using BaseCamp</title><content type='html'>Several months ago we were sticked to pure project management tools, like Microsoft Project. Yes, it is great to see Gantt and organize tasks in a hierarchy, but, you know, we, managers and engineers in &lt;a href="http://www.shiftlabs.com/"&gt;Shift Labs&lt;/a&gt;, need some collaboration features. For sure, it's not just about &lt;a href="http://www.shiftlabs.com/"&gt;Shift Labs&lt;/a&gt; :), but other IT and non-IT companies who manage projects.&lt;br /&gt;&lt;br /&gt;Collaboration matters. Let's say I want to assign task to a person, which will be notified via email and, once it will be finished, some kind of check box marking or drag'n'drop operation will occur and, voola, we have some task history, some progress! Discussing project issues via email is normal, but, it's better to handle messaging in one place, not throughout email boxes of involved engineers. And we need wiki. And we need bug tracking. Documents? Yes, diagrams, screenshots, designs, etc. It is great to have one tool for that, not many. It is awesome to have native support of project components/modules and releases. Calendar and events are also essential. And it should be web-based of course, no Microsoft Project + Groove alternative is accepted.&lt;br /&gt;&lt;br /&gt;So, we started using &lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt;. What I personally liked in &lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt; from the very first moments was its clean and neat interface. Easy-to-use one. Pages are not heavy and overwhelming. But that's the minor thing ...&lt;br /&gt;&lt;br /&gt;Now about tasks and organizing the work. Each project may have many to-do items, grouped in to-do lists. The first bad thing for me: no hierarchies! I would like to create tasks and sub-tasks and then sub-tasks again, but not this time. To-do item itself is a very "tiny" entity: you can give it a name, assign a person (ONLY ONE, by the way) responsible for resolution and ... that's it! No due dates, no multiple assignments. To-do item doesn't have description. To-do list has it instead. Milestones live outside the to-do lists and to-dos, but one can associate to-do list and milestone. This specific made me create to-do lists and milestones with the same name and then associate the two.&lt;br /&gt;&lt;br /&gt;Lack of product version support in &lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt; became pain very soon. In order to handle the staff for our Pre Alpha, Alpha and Beta versions of the product, we simply created separate projects. An alternative approach would be to create one project, but in this case to-do page is polluted with lots of items and becomes unusable. Besides you have no intuitive and normal way to find out which item belongs to which version.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt; provides possibility to create writeboards. Writeboard is very similar to wiki article, but more limited in features then basic wiki. Article versions and version comparison are supported. Users may post comments to the writeboard. Available formatting options are not great but sufficient for non-complex articles and formatting guide is always at hand. By the way, it would be great to associate writeboard to a to-do item or to-do list, but &lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt; doesn't support that. Good news is that you can import the writeboard created earlier, specifying the URL and password.&lt;br /&gt;&lt;br /&gt;I found messaging system in &lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt; sufficient for our needs. User specifies the title of the message, writes the body and optionally extended body, assign the category of the message. It is possible to attach files and notify subset of the people on the project. Ability to associate message to a milestone is a good feature and I found it useful. Besides, one can preview the mesage before sending it.&lt;br /&gt;&lt;br /&gt;Chat is one of the features which we didn't try yet. Somehow we used to "skype chat" each other instead or just use aural communication. Still, I am sure that it is great feature. I would even say it is a mistake that we passed it through ...&lt;br /&gt;&lt;br /&gt;Document management is easy and supports versioning. However, absence of project versions also affected the way we managed documents. There were documents generic for the project and specific to the version of the project. Not to lose generic documentation we created separate project for handling them.&lt;br /&gt;&lt;br /&gt;So, &lt;a href="http://www.basecamphq.com/?source=37s+home"&gt;BaseCamp&lt;/a&gt; is a good tool to use for small agile projects. It is really easy and user-friendly. Still, task management is too primitive. No native support for project versions, multiple assignments, task due dates and events makes the tool insufficient for use very soon. At least in my case.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1254590620920264461-5989611779865999407?l=flushdia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flushdia.blogspot.com/feeds/5989611779865999407/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1254590620920264461&amp;postID=5989611779865999407' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/5989611779865999407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1254590620920264461/posts/default/5989611779865999407'/><link rel='alternate' type='text/html' href='http://flushdia.blogspot.com/2008/06/notes-on-using-basecamp.html' title='Notes on Using BaseCamp'/><author><name>Tsukur Vladimir aka _flush_dia_</name><uri>http://www.blogger.com/profile/04849086925419567363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_GEGc8KRiQ54/SFP9_paPuNI/AAAAAAAAAbY/jBpO14h39oc/S220/ava_xs.jpg'/></author><thr:total>0</thr:total></entry></feed>
