how to run linux command from a different user from a jsp page which is run by tomcat
<%@ page import="java.io.*"%>
String cmd="sh /bin/date>/home/etika/Desktop/aaa/mm.txt";
tomcat6 is running my jsp page ,so all the linux commands too are executed by tomcat6.
but i want to run these linux commands from a different user etika on my system through this jsp page which is executed by tomcat.
(on running the linux commannd the ownership of the file gets change to tomcat6 but i don't want the ownership of the file to be changed on executing it ,so can i run this linux command from a different user etika so that my ownership doesnot changes )