Friday, June 18, 2010

Unresponsive Script warning of FireFox.

The large script run time larger than the default script run-time in the browser , it will throw Unresponsive Script warning.

Therefor we have to increase the default script run time on the browser.

1. Type "about:config" then press enter.
2. Filter the "dom.max_script_run_time" . 
3. By default the value of the dom.max_script_run_time is 10.
4. Now you can set this value to suitable and possible value. (say like 20). 
   (if the value is 0 whole firefox wait  for script to run , and it can not be use 
   while waiting .)
5. Then click OK and restart the firefox 

Warning -Keep remember


The value of dom.max_script_run_time is should not be too large. Because it will help to run bug full script in your browser.







Thursday, April 29, 2010

How to fix "The BASEDIR environment variable is not defined correctly" issue when starting tomcat 6

If you have defined the CATHALINA_HOME ,CATHALINA_BASE ,JAVA_HOME correctly , but following error will be occurred.

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program

Finally, i  found the following solution.

We need to change the permission type of all the sell script files in tomcat_home/bin directory to "executable" mode.
Using  the following command we can easily change it.
apache-tomcat-6.0.26/bin$ chmod +x *.sh


Sunday, March 21, 2010

Heart of the Rajanganaya Colony






Rajanganaya tank is one of the biggest tank in Sri-Lanka.  
It was built in 1950 as a irrigation project.  
  
Catchment      443 Sq. Km.  
Length of Dam  4093 m.  
Height of Dam  18.3 m.  
Capacity       100.65 millions cu. m.

Sunday, March 14, 2010

How to increse the JAVA heap memory size for maven project build in Linux

While you' r doing a maven project building , if the Java heap memory not enough it will throw java.lang.OutOfMemoryError.

Then simply use the following command to increase the heap size.

export MAVEN_OPTS="-Xmx1024m"

  • some maven versions will not allowed for the double quotes

Wednesday, January 13, 2010

How to remove null images of html type reports ? (Jasperreports)

if you are wish to generate the html type reports using jasper-reports you have to define the ImageServlet in
the web.xml
<servlet>  
   <servlet-name>ImageServlet</servlet-name>  
   <servlet-class>net.sf.jasperreport.j2ee.  
   servlets.ImageServlet</servlet-class>  
   <url-pattern>/servlets/images</url-pattern>  
</servlet>
Then you want to set the "JRHtmlExporterParameter.IMAGES_URI" parameter in your program .
JRHtmlExporter jrHtmlExporter = new JRHtmlExporter();  
 jrHtmlExporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"../servlets/image?image=");