As we have doing some research on the Portal development ... i found sometime is useful to share with all other involve on the portal / portlet development...
Here are some of the best pratices
1. Don't Use PortletPreferences
When you store information in the PortletPreferences object, you are giving up control over where the data is stored, how the data is stored, and how easy it is to potentially mine that data in the future. That's a whole lot of control to be giving up.
2. Get Service Oriented
Don't try to do too much in your portlets. Behavior coded into one portlet is very difficult to reuse in another portlet. Instead, factor our useful and potentially common behavior into a service layer.Making a portlet too complex can slow down the portal, and create a frustrating experience for the user.
3. Encode Your NameSpaces
To avoid name collisions on the portal server, all scripts, URLs, HTML form attributes, and the like, should be namespace encoded. Without encoding a namespace, your portlets will likely work properly in a sequestered, local test environment, but may encounter some very obscure and difficult to reproduce errors when your portlets go into production.
Others:
Use Good Variable Names
Minimize Session Bloat
Comment Your Friggin' Code
Handle IO Exceptions
Servlet and JSP Rules Apply
Use the expiration-cache Tag
Not Every Portlet is a Framework Portlet
Search This Blog
Tuesday, November 17, 2009
Some Cool Stuff to Share
1. GWT-Ext UI Tools for web
Click GWT-Ext
2. Gilead stands for Generic Light Entity Adapter
Click Gilead
3. Desktop Look A like EXTJS
Click EXTJS
Click GWT-Ext
2. Gilead stands for Generic Light Entity Adapter
Click Gilead
3. Desktop Look A like EXTJS
Click EXTJS
Friday, August 21, 2009
Virtualization for Dummies

HAHA just got an email from SUN about the Virtualization
"Virtualization for Dummies"
- Save energy, time and money
- Allocate memory where it's needed
- Improve scalability
- Understand the different types of virtualisation
- Achieve virtualization success
http://www.sun.com/offers/docs/virtualization_sun_amd.pdf
...... but woh i feel betul betul dummy loh haha
Monday, July 20, 2009
What is portal framework ?
In Java there are a lot of portal framework .. from my study i found :
Started with ...
Jakarta Pluto --> Jakarta JetSpeed --> OpenPortal --> BnPortal --> EXO Platform then
Liferay then Glassfish Web Synergy (now it call Web Space !!!) Please don't confuse both Synergy and Web Space, both are same haha ... what a mess previously
Base on my finding ...to answer Which is the best ? i would said Liferay or Web Space ... Web Space is enhance version from Liferay by Sun. However i cannot justify Exo Platform ... as i hardly can test into deep due there are a lot of exceptions ..too bad loh....
Started with ...
Jakarta Pluto --> Jakarta JetSpeed --> OpenPortal --> BnPortal --> EXO Platform then
Liferay then Glassfish Web Synergy (now it call Web Space !!!) Please don't confuse both Synergy and Web Space, both are same haha ... what a mess previously
Base on my finding ...to answer Which is the best ? i would said Liferay or Web Space ... Web Space is enhance version from Liferay by Sun. However i cannot justify Exo Platform ... as i hardly can test into deep due there are a lot of exceptions ..too bad loh....
Sunday, July 19, 2009
What is EE Portal ?
EE Portal ... Enterprise Exchange Portal ... is a B2B, B2C, C2C, B2G trading portal !
Still in designing stage ... Will call it Getrade ! or tradeChain, BarterDeal, OKDeal, TauTanDuit
Haha ! Cool name ah .... i need to think of some nice name Like Yahoo, Google, Facebook
Still in designing stage ... Will call it Getrade ! or tradeChain, BarterDeal, OKDeal, TauTanDuit
Haha ! Cool name ah .... i need to think of some nice name Like Yahoo, Google, Facebook
Thursday, May 21, 2009
www.curimakan.com no more liao

Has think a cool domain for some business while "Yam Chat" chi chat with my friends....
Suddenly think of this www.carimakan.com.my plan to create some services portal and run some advitisation business for food , for source of finding resource ... but too bad this domain was just taken by jobstreet !!!
This dream was just fly away .......
Thursday, April 2, 2009
Malaysia Share Market Up since end of March 09
Wah ... wasted !!! ... Commerze, Bursa, Genting and Resorts price raise up so fast since last week ...
Commerze close at 7.400 raise +0.400
WAHHH !!! my friend ask me to buy in when it was 6 ... too bad i didn't follow ... wasted !!
Bursa close at 5.450 raise +0.300 ...
i was plan to buy when it value was 4+ .. again ! mis out !!! Wasted
Genting close at 4.020 raise +0.240
This share being down up to 3+ and i was plan to buy but too bad because my reminser said not stable due to they seem plan to move they cash for Genting Int plan
Resorts close at 2.230 raise +0.070 ... I was discuss with my friend to buy in when it's value was between 1.85 - 1.9 .. but again because of "his one word" changed all my plan
............. BUT I HAVE invested Maybank in 3.98 ... too bad when it value was 3.7 -3.85 my office network was not stable therefore only manage to buy in next day ... TMI is another good share to invest now ... UEMLAND ... i'm still thinking .. any suggestion ?
Commerze close at 7.400 raise +0.400

