You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ashutosh Sharma <sh...@gmail.com> on 2005/03/15 14:14:13 UTC

new to tomcat 5.0.28-how i can add context in the server.xml

Hi,
I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
i will create a context with a docBase and this way i will work with
my webApp.
Now the world has changed a lot-everyone just deploying a WAR file
under webapps.
But i still want to work in the old manner-i want my
C:\Dir\<sub-Dir>\java\src\a\b\c\....
to be compiled using ant which goes under C:\Dir\<sub-\java\classes\a\b\c\....
so that as and when i make any changes in any jsp file, struts-action,
formbean it gets direclty reflected rather than creating an out of box
WAR file again and again and putting it all under the webApps dir of
tomcat.
Can someone help me out?
Even ur help to deploy using manager will do?but i want manual editing
server.xml and then adding the context for my webApp.
Please help me.

-- 
With best regards:
Ashutosh Sharma

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: new to tomcat 5.0.28-how i can add context in the server.xml

Posted by David Causse <dc...@cognitis.fr>.
Ashutosh Sharma wrote:

>Hi David,
>Thanks for the reply.
>But if i see the manager.xml under this location it's contents are like this:
>
><Context path="/manager" docBase="${catalina.home}/server/webapps/manager"
>        debug="0" privileged="true">
>
>  <!-- Link to the user database we will get roles from -->
>  <ResourceLink name="users" global="UserDatabase"
>                type="org.apache.catalina.UserDatabase"/>
>
></Context>
>
>So for my webApp viz. reports if i put this kind of contents:
>
><Context path="/reports" docBase="C:\talkBack src\talkback\java\build\reports"
>        debug="0" privileged="true">
></Context>
>and then i restart the tomcat i see the directory listing.
>Shud i giv refrence of build dir or src directory. Actually my
>build.xml compiles everythign from my src to corresponding build Dir.
>  
>
You have to give a docBase that points to your webapps, in your 
example you must have this directory :

C:\talkBack src\talkback\java\build\reports\WEB-INF
and I hope a web.xml inside.

and for java classes (your build dest must be something like this)
C:\talkBack src\talkback\java\build\reports\WEB-INF\classes\

Your JSPs can be everywhere inside (depends on you web.xml):
C:\talkBack src\talkback\java\build\reports\

Don't forget to specify welcome-file in your web.xml.

You removed the RessourceLink to user databases so why do you continue to
use privileged="true" ? I don't know if it's correct...

You can add log info to your context that might help you later:
  <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_reports_log." suffix=".txt"
            timestamp="true"/>

Good luck,

David.

PS. I don't know if the '\' is OK for file separator inside this file: 
you'd better use '/'
like this: "c:/webapps/reports".


[...]

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: new to tomcat 5.0.28-how i can add context in the server.xml

Posted by Ashutosh Sharma <sh...@gmail.com>.
Hi David,
Thanks for the reply.
But if i see the manager.xml under this location it's contents are like this:

<Context path="/manager" docBase="${catalina.home}/server/webapps/manager"
        debug="0" privileged="true">

  <!-- Link to the user database we will get roles from -->
  <ResourceLink name="users" global="UserDatabase"
                type="org.apache.catalina.UserDatabase"/>

</Context>

So for my webApp viz. reports if i put this kind of contents:

<Context path="/reports" docBase="C:\talkBack src\talkback\java\build\reports"
        debug="0" privileged="true">
</Context>
and then i restart the tomcat i see the directory listing.
Shud i giv refrence of build dir or src directory. Actually my
build.xml compiles everythign from my src to corresponding build Dir.


On Tue, 15 Mar 2005 14:34:22 +0100, David Causse <dc...@cognitis.fr> wrote:
> Ashutosh Sharma wrote:
> 
> >Hi,
> >I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
> >i will create a context with a docBase and this way i will work with
> >my webApp.
> >Now the world has changed a lot-everyone just deploying a WAR file
> >under webapps.
> >But i still want to work in the old manner-i want my
> >C:\Dir\<sub-Dir>\java\src\a\b\c\....
> >to be compiled using ant which goes under C:\Dir\<sub-\java\classes\a\b\c\....
> >so that as and when i make any changes in any jsp file, struts-action,
> >formbean it gets direclty reflected rather than creating an out of box
> >WAR file again and again and putting it all under the webApps dir of
> >tomcat.
> >Can someone help me out?
> >Even ur help to deploy using manager will do?but i want manual editing
> >server.xml and then adding the context for my webApp.
> >Please help me.
> >
> >
> Edit the file $CATALINA_HOME/conf/Catalina/localhost/your_webapp.xml.
> 
> Regards.
> 
> David.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
With best regards:
Ashutosh Sharma

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: new to tomcat 5.0.28-how i can add context in the server.xml

Posted by David Causse <dc...@cognitis.fr>.
Ashutosh Sharma wrote:

>Hi,
>I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
>i will create a context with a docBase and this way i will work with
>my webApp.
>Now the world has changed a lot-everyone just deploying a WAR file
>under webapps.
>But i still want to work in the old manner-i want my
>C:\Dir\<sub-Dir>\java\src\a\b\c\....
>to be compiled using ant which goes under C:\Dir\<sub-\java\classes\a\b\c\....
>so that as and when i make any changes in any jsp file, struts-action,
>formbean it gets direclty reflected rather than creating an out of box
>WAR file again and again and putting it all under the webApps dir of
>tomcat.
>Can someone help me out?
>Even ur help to deploy using manager will do?but i want manual editing
>server.xml and then adding the context for my webApp.
>Please help me.
>  
>
Edit the file $CATALINA_HOME/conf/Catalina/localhost/your_webapp.xml.

Regards.

David.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org