tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Niven <John.Ni...@marcat.com>
Subject RE: Where must I put the code of my application?
Date Fri, 17 May 2002 12:45:23 GMT
> -----Original Message-----
> From: Luca Ventura [mailto:ventural@libero.it] 
> Sent: 17 May 2002 12:42
> To: tomcat-user; tomcat-dev
> Subject: Where must I put the code of my application?
> 
> Hello!
> 
> I have installed Tomcat 4  as servlet/jsp container and IIS 
> as Web Server. I developed a Web application and I want to 
> put it not in /webapps/examples folder of Tomcat but in 
> another folder, for example "/webapps/myproject". The problem 
> is  that when I try to connect to it IIS redirects corretly 
> my request to Tomcat 4 (I have set the Web Server in this 
> way) but Tomcat says "The requested resource 
> (/myproject/demo.jsp) is not available.". Why? I have read 
> that I have to modify the file "server.xml" file when I 
> develop a new application and add a new context...but in 
> which way? Can someone give me a working example please? I 
> tried to do it but unsuccessful :-(

Luca

You need to use something like this:

        <Context path="/atrmin"
                 docBase="c:\www\atrmin"
                 debug="99"
                 reloadable="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="atr_min_log."
                  suffix=".txt"
                  timestamp="true" />
        </Context>

"path" is the context part of the URL, the part that appears after the
domain/port: "http://sepa:8180/atrmin"
"docBase" is the physical location in the file-system/
"debug" can be from 0 to 99: 0 logs minimal info, 99 logs everything.
Typically you'll use >=0 for production servers and <=99 for development
servers.
"reloadable" indicates to Tomcat whether you want the web-app to reload if a
new .war is deployed - I think?  I rarely use this: I get Ant to stop
Tomcat, delete the .war and web-app, then redeploy the web-app.
The "<Logger... />" tag tells Tomcat how to handle logging within this
context:
"prefix" - what appears at the start of the logfile name.
"suffix" - what appears at the end of the logfile name.
"timestamp" - record date/time in the log.

> 
> I hope someone can help me.

Well, I hope you find this useful.  Take a look at the examples context
definition, and any others in server.xml - that's what got me started.

> 
> Thanks in advance.
> 
>         Luca
> 

Good luck!
John

 --
John Niven
Please reply through mailing list

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

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


Mime
View raw message