IndianWebPortal.com

Something Different In Linux

Home » Tomcat » How to enabled the .jsp page support for the domain

How to enabled the .jsp page support for the domain

Posted by Rishikesh Vispute Categories: Tomcat

How to enabled the .jsp page support for the domain.

If the .jsp page is showing coding instead of real webpage then you need to check the server settings such as

For example
Domain name    = example.com
username       = test
Root directory = /home/test/public_html

1) root@server[~]#vi  /etc/httpd/conf/httpd.conf
Search domin name and remove the comment from the following line.

Include “/usr/local/apache/conf/userdata/std/1/username/example.com/*.conf”
save and exit

2)root@server[~]# cd /usr/local/apache/conf/userdata/std/1/
root@server[~]# mkdir test
root@server[~]# cd test
root@server[~]# mkdir example.com
root@server[~]# cd example.com
root@server[~]# vi cp_jkmount.conf
Enter the following code into the file

<IfModule mod_jk.c>
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /servlets/* ajp13
JkMount /*.do ajp13
</IfModule>

root@server[~]# /etc/init.d/httpd stop
root@server[~]# /etc/init.d/httpd start

Then check the entry into the tomcat configuration file.

3) root@server[~]# vi /usr/local/jakarta/tomcat/conf/server.xml

Open above file and add the following code at the end of the file.

<Host name=”example.com” appBase=”/home/test/public_html”>
<Alias>www.example.com</Alias>
<Context path=”” reloadable=”true” docBase=”/home/test/public_html” debug=”1″/>
<Context path=”/manager” debug=”0″ privileged=”true”
docBase=”/usr/local/jakarta/tomcat/server/webapps/manager”>
</Context>
</Host>

Save and exit

root@server[~]#/usr/local/jakarta/tomcat/bin/./shutdown.sh

root@server[~]#/usr/local/jakarta/tomcat/bin/./startup.sh

root@server[~]#/script/restartsrv tomcat

Note : Please replace the “test”  with original Username and the “example.com” with original domain name .


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...