Wednesday, February 16, 2011

Open windows share folder on linux

Mount:

mount -t cifs -o username=jp, password=jp //192.168.183.1/doc /home/prakash/doc

Unmount:

umount -f /home/prakash/doc

WinSCP is the best tool that is used to transfer the data between windows and linux. But if we consider the transfer rate it will take much time to transfer, so, as you consider transfer rate windows share is the best one.

Tuesday, February 15, 2011

How to get cobertura coverage report for *VO.java files


In some scenario where we want to take coverage report for *VO.java files which has only setters and getters. We might have tried with mvn cobertura:cobertura command where we ever getting coverage for other java files not for VO.java files.

Workaround:

                Default behavior of exclusion file type is **/*VO.class.
 Solution:

<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>

<configuration>
    <instrumentation>
        <includes>
            <include>**/*VO.class</include>
        </includes>

        <excludes>
            <exclude>**/*Test.class</exclude>
        </excludes>
    </instrumentation>
</configuration>
</plugin>

How to disble "Expression Language" in JSP

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html" isELIgnored="false" %>

<table>
    <tr>
        <td>
            <c:out value="${message}"/>
        </td>
    </tr>
</table>
       

Wednesday, October 7, 2009

Scope in Web Apps

Request Scope
  • Only during the life-time of a single page request->rendering process
Session Scope
  • For as long as a “User” session is maintained (eg: for a user logged in)
Application Scope
  • For as long as the Web App is running

Sunday, July 19, 2009

Maven Instrumentation for EJB project

mvn compile -Doutput.directory=target/classes cobertura:instrument install -Dwas-ejb