Password Woes
So a few things I've noticed about Passwords here at wonderland are that none of them have the same restrictions/parameters.
Lets start with the Windows Password:
- minimum length: I think it's 6 characters
- Maximum Length: not sure if there is one but there is a rumor floating around that it's 127 chars.
- Special Chars allowed: Yes
- Quirkiness: nothing so far but stay tuned.
Accelerator Passwords (better split this up):
Ecom2:
- minimum length: not sure but I think 6 chars.
- maximum length: haven't hit one yet (up to 11 chars)
- Special Chars allowed: not sure
- Quirkiness: nothing so far.
WCDEV/WC6:
- minimum length: 8 characters
- maximum length: ?
- Special Chars allowed: not sure
- Quirkiness: besides it doesn't match ECOM2? nothing.
iSeries/WCDEV (server):
- minimum length: 6?
- maximum length: at least 10 maybe less my 11 char password failed on me
- Special Chars allowed: not sure
- Quirkiness: if you are trying to log into the file system either through start/run or on a saved link/mapped ip you will have to match up this password with your windows password or you'll be pulling your hair out trying to make it all happen, and you'll still fail. Also Ryan has informed me that Passwords contiaining capitol letters fail on this (I think when trying to access the filesystem) and someone mentioned that a number starting a password is a bad idea (also fails some how).
So to sum it up if you want to make all your paswords match when you change (every 45 days) you will have to keep them between 8 and 10 chars ( or maybe 8 and 8 chars) and you probably don't want to use capital letters AND you may want to avoid starting your password with a number.
On a more exciting note Brett has informed me that Accelerator doesn't force a password change like windows does ( i'm not sure it forces a change at all, and the iseries password can be different from the accelerator password so my suggestion/plan is to use one password for all accelerator logins and then just change the windows and iseries/wcdev password as needed.
if I had the clout to do anything about it all I would but alas i'm merely a drudgen.
Print This Post
Import Explosions: how to calm the storm
So we recently started rebuilding our ProForm site (and by rebuilding I mean from the ground up...mostly), and lucky me I was placed on import duty. Well being the freakin' genius that I am I realized that .csv files for WorkoutWarehouse would likely work on Proform since we generally don't change them on the 6.0 stores (we tend to like to try to pretend we keep things standardized). So I grabbed me some WW goodness and commenced importing. I only had about 12 .csv files on me but it was enough to get a few products to test and build with.
Not long after the imports we noticed we couldn't add products to the shopping cart, we kept getting some bizzarre error saying that it couldn't resolve the product ID from the SKU.
MENTAL NOTE: when getting the aforementioned error check the "defining attributes"
I'd seen this error before on NordicTrack and I knew it has something to do with, you guessed it, the sku. However I was too involved in my own little world to do anything about it so Phil dug in and found that somehow our descriptive attributes from the .csv were placed in the wrong attributes section...instead they were placed as "defining attributes" which is bad because we all know that each defining attribute is a SKU. Once we deleted all defining attributes the products worked fine, however we were still stuck with the problem of what to do about the lousy imports that we would get should we try anymore .CSV's.
Turns out the answer is quite simple...there is a certain DTD (wcs.dtd) that needs to be defined to do what you want it to do and in our case on ProForm it was not defined so well. the trick here is to steal one you know works for the site you are on. Which brings me to the whole point of this post, all I really wanted to do was plaster this path somewhere else so when I run into this agian I have a better chance of stumbling onto a solution before it's too late. Sure I could go on about how to properly write a DTD and make it do what you want, but that would cut into my Reaper time?
the path you've all been waiting for, the path that contains all DTD's from WorkoutWarehouse to Proform and everything in Europe is:
\\wcdev\QIBM\UserData\WebSphere\AppServer\V6\ND\profiles\wcdev6\nulltemp\catalogimport
Print This Post
Awesome Image Evolution
So a while back, and by a while I mean about 3 months or so ago Marketing decided they'd like to show some eye catching images on some of the products on two of our sites...lucky me I got this task and at the time accomplished this the only way I could think of (and I'm not sure why it's the only thing I could think of). What I did was use Field 4 as a place holder for a phrase/word that would trigger an image to be shown if a proper word/phrase was in that field. The code looked quite similar to the following:
<wcbase:useBean id="product" classname="com.ibm.commerce.catalog.beans.ProductDataBean" scope="request" /> <c:if test "${product.field4 == 'blah'}"> <img src="blah"/> </c:if> |
While functional and handy for keeping any rougue phrases from triggering a false image this is not ideal, especially when your marketing group keeps adding more and more images to display...I think now we are up to around 8.
So about a month or so ago Phil got a task to add yet another image and while consulting about it we decided it would be better to change the code so that there weren't so many if's in our code. So we chaged it to the following:
<wcbase:useBean id="product" classname="com.ibm.commerce.catalog.beans.ProductDataBean" scope="request" /> <c:if test="${product.field4 != ''}"> <img src="<c:out value="${jspStoreImgDir}${product.field4}"/>.jpg" alt="<c:out value="${product.field4}"/>" /> </c:if> |
This is much better because it allows us to put any value in field4 and then the code will strip that value and slap a .jpg on the end, so as long as we have a value.jpg image it will show up. However we did find a bug in this, apparently if you have had a value in field4 and deleted said value it confuses the code and websphere will still look for a .jpg image which of course is nowhere to be found, and if viewed in the wrong browser (ie IE) a missing image will appear (funny how missing images can appear). So recently we've changed this code yet again and this time I think we nailed it, have a look:
<wcbase:useBean id="product" classname="com.ibm.commerce.catalog.beans.ProductDataBean" scope="request" /> <c:if test="${!empty product.field4}"> <img src="<c:out value="${jspStoreImgDir}${product.field4}"/>.jpg" alt="<c:out value="${product.field4}"/>" /> </c:if> |
The empty seems to ignore any previously entered values and focus on the fact that the field is empty and not so much look for a null value.
THE END
Print This Post
Limelight recieved an update
Today I had to change out some of our cached content, and wouldn't you know it, limelight has upgraded their website (it sure looks nice, but now requests take 10-30 minutes instead of 45 seconds
). Anyway, I figured that I would go ahead and make an update post with the instructions on how to clear an image/page.

