tomcat7 : need to introduce a setenv.sh file: unable to locate the correct directory to place it.

Posted on

Hi Team,
I am using rhel7.4 & tomcat7 and I need to configure it for UTF-8 encoding.

1:I managed to locate the tomcat server.xml where i need to introduce the line --> URIEncoding="UTF-8" under the Connector scope.

2:However i being told that i also need to introduce a setenv.sh file (with UTF-8 settings) as well inside the tomcat bin directory.

My setenv.sh file contents-->

echo "SETTING CUSTOM JAVA CATALINA INSTANCE ENVS; setting UTF-8 configurations;"
JRE_HOME="/user/abc/xyz/jrehome"
CATALINA_OPTS="-Dfile.encoding=UTF-8 -Xms2048M -Xmx2048M"

exit

I did a yum install tomcat but i m unable to locate the correct place where to paste my setenv.sh file.

ps:I did not install tomcat from a gz file. On my windows i did like that and everything is cool there, UTF-8 encoding is working. I am just unable to replicate the same configuration on my rh tomcat instance.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.