  We consider Casimir force acting on a three dimensional rectangular piston
due to a massive scalar field subject to periodic, Dirichlet and Neumann
boundary conditions. Exponential cut-off method is used to derive the Casimir
energy in the interior region and the exterior region separated by the piston.
It is shown that the divergent term of the Casimir force acting on the piston
due to the interior region cancels with that due to the exterior region, thus
render a finite well-defined Casimir force acting on the piston. Explicit
expressions for the total Casimir force acting on the piston is derived, which
show that the Casimir force is always attractive for all the different boundary
conditions considered. As a function of a -- the distance from the piston to
the opposite wall, it is found that the magnitude of the Casimir force behaves
like $1/a^4$ when $a\to 0^+$ and decays exponentially when $a\to \infty$.
Moreover, the magnitude of the Casimir force is always a decreasing function of
a. On the other hand, passing from massless to massive, we find that the effect
of the mass is insignificant when a is small, but the magnitude of the force is
decreased for large a in the massive case.
