1821981 Members
3151 Online
109638 Solutions
New Discussion юеВ

servlet Context

 
SANTOSH S. MHASKAR
Trusted Contributor

servlet Context

Hi can anybody tell me how to create new servlet context, I am having hp web server suit ver 1.3 with mod_jk enabled. I tried to create a context named crms.I added folloeing in server.xml---------- ----------------I created required directories in /opt/hpws/tomcat/webapps/crms.I placed one jsp in this dir i.e. /opt/hpws/tomcat/webapps/crms.I am able to access this jsp if I give in browserhttp://localhost/crms/login.jsp and all the example servlets of tomcat but I am not able to access the servlets which I have placed in directory /opt/hpws/tomcat/webapps/crms/WEB-INF/classes, however if I place the same servlets in example context i.e. in dir /opt/hpws/tomcat/webapps/examples/WEB-INF/classes I am able to access the servlets. What is wrong ? Can any body help me.-- Santosh
7 REPLIES 7
KapilRaj
Honored Contributor

Re: servlet Context

Change dicBase from "crms" to "/opt/hpws/tomcat/webapps/examples"

This should resolve your issues..

mod_jk is a good idea if you want to load balance the tomcat instances

Regds,

Kaps
Nothing is impossible
KapilRaj
Honored Contributor

Re: servlet Context

typo read as docBase

Apologies

Kaps
Nothing is impossible
SANTOSH S. MHASKAR
Trusted Contributor

Re: servlet Context

Hi Kapil ,I want it in ..../crms only. It is already working in .../examples.RegardsSantosh
KapilRaj
Honored Contributor

Re: servlet Context

Sorry i did mean

For the crms context

Change docBase from "crms" to "/opt/hpws/tomcat/webapps/crms" to run the jsp's

Also when you start tomcat make sure you have the correct vars set i.e. CATALINA_BASE etc ...

Regds,

Kaps
Nothing is impossible
KapilRaj
Honored Contributor

Re: servlet Context

Create a new one as follows,

workDir="/opt/hpws/tomcat/webapps/crms_santosh" debug="0" reloadable="false"
swallowOutput="true">
timestamp="true"/>

Keep ur jsps in crms_santosh

Kap
Nothing is impossible
SANTOSH S. MHASKAR
Trusted Contributor

Re: servlet Context

Actually the servlets r working if I place them in example context, i.e. in

/opt/hpws/tomcat/webapps/examples/WEB-INF/classes

directory. I just want to know why they r not working in crms context.

-Santosh
KapilRaj
Honored Contributor

Re: servlet Context

Do you need some configuration in WEB-INF/web.xml ??

Kaps
Nothing is impossible