Archive for April, 2009

Retreive list item id for search result page

First you need to add a new Search Managed Property to the search configuration.

Please do the following steps

1. Go into the SSP, Search Settings, Managed Properties, click on “New Managed Property”
2. Give it a like “ItemID”
3. choose type of Integer
4. In the “Mappings to crawled properties” section, choose “Include values from a single crawled property based on the order specified”
5. click on Add Mapping button, search for the one you want (which is ows_ID) like this in the selection dialog, select it and click OK:

Now add this column in query editor column of search core result web part, and then customize xslt mentioned by zimmer.

So once you create XML , you will notice that your itemid will appear in your search result xml, thne do the needful as per zimmer article ( then you can set ‘Title’ field as Hyper link with your list item, so your hyper link will be “../dispform.aspx?id={itemid}. This url can be vary depending on your document or form library.

No Comments

Tomcat 6 Invoker Services

In Tomcat 3, the undefined servlet is mappted to /servlet/* by default.

However, it is removed in Tomcat 6 (or earlier) as this is an evil approach. It is not suggested to deploy in production environment.

Nevertheless, It may be good for development / learning purpose,

To enable invoker services in Tomcat, (mapping undefined servlet using wild card mapping), do the following steps,
1. uncomment following configuration snippet in web.xml



2. Change context.xml
change <Context>
to <Context reloadable=”true” privileged=”true”>

However, this approach is defined as unsafe action,
it is only suggested to use on development / learning purpose


No Comments

Apache Log Rotation

in httpd.conf, add:

CustomLog "|/apache/bin/rotatelogs /apache/logs/access_log.%Y%m%d 86400 -360" common

apache's path
apache's log path

(changing the path as needed...)
where the number 86400 is seconds to rotation (86400 is 24 hours)
and -360 is minutes offset from UTC 0 (-360 is for US Central)

and comment out any other line beginning with 'CustomLog'

this will give you logs, rotated daily, named something like:


No Comments

Using Firefox single-sign-on MOSS

There is a way thought to allow you to save your typed Windows credentials in Firefox to prevent you from repeatly typing the Windows user name and password.

  1. Enter “about:config” in the address bar of Firefox and hit [Enter]
  2. Do a search on “ntlm“, at least three entries should appear
  3. Double click the second entry and set the value of “network.automatic-ntlm-auth.trusted-uris” to “.yourdomain” (do not forget the dot).
  4. Restart your Firefox to let the change effective.
  5. And when you re-open the Firefox, you might be prompted with the following window.


No Comments

The Virtual Server service may stop responding when the service is starting if one or more of the virtual machines are configured to automatically start when the Virtual Server service starts

I hit this error, I found that there is a patch from MS to fix this issue

No Comments

Convert calendar to String (“MM/dd/yyyy”)

String strdate = null;

SimpleDateFormat sdf = new SimpleDateFormat(“MM/dd/yyyy”);

if (calendardate != null) {
strdate = sdf.format(calendardate.getTime());

No Comments

SharePoint AfterProperties DateTime Comparison

As date time stored in properties.AfterProperties is UTC time, that means it will return the date time according to user’s time zone. This befavior is different from date time field in properties.ListItem.

To get the date time value in AfterProperties directly without changing to time zone specified date time, use following C# script

DateTime tempAfterPropDateTime = DateTime.Parse(afterProp.Value.ToString(),null,DateTimeStyles.AdjustToUniversal);

No Comments

3,4 月, 很忙很忙…

3, 4 月都好忙呢…


上星期二攞左日annual leave, 訓左日 , so good~~~^^

買左對新addidas 波鞋, 發覺addidas D款好多都差唔多

可能差條線又係新款 , sosad, 不過對鞋幾靚呢~~:P

1 Comment

Flex Atom Reader

Flex 用parse XML 太方便了

以下係一個parse 一個from HTTP Server 既atom file 既example

<?xml version=”1.0″?>
<mx:Application xmlns:mx=”” creationComplete=”feedRequest.send();” backgroundGradientAlphas=”[1.0, 1.0]” backgroundGradientColors=”[#333333, #5B5A5A]”>

<mx:HTTPService id=”feedRequest” url=”data/photo.xml” useProxy=”false” />

<mx:Panel title=”Atom Reader” height=”75%” width=”75%” paddingTop=”10″ paddingBottom=”10″ paddingLeft=”10″ paddingRight=”10″ color=”#FFFFFF”>
<mx:DataGrid id=”dgPosts” height=”50%” width=”75%” dataProvider=”{feedRequest.lastResult.feed.entry}” color=”#427F95″>
<mx:DataGridColumn headerText=”Posts” dataField=”title”/>
<mx:TextArea id=”txtarea” height=”50%” width=”75%” htmlText=”{dgPosts.selectedItem.content}” color=”#4B80D8″/>


No Comments



No Comments