Monday, August 26, 2013

Perception



Once there was this guy who was in love with a girl. She wasn't the most beautiful and gorgeous but for him, she was everything.
He used to dream about her, about spending the rest of his life with her.
His friends told him, "Why do you dream so much about here, when you don't even know if she loves you or not? First tell her your
feelings, and get to know if she likes you or not". He felt that was the right way. The girl knew from the beginning that this guy loved her.
One day when he proposed, she rejected him.

His friends thought he would take to alcohol, drugs etc. and ruin his life. To their surprise, he was not depressed. When they asked
him how was it that he was not sad, he replied, "Why should I feed bad? I lost one who never loved me and she lost the one who really loved
and cared.
"When life give you a 100 reason to cry, show life that you have 1000 reason to smile."
"Life is wonderful if you know how to live."

Grails Application configuration in Websphere container.

For the first time install of Groovy/Grails app on any server, make sure following properties are set for the web container on all application servers/nodes/clusters.

§         In "Application servers > server name > Process Definition > Java Virtual Machine" add to the "Generic JVM arguments"
       -Xverify:none

§         In "Application servers > server name > Process Definition > Java Virtual Machine > Custom Properties", add a custom property
   name: com.ibm.ws.classloader.getInputStream.enableIOException
   value: true
  description: Invoke IO Exception override processing

§         In "Application servers > server name > Web container > Custom Properties", add a custom property
     name: com.ibm.ws.webcontainer.invokeFiltersCompatibility
     value: true

     description: Invoke Filter compatibility patch


Websphere WAS 6.1/7 often logs the following exceptions into SystemOut.log files.


[Servlet Error]-[Filter [DeclaredResourcesPluginFilter]: filter is unavailable.]: java.lang.NullPointerException
    at com.ibm.ws.webcontainer.srt.SRTServletResponse.setContentType(SRTServletResponse.java:1141)


Solution:
1. Log into Admin console of Websphere Apllication Server.
2. Navigate to

WAS Admin -> Environments -> Virtual Hosts -> default_host -> MIME Types

Add/Modify following as the MIME TYPE 

MIME Type
Extensions
image/gif
GIF gif
image/jpeg
JPE JPEG JPG jpe jpeg jpg
image/tiff
TIFF TIF tiff tif
image/png
PNG png
image/psd
PSD psd
image/icon
ICON ICO icon ico


Note: The Extensions can be separated by whitespace


Do it in all Virtual Hosts.

See the below image for reference.