<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andreas Joensen</title>
	<atom:link href="http://joensen.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://joensen.eu</link>
	<description>Endnu en WordPress-blog</description>
	<lastBuildDate>Sun, 15 Apr 2012 21:43:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The new finderscope</title>
		<link>http://joensen.eu/2012/04/15/the-new-finderscope/</link>
		<comments>http://joensen.eu/2012/04/15/the-new-finderscope/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 21:43:14 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[astronomy]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=142</guid>
		<description><![CDATA[Since it stayed cloudless tonight, I went out stargazing. I wanted to try out my new finderscope and it worked really well. Definitely much easier to find stuff with the new scope than with the old red dot thingy. I &#8230; <a href="http://joensen.eu/2012/04/15/the-new-finderscope/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since it stayed cloudless tonight, I went out stargazing. I wanted to try out my new finderscope and it worked really well. Definitely much easier to find stuff with the new scope than with the old red dot thingy. I had some troubles installing it, as it is not a standard piece for my telescope. I ended up removing the glass and electronics from the red dot finder and putting the scope in the hole. I put some tape and papir ind the gaps and adjusted the screws so it was parallel. I also had to turn the mount the other way around, which meant trimming it a little with my hobby knife.</p>
<p><a href="http://joensen.eu/wp-content/uploads/2012/04/foto-1.jpg"><img class="alignnone size-full wp-image-143" title="Finderscope" src="http://joensen.eu/wp-content/uploads/2012/04/foto-1.jpg" alt="" width="2592" height="1936" /></a></p>
<p>Having the new finderscope meant that I now could find the planets. I was succesful in finder both Mars and Saturn. It was difficult to see anything interesting with Mars, I think it would improve if I had a CCD sensor, so I didn&#8217;t have to look through the eye piece, but through a computer. I tried the blue and red color filters I had bought, but it didn&#8217;t help with Mars. Saturn on the other hand was very interesting and beautiful. I used my 2x barlow and 10mm eye piece. I could see the rings and the gap between them and the planet. It was pretty cool! Now I can&#8217;t wait to take pictures of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2012/04/15/the-new-finderscope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sunspots</title>
		<link>http://joensen.eu/2012/04/15/sunspots/</link>
		<comments>http://joensen.eu/2012/04/15/sunspots/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 15:36:34 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[sunspot]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=130</guid>
		<description><![CDATA[After several dages of rain and clouds, today has been sunny with no clouds, really lovely weather. It was therefore a perfect opportunity to use my sun filter and look for sunspots. I used my new 15mm eyepiece with my &#8230; <a href="http://joensen.eu/2012/04/15/sunspots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After several dages of rain and clouds, today has been sunny with no clouds, really lovely weather. It was therefore a perfect opportunity to use my sun filter and look for sunspots.</p>
<p>I used my new 15mm eyepiece with my 2x barlow. I could find two areas with sunspots, which I jotted down on paper.</p>
<p><a href="http://joensen.eu/wp-content/uploads/2012/04/sunspot.png"><img class="alignnone size-full wp-image-131" title="Solpletter" src="http://joensen.eu/wp-content/uploads/2012/04/sunspot.png" alt="" width="1005" height="1011" /></a></p>
<p>The spots corresponds to sunspot 1455 and 1459 from this picture from NASA. Keep in mind that my eyepiece turns the sun 90 degrees counterclockwise.</p>
<p><a href="http://joensen.eu/wp-content/uploads/2012/04/sunspots_1024_20120415.jpg"><img class="alignnone size-full wp-image-133" title="sunspots_1024_20120415" src="http://joensen.eu/wp-content/uploads/2012/04/sunspots_1024_20120415.jpg" alt="" width="1024" height="1024" /></a></p>
<p>That was quite fun, eventhough the spots aren&#8217;t that big today. I will be keeping an eye out for when Nasa publishes pictures of <a href="http://www.sciencephoto.com/image/329116/530wm/R5200074-Large_sunspot_group-SPL.jpg">big sunspots</a>, which should reach its peek May 2013. Although most of the fun was trying to find the spots myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2012/04/15/sunspots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terrible scope on Astromaster</title>
		<link>http://joensen.eu/2012/04/08/terrible-scope-on-astromaster/</link>
		<comments>http://joensen.eu/2012/04/08/terrible-scope-on-astromaster/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 12:46:57 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[astronomy]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=126</guid>
		<description><![CDATA[I went out again last night, hoping to get better results than last time. I tried finding Polaris, but I had the same frustrations with the really bad finderscope on the Astromaster, which really is just small tube with two panes of &#8230; <a href="http://joensen.eu/2012/04/08/terrible-scope-on-astromaster/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I went out again last night, hoping to get better results than last time. I tried finding Polaris, but I had the same frustrations with the really bad finderscope on the Astromaster, which really is just small tube with two panes of glass and a red dot. It&#8217;s easy to use during the day, since it has a black ring of each glass, that align when the telescope barrel is pointing at the object. During the night you can&#8217;t see the rings, just a red dot that is really useless. So to fix my problem, I bought a better <a href="http://www.celestron.com/astronomy/celestron-finderscope-6x30-erect-image-with-bracket.html">finderscope from Celestron</a>. Before I get the finderscope, I&#8217;ll not be able to do any stargazing. I tried locating Mars with the telescope, but just couldn&#8217;t find it.</p>
<p><img class="alignnone" title="Celestron finderscope 6x30" src="http://www.celestron.com/media/catalog/product/cache/2/image/9df78eab33525d08d6e5fb8d27136e95/5/1/51602-b_finderscopeonly_large.jpg" alt="" width="420" height="177" /></p>
<p>When looking for Venus, I stumbled upon a cluster of stars. I had no idea where it was, only that it was somewhere near Venus. I has wishing I had a pad and pencil to draw what I saw, so I could locate the stars later with some computer software. Next time I&#8217;ll need to bring som paper and a pen.</p>
<p>I have also bought a <a href="http://www.celestron.com/astronomy/accessories/eyepieces/accessory-kits/celestron-astromaster-accessory-kit.html">Astromaster accessories kit</a> which includes filters for the moon, venus, mars, jupiter and saturn. It also has 6mm and 15mm eyepieces, which will complement my 10mm and 20mm. Included is a 2x barlow, which I already have, so I&#8217;m hoping to get a discount if they will sell the kit without it. It all comes in a case, which will improve transporting things.</p>
<p><img class="alignnone" title="Astromaster accessories kit" src="http://www.celestron.com/media/catalog/product/cache/2/image/500x350/9df78eab33525d08d6e5fb8d27136e95/9/4/94307_astromasteracce_large_1.jpg" alt="" width="300" height="210" /></p>
<p>When I was out last night, the light pollution really bothered me, even with the moon not out. It would be really great to be a place where the sky is pitch black and not this blue-gray color. I would say it is a 6 on the light <a href="http://en.wikipedia.org/wiki/Bortle_Dark-Sky_Scale">pollution scale</a>:</p>
<p><a href="http://joensen.eu/wp-content/uploads/2012/04/tumblr_la04luWdpE1qz6f9yo1_500.jpg"><img class="alignnone size-full wp-image-128" title="Light pollution" src="http://joensen.eu/wp-content/uploads/2012/04/tumblr_la04luWdpE1qz6f9yo1_500.jpg" alt="" width="500" height="362" /></a></p>
<p>&nbsp;</p>
<p>To do:</p>
<ul>
<li>Mount new finderscope on telescope.</li>
<li>Tryout new filters with the moon, venus, mars, jupiter and saturn.</li>
<li>Bring paper when stargazing and show findings here.</li>
<li>Find someplace darker.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2012/04/08/terrible-scope-on-astromaster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing the telescope</title>
		<link>http://joensen.eu/2012/04/05/testing-the-telescope/</link>
		<comments>http://joensen.eu/2012/04/05/testing-the-telescope/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 17:03:05 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[astronomy]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=113</guid>
		<description><![CDATA[There were no clouds yesterday, which was a perfect operatunity to try out my new telescope. I had just been to wednesday café, where we had seen the movie &#8220;UP&#8221;, so Andrés, Flemming, Kevin and Baiba were there to help setup. &#8230; <a href="http://joensen.eu/2012/04/05/testing-the-telescope/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There were no clouds yesterday, which was a perfect operatunity to try out my new telescope. I had just been to wednesday café, where we had seen the movie &#8220;UP&#8221;, so Andrés, Flemming, Kevin and Baiba were there to help setup. The moon was nearly full, which is not ideal for star gazing, so I didn&#8217;t expect to see much.</p>
<p>I placed the telescope in the middel of the parking lot by the church and started of by balancing it. It was easy to balance it on the RA axis (<a href="http://en.wikipedia.org/wiki/Right_ascension">Right ascension</a>). I just had to move the two counter weights up the rod until the barrel was stationary regardless of what angle I set it to. The other axis, the declination, was more difficult. I couldn&#8217;t actually get it to balance, so I must have been doing something wrong. Though, I did notice that it would balance when the altitude was set to zero degress, but not when I increased it. I will need to research this aspect and do some more experimenting tonight.</p>
<p>The next thing I wanted to do was adjust the finderscope. I pointed the barrel towards a street light by guessing and looking through the 20mm eyepiece. I found it quick enough, but I had no idea how to adjust the finderscope. Do I look through it from a distance? How do I use the little red dot? Should I have both use open? I really need to do som research before tonight. I ended up not adjusting it and just using the to latches on the barrel for alignment.</p>
<p>I was eager to try and look at something, so I pointed the barrel towards Venus. I was a little difficult to pinpoint, as I was still trying to use the finderscope. When I found it, I discovered that it is to bright to look at. It was difficult to see it properly. However, I could make out the phase of Venus and see the 3d shape of the planet. I will need to buy filters if I am going to look at the planets.</p>
<p>It was difficult to focus the eyepiece, since the slightest touch of the telescope made it shake. I had to adjust it back and forth, each time waiting for the telescope to settle. Looking is also a little difficult, since I must hover my eye a little above the eye piece, to prevent shaking. It would also be nice to zoom in on the objects, which I can&#8217;t. To solve these problems, I should buy the <a href="http://www.celestron.com/astronomy/accessories/celestron-neximage.html">CCD neximage</a> camera. It will prevent the shaking and I can zoom in on objects. As a bouns I don&#8217;t have to take off my glasses every time I need to look through the eye piece. I will also help to achieving my goal of taking photographs. The problem with this is I will have to take my computer with me, to do the recording and viewing. Danish weather is most often too cold for this, so I&#8217;m quite curious as how others manage this. I would also need a table to place the computer on.</p>
<p>I tried polar aligning the telescope. For that I needed to put the rec to 90 degrees and have the counter weights pointing straight down. I also needed to point the barrel at north, to which I borrowed a compass of Kevin (something I need as well). When north was found, I increased the altitude until I could see the north star, Polaris. It wasn&#8217;t very easy, especially since I couldn&#8217;t use the finderscope and I had really no idea how the star looks like, only where to find it from The Big Dipper. I eventually found something, but I am not really sure that it was Polaris. I am hoping that fixing the finderscope will help me here.</p>
<p>After polar aligning I wanted to adjust the RA dial. I read that I should find a star lower on the sky that I know the RA of. The problem was that I couldn&#8217;t get the screw loose to change the dial. I will need to find a tool to help get it loose.</p>
<p>As a last thing, we pointed the scope at the moon. Since it was a full moon and I do not have a moon filter, it was impossible to look at, without going blind. I could project the image onto my hand which was fun. So if I am to look at the moon, I&#8217;ll need a moon filter, or wait till it&#8217;s near new moon.</p>
<p>To recap I will need:</p>
<ul>
<li>Research balancing the telescope on the RA axis.</li>
<li>Research on how to use and adjust the finderscope.</li>
<li>Buy filters for the moon and planets (probably also the stars).</li>
<li>Get a CCD neximage camera.</li>
<li>Find tool to loosen the RA screw.</li>
</ul>
<p>Goal for tonight is to find a specifik star from its dec and ra. I will try and locate <a href="http://en.wikipedia.org/wiki/Zeta_Herculis">Zeta Herculis</a>, which is a binary star, so will be interestning if I can see them both. RA: 16<sup>h</sup> 41<sup>m</sup> 17.16104. Dec: +31° 36′ 09.7873″. Or I will try Izar (<a href="http://en.wikipedia.org/wiki/Epsilon_Bo%C3%B6tis">epsilon Bootis</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2012/04/05/testing-the-telescope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goal: photograph the Horse Head</title>
		<link>http://joensen.eu/2012/04/05/goal-photograph-the-horse-head/</link>
		<comments>http://joensen.eu/2012/04/05/goal-photograph-the-horse-head/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 10:54:22 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[astromaster]]></category>
		<category><![CDATA[astrophotography]]></category>
		<category><![CDATA[horse head]]></category>
		<category><![CDATA[nebula]]></category>
		<category><![CDATA[newtonian]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=101</guid>
		<description><![CDATA[I have always presumed that taking beautiful color pictures of nebulas and galaxies was only possible with the Hubble space telescope or a large one on earth run by professional astronomers. A few weeks ago Andrés showed me some pictures done by amateurs, which &#8230; <a href="http://joensen.eu/2012/04/05/goal-photograph-the-horse-head/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have always presumed that taking beautiful color pictures of nebulas and galaxies was only possible with the Hubble space telescope or a large one on earth run by professional astronomers. A few weeks ago Andrés showed me some pictures done by amateurs, which got me dreaming. It would so cool to be able to take similar pictures and post them on the internet.</p>
<p>So I have set myself a goal, to be able to take a picture of the <a title="Horse Head Nebula" href="http://en.wikipedia.org/wiki/Horsehead_Nebula">Horse Head Nebula (IC434)</a>, like this:<a href="http://joensen.eu/wp-content/uploads/2012/04/Skærmbillede-2012-04-05-kl.-12.07.431.png"><img class="alignnone size-full wp-image-103" title="Skærmbillede 2012-04-05 kl. 12.07.43" src="http://joensen.eu/wp-content/uploads/2012/04/Skærmbillede-2012-04-05-kl.-12.07.431.png" alt="" width="705" height="379" /></a></p>
<p>I then bought a book called &#8220;The Practical Astronomer&#8221;, that has both general information about astronomy, but also practical things about telescopes and star maps. A really great book! In the chapter about telescopes I discovered that there are basically three different types and I read about their advantages and weaknesses. By reading I instantly wanted a newtonian telescope, since it both looked cool and was recommended for beginners.</p>
<p>I went online to look for telescopes and found the one I now have bought, an Astromaster 130EQ. I have no expectations of being able to see the Horse Head with this telescope, it will be used to learn the art of astrophotography.</p>
<p><a href="http://joensen.eu/wp-content/uploads/2012/04/558154_10150764065474919_784089918_11357209_232008442_n.jpeg"><img class="alignnone size-medium wp-image-105" title="Astromaster 130EQ" src="http://joensen.eu/wp-content/uploads/2012/04/558154_10150764065474919_784089918_11357209_232008442_n-224x300.jpg" alt="" width="224" height="300" /></a></p>
<p>Here is a list of things I need to do to achieve my goal:</p>
<ul>
<li>Learn to balance the telescope.</li>
<li>Learn to adjust the sight.</li>
<li>Learn to adjust the Right Accession.</li>
<li>Learn to polar align</li>
<ul>
<li>Buy a compass.</li>
<li><a href="http://en.wikipedia.org/wiki/Polaris">Find Ploaris.</a></li>
</ul>
<li>Learn to use rec and ra to find stars.</li>
<li>Learn to use a star map.</li>
<li>Learn the different constellations.</li>
<li>Buy a motor and learn to use it.</li>
<li>Buy a CCD camera for astrophotography.</li>
<li>Learn to use <a href="http://www.astronomie.be/registax/">RegiStax</a>.</li>
<li>Buy filters for different light wave lengths. (Also for the moon and planets)</li>
<li>Get a better telescope like the <a href="http://www.celestron.com/astronomy/optical-tubes/optical-tube-assemblies/celestron-edgehd-11.html">EdgeHD 11</a></li>
<li>Go to a place with less light pollution.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2012/04/05/goal-photograph-the-horse-head/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monty Hall paradox</title>
		<link>http://joensen.eu/2011/12/01/monty-hall-paradox/</link>
		<comments>http://joensen.eu/2011/12/01/monty-hall-paradox/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 21:15:25 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[monty hall]]></category>
		<category><![CDATA[mythbusters]]></category>
		<category><![CDATA[paradox]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=86</guid>
		<description><![CDATA[I was watching the latest episode of Mythbusters where they tried to see if the Monty Hall paradox was true: Suppose you&#8217;re on a game show, and you&#8217;re given the choice of three doors: Behind one door is a car; &#8230; <a href="http://joensen.eu/2011/12/01/monty-hall-paradox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was watching the latest episode of Mythbusters where they tried to see if the Monty Hall paradox was true:</p>
<blockquote><p>Suppose you&#8217;re on a game show, and you&#8217;re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1 [but the door is not opened], and the host, who knows what&#8217;s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, &#8220;Do you want to pick door No. 2?&#8221; Is it to your advantage to switch your choice?</p></blockquote>
<p>Through different experiments they conclude that no one switches and you win more often by switching.</p>
<p>I remember learning about this in maths, so the results didn&#8217;t surprise me, but it&#8217;s still difficult not to fall into the trap of thinking that both doors still have a 50% chance after one of them have been opened. The problem lies in that the host knows which door has the car and the host opens the door after you pick your door. You can read about the problem here: <a href="http://en.wikipedia.org/wiki/Monty_Hall_problem">http://en.wikipedia.org/wiki/Monty_Hall_problem</a></p>
<p>Naturally I wanted to test this programmatically, so I created this java code to test the paradox for 1 million games:</p>
<pre class="brush: java; title: ; notranslate">
		int wins = 0;
		int gameNr = 0;
		Random random = new Random();
		for (; gameNr &lt; 1000000; gameNr++) {
			// Host chooses a random winning door
			int winningDoor = random.nextInt(3);

			// Player chooses a random door
			int chosenDoor = random.nextInt(3);

			// Host opens a door that is not the winning or chosen.
			int openDoor;
			do {
				openDoor = random.nextInt(3);
			} while (openDoor == winningDoor || openDoor == chosenDoor);

			// Player switches his choice
			chosenDoor = 5 % (chosenDoor + openDoor + 2);

			// Host reveals the players choice and sees what's behind
			if (chosenDoor == winningDoor)
				wins++;
		}

		System.out.println(&quot;Wins: &quot; + wins);
		System.out.println(&quot;Loses: &quot; + (gameNr - wins));
</pre>
<p>The result confirms the mythbusters conclusion:</p>
<blockquote><p><code>Wins: 667297<br />
Loses: 332703</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2011/12/01/monty-hall-paradox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change IE compatibility in JSF</title>
		<link>http://joensen.eu/2011/11/27/change-ie-compatibility-in-jsf/</link>
		<comments>http://joensen.eu/2011/11/27/change-ie-compatibility-in-jsf/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 13:58:06 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[HTTP]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[X-UA-Compatible]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=43</guid>
		<description><![CDATA[Developing for internet explorer is a pain, due to them not adhering to standards for html, css, javascript and almost everything web related. Thankfully they have started following the standards all the other major browers use. The problem now is &#8230; <a href="http://joensen.eu/2011/11/27/change-ie-compatibility-in-jsf/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Developing for internet explorer is a pain, due to them not adhering to standards for html, css, javascript and almost everything web related. Thankfully they have started following the standards all the other major browers use. The problem now is all the sites that were made to work in IE7, break in newer the newer versions that follow the standards. To fix this, microsoft introduced a compatitility mode in IE. The browser some how detects which version your website is made for, by looking at things like the DOCTYPE and tags specific to different IE versions. The problem is that it doesn&#8217;t always work and your site breaks, because IE turns on compatibility mode, even when the site follows the standards.</p>
<p>To fix this, microsoft has defined a meta tag you can put in your HTML, so you can override which IE version is chosen in compatibility mode. This can be because your site uses IE7 only markup and to make sure that it still works in newer browsers, you can tell IE to switch to IE7 mode. It could also be that you want to force IE to use the newest version, when it deceides to use the wrong version.</p>
<p>To do this you add the following META tag:</p>
<pre> &lt;meta http-equiv="X-UA-Compatible" content="IE=9" &gt;</pre>
<p>More information about the X-UA-Compatible meta tag can be found here: <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx</a></p>
<p>However, this won&#8217;t work if you use JSF to develop your website. The meta tag must be before any javascript, for IE to recognise the tag. This is not possible in JSF mojarra, since it puts the JSF related javascript before all other tags in the head element. Instead you must insert it into the header of the HTTP request.</p>
<p>This is done using a filter:</p>
<pre class="brush: java; title: ; notranslate">
package eu.joensen.filter;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;

public class IEFilter implements Filter {

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		HttpServletResponse res = (HttpServletResponse) response;
		res.addHeader(&quot;X-UA-Compatible&quot;, &quot;IE=Edge&quot;);
		chain.doFilter(request, response);
	}

	@Override
	public void destroy() {
	}
	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
	}
}
</pre>
<p>This takes the response before it is delivered to the browser and adds a X-UA-Comaptible header field, where the value is which version you wish to enforce. I have chosen the Edge version, which is the latest version of IE, even when new versions are released.</p>
<p>To add the filter, you must add some configuration in the web.xml file:</p>
<pre class="brush: xml; title: ; notranslate">
	&lt;filter&gt;
		&lt;filter-name&gt;IEFilter&lt;/filter-name&gt;
		&lt;filter-class&gt;eu.joensen.filter.IEFilter&lt;/filter-class&gt;
	&lt;/filter&gt;

	&lt;filter-mapping&gt;
		&lt;filter-name&gt;IEFilter&lt;/filter-name&gt;
		&lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
	&lt;/filter-mapping&gt;
</pre>
<p>First the filter is registered, where the filter-name is a string you choose. The filter-class is the java class you made to filter the response. Secondly you add a fitler-mapping, where you put the chosen filter-name in the first field and the expression to be filtered on in the url-pattern element in the second.</p>
<p>The HTTP reponse:</p>
<blockquote><pre class="brush: plain; highlight: [3]; title: ; notranslate">
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
Accept-Ranges: bytes
ETag: W/&quot;453-1322401175000&quot;
Last-Modified: Sun, 27 Nov 2011 13:39:35 GMT
Content-Type: application/xhtml+xml
Content-Length: 453
Date: Sun, 27 Nov 2011 13:39:45 GMT
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2011/11/27/change-ie-compatibility-in-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glassfish admin console on headless server</title>
		<link>http://joensen.eu/2011/11/25/glassfish-admin-console-on-headless-server/</link>
		<comments>http://joensen.eu/2011/11/25/glassfish-admin-console-on-headless-server/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 15:06:07 +0000</pubDate>
		<dc:creator>Andreas Joensen</dc:creator>
				<category><![CDATA[glassfish]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[administraion]]></category>
		<category><![CDATA[asadmin]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[headless]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://joensen.eu/?p=22</guid>
		<description><![CDATA[The glassfish administraion console requires that you reach it from localhost, which I believe is for safety reasons. However, this is not possible if you want to reach the administraion console on a headless server without a X Server. You &#8230; <a href="http://joensen.eu/2011/11/25/glassfish-admin-console-on-headless-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The glassfish administraion console requires that you reach it from localhost, which I believe is for safety reasons. However, this is not possible if you want to reach the administraion console on a headless server without a X Server. You could use a text only browser like lynx to navigate the admin console, which would work, but the console is not built for this senario, and it would be much easier to just use asadmin for everything instead.</p>
<p>First you must set the admin password, since it is now required, unlike when using the console from localhost. This is done use this command:</p>
<blockquote><p><code>asadmin change-admin-password</code></p></blockquote>
<p>Depending on which glassfish version, the default admin password is one of the following:</p>
<ul>
<li>&#8220;adminadmin&#8221;</li>
<li>&#8220;changeit&#8221;</li>
<li>no password</li>
</ul>
<p>It is also adviserable to set the master password for security reasons, which is done using this command:</p>
<blockquote><p><code>asadmin change-master-password</code></p></blockquote>
<p>When the password has been set, all you need to do is enable the secure admin console, which is not enabled by default:</p>
<blockquote><p><code>asadmin enable-secure-admin</code></p></blockquote>
<p>Then after a restart of the glassfish server, you should be able to access the admin console remotely.</p>
]]></content:encoded>
			<wfw:commentRss>http://joensen.eu/2011/11/25/glassfish-admin-console-on-headless-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

