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
<< Home