application can talk to the database. How
do you go about setting the permissions? Give an example of setting the
permission in Tomcat and stand alone
java programme. (Security)
Answer :In Tomcat:
Add security permission to catalina.policy file located under
grant codeBase "file:${catalina.home}/webapps/MyContext/-"
{
permission java.security.AllPermission;
};
In stand alone java application:
Create a .policy file that points to the code base where the application
resides.
grant codebase "file:c:/source/java/-"
{
permission java.security.AllPermission;
};
java -Djava.security.policy=
No comments:
Post a Comment