ActiveSync Error 0×8503001c

11:33 pm July 23rd, 2008

I was getting 0×8503001c while trying to sync my att tilt running windows mobile 6.1 to Windows XP sp3. I finally determined that the problem was in contacts and that all the contacts where I was using the notes field were bad. I recreated those contacts manually without the notes and everything synced fine.

Getting “The referenced assembly is not installed on your system.” when trying to run Helicons ISAPI Rewrite Syntax Converter

1:42 pm January 7th, 2008

I recently upgraded to Helicon Techs ISAPI Rewrite 3. When trying to import my old version 2 ini file I recieved the error “The referenced assembly is not installed on your system” in the Event Log. After a couple searches I discovered that I didnt have some of the Visual C++ libraries installed.

My environment:
Windows 2003 Server (Advanced)
IIS 6.0

Installing this package resolved the issue. Microsoft Visual C++ 2005 Redistributable Package (x86)

Error when trying to run Google Android application in Eclipse

10:11 pm November 27th, 2007

I was trying to build a new Android application using the Eclipse plugin. Everything went find according to the direction except when I tried to run the application. Eclipse said I need to fix errors before running. I took a look at the problems tab and it displayed this error: “Error executing aapt. Please check aapt is present at %”.

After poking around a bit, I found that I needed to specify the location of the SDK that you can download from Google. I was able to fix this by specifying the Android SDK location in the Android configuration section in Eclipse.

Window > Preferences > Android. In “SDK Location” enter the location of the extracted sdk: “C:\devel\sdk\android_sdk_windows_m3-rc22a”.

This also fixes the problem where eclipse cant find the android.jar library.

Free WiFi Hotspot Locator

8:39 am November 15th, 2007

I just found a free WiFi Hotspot Locator. Might come in handy if your travelling or if you just want to know whats in your city.

Free WiFi Locator

Using JSTL and context variables

6:08 pm September 11th, 2007

Recently, I wanted to get rid of the Java scriptlets in my jsp and replace it with JSTL tags. The code in question was the Hitbox and Google Analytics scripts that run in our template. I wanted the scripts to show when the code was running in production. I also wanted the scripts to link to a secure url when the page was encrypted.

Its easy to embed Java code within the JSP. But how do you do this using the Expression Language? That was the challenge.

My setup is:
JSP 1.2
Struts 1.2.0
Tomcat 5.5.12

Challenge 1

My first challenge in the conversion was to figure out how to display the code when on the production server. I did this by setting init parameters in the tomcat web.xml file of the server I wanted to load these scripts.

I added the following code to the end of my tomcat’s web.xml file, located in <tomcat>/conf/web.xml:


<!-- ==================== Analytics production flag ===================== -->
<!-- This flag is used in the template jsp's to decide whether to display -->
<!-- the Analytics tracking code. This should only be on the production -->
<!-- server, but can be added to test code when testing. This is to -->
<!-- ensure that we dont log visits when developing. -->
<context-param>
<param-name>hbxIsProduction</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>gaIsProduction</param-name>
<param-value>true</param-value>
</context-param>

Then in my template.jsp file I added the initParam resource and called the hbxIsProduction variable which I set in web.xml.


<c:if test="${initParam.hbxIsProduction == \"true\"}">
//my hbx logic here
</c:if>
<c:if test="${initParam.gaIsProduction == \"true\"}">
//my google logic here
</c:if>

If an init parameter was set to true than the jsp would output the analytics logic. If the params were set to any other value or non-existent, then the comparison failed and output nothing.

Challenge 2

The second challenge I had was to output the link to the google analytics script with http or https depending on whether the page was secure. I was able to achieve this by calling the pageContext and referencing the request value, secure:


<c:if test="${pageContext.request.secure}">
//my secure google url
</c:if>
<c:if test="${!pageContext.request.secure}">
//my unsecure google url
</c:if>

The final version of my template code looked like this:


<c:if test="${initParam.hbxIsProduction == \"true\"}">
<!-- HBX - Call the default variables -->
<script src="<c:url value="/js/hbx/hbx_cfg.js"/>" language="javascript1.1" type="text/javascript"></script>
<!-- HBX - Set global custom variables, ie affiliate, -->
<script type="text/javascript">
hbx.acct="XXXXXXXXXXXXXXXX";//ACCOUNT NUMBER(S)
hbx.hc1="<c:out value="${sessionScope.affiliate}"/>";//CUSTOM 1:Affiliate
</script>
<!-- HBX - Send data -->
<script defer="defer" src="<c:url value="/js/hbx/hbx.js"/>" type="text/javascript"></script>
</c:if>
<c:if test="${initParam.gaIsProduction == \"true\"}">
<!-- GA - call urchin.js file depending on secure page -->
<c:if test="${pageContext.request.secure}">
<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript"></script>
</c:if>
<c:if test="${!pageContext.request.secure}">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
</c:if>
<!-- GA - set google account and call tracker -->
<script defer="defer" type="text/javascript">
var _uacct = "XX-XXXXXX-X";
urchinTracker();
</script>
</c:if>

Needless to say, my code looks much cleaner and simpler.