‘.jsp’ is widely used format for webpages but sometimes your web hosting server does not support it and as a result a .jsp page is unable to produce a proper appearance of webpage and it shows some sort of coding, So following are some changes you need to perform so that your website an display .jsp pages as normal webpages.
[email protected][~]#vi /etc/httpd/conf/httpd.conf
Now search domain name and remove comment attribute from the following line.
Make sure your save before exit
[email protected][~]# cd /usr/local/apache/conf/userdata/std/1/
[email protected][~]# mkdir username
[email protected][~]# cd username
[email protected][~]# mkdir domainname
[email protected]r[~]# cd domainname
[email protected][~]# vi cp_jkmount.conf
Now find the file ‘cp_jkmount.conf.’ in which you need to insert the following code.
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /servlets/* ajp13
JkMount /*.do ajp13
Now you need to verify the entry in tomcat configuration file.
[email protected][~]# vi /usr/local/jakarta/tomcat/conf/server.xml
After checking the entry you need to insert the following code in the same file.
<Host name=”domainname” appBase=”/home/username/public_html”>
<Context path=”” reloadable=”true” docBase=”/home/username/public_html” debug=”1″/>
<Context path=”/manager” debug=”0″ privileged=”true”
Make sure you Save the file before you exit and now restart the tomcat.
And now restart the httpd service