<?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:blogger='http://schemas.google.com/blogger/2008' 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-31062461</id><updated>2015-06-14T02:17:21.770-07:00</updated><title type='text'>Turbots</title><subtitle type='html'>view the world through my eyes</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wowturbots.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://wowturbots.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dieter Hubau</name><uri>https://plus.google.com/115690325704595009508</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-xRnA228ymXc/AAAAAAAAAAI/AAAAAAAAC6s/1rrDJDWpqpc/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-31062461.post-2700969606633691405</id><published>2013-04-04T03:08:00.001-07:00</published><updated>2013-04-04T03:08:27.643-07:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;Migrating from Tomcat to Weblogic 10.3.3&lt;/h2&gt;&lt;h3&gt;Chapter 1: Compiling JSPs&lt;/h3&gt;&lt;div&gt;In many large, old web applications, you will come across JSPs which are filled with scriptlets and Java code, as it was the common practice &quot;back in the day&quot; to intermix the logical layer with the presentation layer.&lt;/div&gt;&lt;div&gt;Nowadays, this is very much frowned upon, because when using the latest web frameworks such as JSF or Spring MVC (as a few of the examples), is has become much easier to work using one of the &quot;separation of concerns&quot; programming patterns such as the Model-View-Controller pattern.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The most common problem when migrating from Tomcat to Weblogic is that a lot of the JSPs just won&#39;t compile anymore. This is due to the higher strictness of the Weblogic JSP compiler than the regular Tomcat compiler.&lt;/div&gt;&lt;div&gt;In this blog post, I will describe a couple of problems (and solutions!) you might encounter when trying to get these JSPs to compile again.&lt;/div&gt;&lt;h4&gt;Quotes within Quotes&lt;/h4&gt;&lt;div&gt;This is a very common mistake in old JSPs, usually because of &lt;b&gt;overuse of scriptlets&lt;/b&gt; inside a JSP. I&#39;ll demonstrate this using an example:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;a href=&quot;javascript:gotoPage(&#39;&amp;lt;%= bean.getProperty(&quot;page&quot;) %&amp;gt;&#39;)&quot;&amp;gt;LINK&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;You might already notice there&#39;s a lot of bad practices in the line above, but in a regular servlet container such as Tomcat, this will compile and run fine.&lt;br /&gt;On an application server though, this won&#39;t compile and if you have many hundreds of JSPs like this, will cost &amp;nbsp;you lots of time and refactoring work.&lt;br /&gt;First, let&#39;s see what is wrong with that line of code:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Using double quotes within double quotes&lt;/b&gt; - not allowed according to specs even though Tomcat forgives you&lt;/li&gt;&lt;li&gt;&lt;b&gt;Using scriptlets inside HTML tags&lt;/b&gt; - not recommended, bad practice&lt;/li&gt;&lt;li&gt;&lt;b&gt;Using&amp;nbsp;JavaScript&amp;nbsp;methods inside the href attribute&lt;/b&gt; - using the onclick method is better&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Secondly, how can we fix this?&lt;/div&gt;&lt;div&gt;The easiest way to make this piece of code compile is the following:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&amp;lt;a href=&quot;javascript:gotoPage(&#39;&amp;lt;%= bean.getProperty(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;\&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&quot;page&lt;/span&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&quot;) %&amp;gt;&#39;)&quot;&amp;gt;LINK&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;But I don&#39;t like this solution, as it&#39;s still very messy and prone to bugs. It&#39;s probably better to try and leave out the&amp;nbsp;JavaScript&amp;nbsp;and put that in the bean class:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&amp;lt;a href=&quot;&amp;lt;%= bean.getJSLinkForPage(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;page&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;) %&amp;gt;&quot;&amp;gt;LINK&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This won&#39;t compile though, since the single quoted value &#39;page&#39; is incorrect Java code, since it is&amp;nbsp;interpreted&amp;nbsp;as a char value. You can solve this by reversing the quotes:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&amp;lt;a href=&#39;&amp;lt;%= bean.getJSLinkForPage(&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;page&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;) %&amp;gt;&#39;&amp;gt;LINK&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Still, this can be improved by using JSTL instead of scriptlets, which is much more clean and forces the developer to think about how he can write better code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&amp;lt;a href=&quot;${bean.jsLink}&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&quot;&amp;gt;LINK&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The line of code above is about as simple and clean as u can get, forcing the developer to write the controller code in Java, resulting in less bugs. You can spot compiler errors straight away and you can unit test the code, which is a big plus.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wowturbots.blogspot.com/feeds/2700969606633691405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31062461&amp;postID=2700969606633691405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default/2700969606633691405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default/2700969606633691405'/><link rel='alternate' type='text/html' href='http://wowturbots.blogspot.com/2013/04/migrating-from-tomcat-to-weblogic-10.html' title=''/><author><name>Dieter Hubau</name><uri>https://plus.google.com/115690325704595009508</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-xRnA228ymXc/AAAAAAAAAAI/AAAAAAAAC6s/1rrDJDWpqpc/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31062461.post-4432423769097960880</id><published>2013-04-03T09:00:00.000-07:00</published><updated>2013-04-03T09:01:18.880-07:00</updated><title type='text'>Developing in Netbeans 7.3</title><content type='html'>&lt;h2&gt;Developing in Netbeans 7.3&lt;/h2&gt;&lt;h3&gt;Introduction&lt;/h3&gt;&lt;div&gt;As an IT consultant, I usually have to work with any PC or laptop the client provides me with. Most of the time, the hardware I work with is not shining new but adequate for developing applications.&lt;/div&gt;&lt;div&gt;However, now and then you come at very big clients, which have thousands of employees and give the same, crappy laptop to all of them. Project managers working on Outlook and Office, testers working on the intranet and testing web applications using different browsers, and us, the developers.&lt;/div&gt;&lt;div&gt;While working on spreadsheets in Excel or clicking around in a web application&amp;nbsp;doesn&#39;t&amp;nbsp;require a state-of-the-art PC, developing Java code in an IDE while running a local Weblogic instance and an Oracle XE database DOES...&lt;/div&gt;&lt;div&gt;I was tired of waiting for Eclipse to compile my code, to publish my changes to Weblogic or to restart a database... I just&amp;nbsp;wasn&#39;t&amp;nbsp;performing really good and was browsing the web while waiting &lt;b&gt;a lot&lt;/b&gt;!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Because of this, as a first improvement, I wanted to change IDEs and try something different. I chose Netbeans as my first test subject!&lt;/div&gt;&lt;h3&gt;Fast&lt;/h3&gt;&lt;div&gt;The first thing I realized when using this IDE (Netbeans 7.3) was: &lt;i&gt;&lt;b&gt;fast!!!&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;This IDE is so much better at doing what it has to do, and nothing more, avoiding the constant question: &quot;&lt;i&gt;what&#39;s it doing now again?&lt;/i&gt;&quot; and &quot;&lt;i&gt;why am I seeing 25 of these &quot;JPA Java Change Event Handler&quot; events in my progress pane?&lt;/i&gt;&quot;&lt;/div&gt;&lt;h3&gt;Maven&lt;/h3&gt;&lt;div&gt;Netbeans uses Maven to manage the projects in the IDE, using it to structure, build, test, run and deploy your applications. It also supports various other build tools (Ant) through the use of plugins. Awesome!&lt;/div&gt;&lt;h3&gt;Free&lt;/h3&gt;&lt;div&gt;Netbeans is free. Bitchin&#39;.&lt;/div&gt;&lt;h3&gt;Debugging&lt;/h3&gt;&lt;div&gt;Once you fix the bug where debugging is &lt;u style=&quot;font-style: italic;&quot;&gt;extremely&lt;/u&gt;&amp;nbsp;slow in Netbeans (check &lt;a href=&quot;https://sites.google.com/a/geotoolkit.net/intviewer/intviewer-platform-and-modules/overview-of-api-changes-in-intviewer-4-4&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; post for 7.1.1 or &lt;a href=&quot;http://imgur.com/Mpa8by3&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt;&amp;nbsp;for 7.3), it actually becomes so much fun and extremely effective to debug your application!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Built-in support for Application Servers (Glassfish/Weblogic)&lt;/h3&gt;I&amp;nbsp;didn&#39;t&amp;nbsp;have to do anything fancy to deploy my application to Glassfish or Weblogic. Just right-click the project, click &#39;Run&#39; and it will start your application server, deploy your application and open your browser to the correct starting page. &lt;u&gt;Easy&lt;/u&gt;!&lt;br /&gt;Also, profiling works out-of-the-box in Netbeans, and quite well, actually.&lt;br /&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;I couldn&#39;t be happier developing in Netbeans at the moment. It opens files faster, it runs faster, it compiles faster and it makes my life as a developer much easier!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wowturbots.blogspot.com/feeds/4432423769097960880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31062461&amp;postID=4432423769097960880' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default/4432423769097960880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default/4432423769097960880'/><link rel='alternate' type='text/html' href='http://wowturbots.blogspot.com/2013/04/developing-in-netbeans-73.html' title='Developing in Netbeans 7.3'/><author><name>Dieter Hubau</name><uri>https://plus.google.com/115690325704595009508</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-xRnA228ymXc/AAAAAAAAAAI/AAAAAAAAC6s/1rrDJDWpqpc/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31062461.post-2869637916657312063</id><published>2012-05-24T05:38:00.002-07:00</published><updated>2012-05-24T06:19:31.107-07:00</updated><title type='text'>Blog Reboot</title><content type='html'>&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Just to mention to whoever is reading, that I will start with more regular blog posts again!&lt;br /&gt;The purpose of these blogs is twofold.&lt;/span&gt;&lt;br /&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-2GB0E_xlOro/T7409L5kE2I/AAAAAAAAAkM/admUJWUVwoU/s1600/Quick_restart.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; display: inline !important; margin-bottom: 1em; margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://4.bp.blogspot.com/-2GB0E_xlOro/T7409L5kE2I/AAAAAAAAAkM/admUJWUVwoU/s200/Quick_restart.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;restarting...&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Firstly, it will act as an archive for myself where I can write down and rant about work, society and life in general.&lt;br /&gt;Secondly, it&#39;s to present some of you with my views on current technologies, as well as things that bother or interest me.&lt;br /&gt;So, expect to see a new blog in one of the coming days, yet I still don&#39;t know about what :-)&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://wowturbots.blogspot.com/feeds/2869637916657312063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31062461&amp;postID=2869637916657312063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default/2869637916657312063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31062461/posts/default/2869637916657312063'/><link rel='alternate' type='text/html' href='http://wowturbots.blogspot.com/2012/05/blog-20.html' title='Blog Reboot'/><author><name>Dieter Hubau</name><uri>https://plus.google.com/115690325704595009508</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-xRnA228ymXc/AAAAAAAAAAI/AAAAAAAAC6s/1rrDJDWpqpc/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-2GB0E_xlOro/T7409L5kE2I/AAAAAAAAAkM/admUJWUVwoU/s72-c/Quick_restart.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Martelaarslaan, 9000 Gent, België</georss:featurename><georss:point>51.0471986 3.7105459</georss:point><georss:box>51.0447031 3.7056104 51.0496941 3.7154814000000003</georss:box></entry></feed>