WAHHH !!! my friend ask me to buy in when it was 6 ... too bad i didn't follow ... wasted !!
Bursa close at 5.450 raise +0.300 ...
i was plan to buy when it value was 4+ .. again ! mis out !!! Wasted
Genting close at 4.020 raise +0.240
This share being down up to 3+ and i was plan to buy but too bad because my reminser said not stable due to they seem plan to move they cash for Genting Int plan
Resorts close at 2.230 raise +0.070 ... I was discuss with my friend to buy in when it's value was between 1.85 - 1.9 .. but again because of "his one word" changed all my plan
............. BUT I HAVE invested Maybank in 3.98 ... too bad when it value was 3.7 -3.85 my office network was not stable therefore only manage to buy in next day ... TMI is another good share to invest now ... UEMLAND ... i'm still thinking .. any suggestion ?
How to add & disable the icon in Tomcat

To disable it very simple .. just remove this favicon.ico file BUT remember to delete the cache on your browser and restart the tomcat before try... Ha !
If you want to change the favicon.ico in diff page or diff web app below are some info which might help yours .. cheers
The Favourites Icon has a file type of image/x-icon. This is not defined by default in the Tomcat configuration.
Add the following mime-mapping element to web.xml sets the correct mime-type, allowing the browser to interpret the file correctly.
<!-- Set Favourites Icon MIME-Type -->
<mime-mapping>
<extension>ico</extension>
<mime-type>image/x-icon</mime-type>
</mime-mapping>
On modern browsers, a newer method for adding a favourites icon has been added. This method now takes preference over the default favicon.ico file. Therefore, for best results on your web pages, include the following line in your HTML as well. For compatibility with older browsers however, we recommend using the favicon.ico method.
<link rel="icon" type="image/ico" href="/favicon.ico"/>
- Using a link in this way also allows different icons for different pages of your site
- You can also use a PNG image by using image/png above instead of image/ico.
- href can point to any valid image location, as long as the image is the correct type (ico if you specified image/ico, png if you specified image/png etc..) and size (16x16 or 32x32)
Wednesday, April 1, 2009
Malaysia Event Management Business
Hi, my sister and few friends has organise their new event management business...
Any one few free to post me any inquiry ...
Looking for promotion girls... event orginiser, road show etc
Any one few free to post me any inquiry ...
Looking for promotion girls... event orginiser, road show etc
Thursday, March 19, 2009
How to store UTF8 data into MYSQL (Java)
Well, i would like to share with yours 乱码解决方法 for Java / Mysql
There are few steps :
STEP 1.
Makesure every content delivery from your server tells the client (browser) the correct encoding to use.
example :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
or
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
STEP 2.
Makesure configure your MYSQL DB Server to support Multilanguage and set the default charset and collate
Or during table creation set it !
example :
CREATE TABLE PROPERTY
(
ID BIGINT(10) NOT NULL auto_increment,
PROPERTY_NAME VARCHAR(200) NOT NULL,
DATECREATED DATETIME NOT NULL ,
CREATEDBY VARCHAR(50) NOT NULL,
DATEUPDATED DATETIME NOT NULL ,
UPDATEDBY VARCHAR(50) NOT NULL,
PRIMARY KEY (ID)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci
GO
STEP 3.
JDBC Connection for MYSQL inorder to store and make sure the connection is using utf8 encoding you need to configure the JDBC URL to
jdbc:mysql://ServerName:3306/DBName?useUnicode=true&characterEncoding=UTF8
STEP 4. This step took me few days to research
Set the character encoding in your Java :
Then you need to configure this filter in your web.xml to be executed before every request:
There are few steps :
STEP 1.
Makesure every content delivery from your server tells the client (browser) the correct encoding to use.
example :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
or
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
STEP 2.
Makesure configure your MYSQL DB Server to support Multilanguage and set the default charset and collate
Or during table creation set it !
example :
CREATE TABLE PROPERTY
(
ID BIGINT(10) NOT NULL auto_increment,
PROPERTY_NAME VARCHAR(200) NOT NULL,
DATECREATED DATETIME NOT NULL ,
CREATEDBY VARCHAR(50) NOT NULL,
DATEUPDATED DATETIME NOT NULL ,
UPDATEDBY VARCHAR(50) NOT NULL,
PRIMARY KEY (ID)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci
GO
STEP 3.
JDBC Connection for MYSQL inorder to store and make sure the connection is using utf8 encoding you need to configure the JDBC URL to
jdbc:mysql://ServerName:3306/DBName?useUnicode=true&characterEncoding=UTF8
STEP 4. This step took me few days to research
Set the character encoding in your Java :
But sometime this didn't work...request.setCharacterEncoding("utf-8");
Then you need to configure this filter in your web.xml to be executed before every request:
<filter>
<filter-name>UTF8EncodingFilter</filter-name>
<filter-class>
com.vidasprint.common.UTF8EncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter><filter-mapping>
<filter-name>UTF8EncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Subscribe to:
Comments (Atom)
