<meta name='google-adsense-platform-account' content='ca-host-pub-1556223355139109'/> <meta name='google-adsense-platform-domain' content='blogspot.com'/> <!-- data-ad-client=ca-pub-4320963827702032 --> <!-- --><style type="text/css">@import url(https://www.blogger.com/static/v1/v-css/navbar/3334278262-classic.css); div.b-mobile {display:none;} </style> </head><body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d7256432\x26blogName\x3dThe+Frustrated+Programmer\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLACK\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://frustratedprogrammer.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://frustratedprogrammer.blogspot.com/\x26vt\x3d4213664491834773269', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>
| Tuesday, August 03, 2004

This posting is used to describe a bug in Blogger.com's preview mode to their customer support.

When publishing a Post in Blogger.com, the Post is converted into a single line in HTML. Whitespace doesn't matter in HTML, so its really not a big deal. Unless of course, you use the <pre> tag, like I do in this blog in almost every post. Fortunately, I also use 'Convert line breaks', which converts my line breaks in the Edit Post window into <br /> tags. So my posts end up getting published exactly as I entended.

The rendered HTML for my last Post looks like this:

<div class="post-body">

<p><a href="http://twasink.net/blog/archives/2004/08/tip_to_the_stru_1.html">This blog entry</a> talked about some great issues with session scoped struts forms. I found another one the hard way today:<br /><br />When I added some properties to my session scope form in struts today, I modified my action to pass those properties to the business logic, recompiled, redeployed. But I ended up with:<br /><pre><br />StandardWrapperValve[action]: Servlet.service() for servlet action threw exception<br />java.lang.NoSuchMethodException: Unknown property 'foo'<br /></pre><br />I checked and rechecked things, but I still got the same error.<br /><br />It turned out that because I was using a DynaBean for my ActionForm, combined with <a href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html#Restart%20Persistence">Tomcat 5's Restart Persistence</a>. The old configuration for my form was still cached in the session. The solution was either delete $CATALINA_HOME/work/Catalina to remove the cached session or just logoff and login again.<br /><br />Normally I love the fact that I don't need to re-login after restarting, but this was a pain. </p>


</div>


The bug is in the preview mode. Where for some reason, it doesn't render the posts all on one line, but it still implements the 'Convert line breaks' feature. This causes all text in a <pre> tag to be double spaced, plus other little odd formatting issues.

The HTML for my last Post IN PREVIEW MODE, looked like this:

<div class="post-body">

<p><a href="http://twasink.net/blog/archives/2004/08/tip_to_the_stru_1.html">This blog entry</a> talked about some great issues with session scoped struts forms. I found another one the hard way today:

<br />
<br />When I added some properties to my session scope form in struts today, I modified my action to pass those properties to the business logic, recompiled, redeployed. But I ended up with:
<br /><pre>
<br />StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
<br />java.lang.NoSuchMethodException: Unknown property 'foo'
<br /></pre>
<br />I checked and rechecked things, but I still got the same error.
<br />
<br />It turned out that because I was using a DynaBean for my ActionForm, combined with <a href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html#Restart%20Persistence">Tomcat 5's Restart Persistence</a>. The old configuration for my form was still cached in the session. The solution was either delete $CATALINA_HOME/work/Catalina to remove the cached session or just logoff and login again.
<br />
<br />Normally I love the fact that I don't need to re-login after restarting, but this was a pain. </p>

</div>


See the difference?

Update: Within 12 hours I got this heart-felt response from the blogger support team. I will always remember the personalized service I've received from them.

Hi there,

Thanks for your suggestions regarding the new Blogger interface. We are very interested in feedback from our users so we know what works and what we should improve, so we will certainly take this issue into consideration.

Thanks for using Blogger!

Best regards,
Blogger Support