1 - To use limelight, you still go to the same place, http://reports.llnw.com/. You'll probably notice that the login page looks much nicer than before, and we still use the same username/pass to get in, so if you forgot what it is then check with Ninja, Brett, Brandon, Brett/Burt, or me.

2 - When you log in, you get dumped at this empty page... click on "Tools" in the upper right corner of the screen.

3 - And here is our purge list. Much nicer to look at, and it's been ajax'd! You can sort through requests (although there are not many listed right now
) but more importantly, you can click on the tiny "Add Request" link on the upper right side (next to the 'Search' box).

4 - The submit is pretty self explanitory, although make sure that you click the drop-down menu on the top left and pick a "ShortName", if you don't you'll just get errors when you try to submit your purge request. After you have picked a name, type in the url you want cleared (you can either use the limelight address (images.whatever.com) or the standard 3dubs (www.whatever.com). Then if you want a confirmation email fill out the bottom form, otherwise click on the "Submit Request" button. You'll then hit a re-direct that dumps you back at the reports page.
5 - Wait 10 - 40 minutes... seriously... I'm not kidding, and if you think I am, check out those request times in the screen shot (the requested vs. completed columns).
Print This Post
The joys of Try Catch (in a jsp)
This post is brought about after having Ninja come over and look at my code and making me realize that while what I was doing was good, I had not used a try catch and as such would never find exactly why my code was generating over 1500 lines of errors in my server log (ouch). Here is the way of Scriptlet (aka ninjascript) Try Catch-ery.
<% try { %>; <%-- code goes here --%>; <% } catch (Exception e) { e.printStackTrace(); Thread.sleep(20000); } %>; |
You can further mod this to make it possibly more helpful by adding/replacing the last line so you end up with something like:
<% try { %> <%-- Code goes here --%> <% } catch (Exception e) { System.out.println("Exception caught in NameOf.jsp"); System.out.println(e.toString()); e.printStackTrace(); } %> |
Now for those people who are purists and understand that scriptlets really are not up to par, and that they are ugly and screw things up and are not elegant in the least, there is another way to Try Catch on your JSP. Simply use a JSTL Try Catch. Here I'll set up an example:
<c:catch var ="catchException"> <wcbase:useBean id="category" classname="com.ibm.commerce.catalog.beans.CategoryDataBean" > <c:set value="${WCParam.parent_category_rn}" target="${category}" property="categoryId" /> </wcbase:useBean> </c:catch> <c:if test = "${catchException!=null}"> The exception is : ${catchException}<br /><br/> There is an exception: ${catchException.message}<br/> </c:if> |
We set up a variable (catchException) and then what we want to do inside that c:catch. So we are trying to instantiate this bean and we want to make sure it doesn't throw an error (which as part of the joys of websphere if that bean throws an error your page will fail and you'll either get a portion of your page with nothing else, or you'll get a series of dreaded CMNxxxx errors). Right after the c:catch block we set up a c:if with to test value of ${catchException, if it's not empty, then an error was thrown and we should kick out what the error is so that we can fix it (without digging through 1500 lines of error-logged code).
Print This Post
Weekly Training – Debugging
It's time to learn how to get the bugs out. This week we covered basic debugging (from starting the server) to using some external tools (such as the fantastic Firebug plug-in). For the full show you can check the audio clip at the end (I'll post it when I'm done 'cleaning' it).
Highlights:
- Rational debugging mode
- Firebug (for both CSS editing and javascript debugging)
- Drew's fantastic commentary as nothing works the way he intends (for the first 20-ish minutes)
- My extremely long pause... that I think I may still be on.
On a side note, there are two other tools that are very helpful when trying to debug or develop on IE, Safari, Linux browsers, etc. They are XRAY and Aardvark, and both are bookmarklets (meaning you bookmark the javascript itself and run it when you need it, similar to a bookmark).
XRAY can be found here http://www.westciv.com/xray/.
Aardvark can be found here http://karmatics.com/aardvark/bookmarklet.html.
Audio clip will be here when I'm done editing it... UPDATE: Or it won't, looks like my sansa destroyed the file, I mean it's still there, just not in a format that any program can read... I may still play with this, but I'm thinking it's a lost cause... sorry
Print This Post
Change Pages in Accelerator (Dynamic Text)
So Ben has requested that we do this in all of our new 6.0 stores, and at one time or another we've all seen how dynamic text has helped save us time (replacing zingers, bugs, etc) and cut down on hard-coding in our jsp files. It also helps make our sites more internationally friendly (since our international team can just grab the localized text files and edit them for what they need
). So here we go, here is how to add some dynamic text into a page that you can then edit through accelerator.
To define the new dynamic text message for the store and the Change Pages page:
- 1. Navigate to the following directory:
* WC_eardir/Stores.war/WEB-INF/classes/ConsumerDirect
* Cloudscape workspace_dir\Stores\WebContent\WEB-INF\classes\ConsumerDirect - 2. Open the storetext_dynamic_locale.properties file for editing.
- 3. Insert the following text at the end of the file:
# ShoppingArea/DiscountSection/DiscountDetailsDisplay.jsp
Discount_Disclaimer = Some restrictions may apply. Discount cannot be combined with other offers. - 4. Save and close the file.
- 5. Open the storetext_dynamic_labels_locale.properties file, located in the same directory, for editing.
- 6. Insert the following text at the end of the file:
# ShoppingArea/DiscountSection/DiscountDetailsDisplay.jsp
DiscountDisclaimer = Discount disclaimer
DiscountDisclaimer_Text = - 7. Save and close the file.
- 8. Restart your WebSphere Commerce instance to load the changed properties files.
To add the option for setting the discount disclaimer text to the Change Pages page:
- 1. Navigate to the following directory:
* WC_eardir/Stores.war/WEB-INF/xml/tools/stores/ConsumerDirect/devtools/storefront
* Cloudscape workspace_dir\Stores\Web Content\WEB-INF\xml\tools\stores\ConsumerDirect\devtools\storefront - 2. Open the StoreFront.xml file for editing.
- 3. Add the following lines to the store-front-text element:
- 4. Save and close the file.
Open your jsp file and where you want your dynamic text to appear, insert the following.
- 1. <fmt:message key="Discount_Disclaimer" bundle="${storeDynamicText}"/>
- 2. Save and close the file.
That should do it... please note that WordPress strips out all the formatting, so we lose all our nice tabbing, that explains why the code above looks so poor. The bulk of this post was taken directly from IBM's tutorial website, so if you get lost, go there.
Print This Post
Updating Struts
So we all remember that you only edit the struts-config-ext.xml file right (you don't edit the plain struts-config.xml because IBM constantly overwrites that file when you push updates etc.)? Wrong, to avoid spinning wheels and wondering why nothing is working (your view that is) make sure that you edit both struts-config-ext and struts-config-live. This also cuts down on brow-beating, dead-horse-beating, and all around sheepishness.
Print This Post
Add dealers to freemotion
If you ever need to add dealers to freemotion you'll need to look at a file called dealers.js..."don't worry when the time comes, you'll know"
you shouldn't, but you may also need a file called dealerLocatorDisplay.jsp but only if you are adding a new province. Even though dealers.js doesn't show that all states are added, they are already in dealerLocatorDisplay.jsp (provinces are not all there) so you shouldn't have to touch dealerLocatorDisplay.jsp unless you are adding a province.
Print This Post

