ATG dos and donts with Weblogic

1. Use single and Double quotes alternatively.
       
    <dsp:param name='<%="abc"%>' value = "12" /> - Correct
    <dsp:param name="<%="abc"%>" value = "12" /> - Wrong

2. Proper String Concatenation
    <dsp:param name='"xxx" + <%="abc"%>' value = "12" /> -  
    Correct
    <dsp:param name="xxx"<%="abc"%> value = "12" /> - Wrong

3. Use DynamoHttpServletRequest instead of HttpServletRequest
   DynamoHttpServletRequest drequest = 
   ServletUtil.getDynamoRequest(request); 

4. Always Specify encoding type in JSP Pages
   <%@ page contentType  = "text/html" %>

   Below are few best practices for developers

1. Always use Generics.
2. Use String Builder instead of String Buffer in logging.
3. Always use Enhanced For Loop.
4. Use annotations(@override).
5. While using BigDecimal try to use toPlainString() instead of
   toString().
   eg:
   BigDecimal productPrice = new BigDecimal(pPrice);
   objRequest.setParameter
   (PRICE,productPrice.toPlainString()); - Correct
   objRequest.setParameter(PRICE,productPrice.toString()); -
   Wrong

Comments

Popular posts from this blog

Weblogic Issues during EAR Deployment Exception in AppMerge flows progression

remote debug in eclipse with both Admin and Managed Servers running

Oracle Recommended Approach for ATG10.1.2 Siebel 8.1.1.10 Integration