You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Luc Foisy <Lu...@technical-magic.com> on 2003/01/10 18:08:31 UTC

How do I...

Get out put to go into the context specific logs rather than catalina.out??

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Logging (was Re: How do I...)

Posted by Will Hartung <wi...@msoft.com>.
> From: "Dan Lipofsky" <da...@nuserve.com>
> Sent: Friday, January 10, 2003 3:04 PM
> Subject: Logging (was Re: How do I...)


> Another question:
> The default loggers roll over the file at midnight and timestamp them
> with the date.  For the develeopment servers, which we restart many
> times a day, it would be nice to roll the files at every restart and stamp
> them with both date and time.  I kludged log4j to do this for the
> log4j files, but is there an easy way to do this with the Tomcat loggers?

Sure, Kludge the Tomcat loggers to do it as well. :-)

Regards,

Will Hartung
(willh@msoft.com)




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Logging (was Re: How do I...)

Posted by Dan Lipofsky <da...@nuserve.com>.
> To properly handle logging, you might want to check out log4j.org or
> commons-logging.  It's one of the first things I setup for a project, it
> makes debugging extremely smooth.

I agree, and I have converted all the backend stuff to use log4j.
But the 400 JSP files that already exist would take a while to convert
and we don't have the resources.  Not too much of a problem
right now because we only have one webapp.

Another question:
The default loggers roll over the file at midnight and timestamp them
with the date.  For the develeopment servers, which we restart many
times a day, it would be nice to roll the files at every restart and stamp
them with both date and time.  I kludged log4j to do this for the
log4j files, but is there an easy way to do this with the Tomcat loggers?
Thanks,
Dan



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How do I...

Posted by Jacob Hookom <ho...@uwec.edu>.
To properly handle logging, you might want to check out log4j.org or
commons-logging.  It's one of the first things I setup for a project, it
makes debugging extremely smooth.

| -----Original Message-----
| From: Paul Yunusov [mailto:pyunusov@rogers.com]
| Sent: Friday, January 10, 2003 12:35 PM
| To: Tomcat Users List
| Subject: Re: How do I...
| 
| On Friday 10 January 2003 01:18 pm, Dan Lipofsky wrote:
| > >
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
| > >
| > > tells about using the Context element in server.xml to configure a
| > > webapp. Scroll down and note the Logger entry under Nested
Components.
| I
| > > hope this helps.
| >
| > I have the same question as Luc.
| > I set up a Context with a Logger inside.
| > Messages such as JSP compile errors go to the
| > Logger I set up, but messages that are printed
| > to System.out still show up in catalina.out.
| > I read the docs above but I don't see how to change this.
| > Thanks,
| > Dan
| 
| You can't do that individually for contexts, AFAIK. Use
| ServletContext.log()
| instead of System.out.println() to manage log output with
Context-specific
| Loggers.
| 
| You can change the destination of all System.out's for your entire
| Catalina
| engine if you edit catalina.sh.
| 
| System.out is whatever standard output Catalina is pointed at, and,
| respectively, System.err is whatever standard error output Catalina is
| pointed at. Standard output and standard error output are OS concepts
and
| they can be set to a file, console, etc. when running the actual
server
| startup command.
| 
| That command is a part of the catalina.sh script (and its Windows
| equivalent).
| Search that script for /logs/catalina.out and you will see the output
| streams' redirection in action.
| 
| The above is based on the assumption that you use Tomcat 4.1.x.
| 
| Paul
| 
| --
| 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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How do I...

Posted by Paul Yunusov <py...@rogers.com>.
On Friday 10 January 2003 01:18 pm, Dan Lipofsky wrote:
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
> >
> > tells about using the Context element in server.xml to configure a
> > webapp. Scroll down and note the Logger entry under Nested Components. I
> > hope this helps.
>
> I have the same question as Luc.
> I set up a Context with a Logger inside.
> Messages such as JSP compile errors go to the
> Logger I set up, but messages that are printed
> to System.out still show up in catalina.out.
> I read the docs above but I don't see how to change this.
> Thanks,
> Dan

You can't do that individually for contexts, AFAIK. Use ServletContext.log() 
instead of System.out.println() to manage log output with Context-specific 
Loggers.

You can change the destination of all System.out's for your entire Catalina 
engine if you edit catalina.sh.

System.out is whatever standard output Catalina is pointed at, and, 
respectively, System.err is whatever standard error output Catalina is 
pointed at. Standard output and standard error output are OS concepts and 
they can be set to a file, console, etc. when running the actual server 
startup command.

That command is a part of the catalina.sh script (and its Windows equivalent). 
Search that script for /logs/catalina.out and you will see the output 
streams' redirection in action.

The above is based on the assumption that you use Tomcat 4.1.x.

Paul

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Prevent directory listing - read the fine manual

Posted by Vy Ho <st...@drexel.edu>.
Yes, you will ask me to read the fine manual.  But I seach, and all that
and could not find (easily) where the needed manual is.  But I found some
help one the web.  That was not enough.  So I download the 2.3 spec.
Well, the size of it went over my head.  Do some search did not help.

Here is my question if you bother:

To prevent directory listing under tomcat 4.x, one way is to set
listing=false under default servlet, under conf/web.xml

However, that's global to all apps.  I want it to only do that for 1 of my
apps.  So, you can say modify it to myapp/Web-inf/web.xml.

I tried, using copy and paste from the conf/web.xml to
myapp/Web-inf/web.xml, but it did not work, generate a bunch of error.

So, is it possible using this scheme?  Is modifying the application's
web.xml the right thing to do?  How to do it?  Or, where is the fine
manual?

Thank you very much for any help.

Vh




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How do I...

Posted by Dan Lipofsky <da...@nuserve.com>.
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
>
> tells about using the Context element in server.xml to configure a webapp.
> Scroll down and note the Logger entry under Nested Components. I hope this
> helps.
>

I have the same question as Luc.
I set up a Context with a Logger inside.
Messages such as JSP compile errors go to the
Logger I set up, but messages that are printed
to System.out still show up in catalina.out.
I read the docs above but I don't see how to change this.
Thanks,
Dan



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How do I...

Posted by Paul Yunusov <py...@rogers.com>.
On Friday 10 January 2003 12:08 pm, Luc Foisy wrote:
> Get out put to go into the context specific logs rather than catalina.out??

Hello,

This

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

tells about using the Context element in server.xml to configure a webapp. 
Scroll down and note the Logger entry under Nested Components. I hope this 
helps.

Incidentally, the link above is prominently accessible from the Server 
Configuration Reference, which, in turn, is available by clicking on Tomcat 
4.1 under DOCUMENTATION on the Tomcat main page.

I think the Tomcat documentation rocks.

Paul

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: what source code control system?

Posted by srinath narasimhan <sr...@nuviewinc.com>.

Use CVS -- www.cvshome.org. It has a web interface as well.



-----Original Message-----
From: David Boyer [mailto:david@bvu.edu]
Sent: Friday, January 10, 2003 12:30
To: Tomcat Users List
Subject: OT: what source code control system?


We have a staff of 8-10 student employees and a couple full time staffers
that write desktop and web applications or their supporting components.
We're mostly using Visual Basic and MS Access for desktop apps and ASP (on
IIS 5.0) for web apps, but I'm nudging everyone toward Tomcat/Java.

I'd like to implement a source code control system that includes a
browser-based interface (preferably JSP/Servlet). Cost is an issue, so I'm
looking at the open source or other free options. The server components
would be running on a Windows 2000 Server platform, but I'm interested in
having the flexibility to integrate with any web and database server so as
not to be chained to a given platform (hence the preference for using JSP).

Any recommendations? Thanks!


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: what source code control system?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> The only was I would consider SourceSafe over CVS
> is if you have money to burn, are windows only, ...

In my case, I have licenses for SourceSafe from before OneTree was acquired
by Microsoft.  It really is a nice revision control system.  In any event, I
did mention cost as one factor for why he likely couldn't use it.  Same
would be even more true of Clearcase.

CVS isn't used because it is great; it is used because heretofore it has
been the best of a bad selection of open source revision control packages.

I'm very hopeful that Subversion will not only eliminate CVS, but also offer
many of the benefits that SourceSafe and other commercial systems offer for
exorbitant fees.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: what source code control system?

Posted by Richard Dunn <ri...@arkona.com>.
I have used both SourceSafe, CVS (as well as PVCS and Continuus) and I would 
easily pick CVS over SourceSafe and PVCS. Continuus is fine if you have big 
$$$ and a very capable Continuus administrator. The only was I would consider 
SourceSafe over CVS is if you have money to burn, are windows only, and have 
an IDE that you just feel you *must* have that only works with SourceSafe. If 
so, SourceSafe is great.

On Friday 10 January 2003 11:17, Noel J. Bergman wrote:
> Despite the fact that it is widely used, the list of problems with CVS is
> long and distinguished.  Since you can't use SourceSafe, I would recommend
> that you look at Subversion (http://subversion.tigris.org).  Subversion is
> self-hosting, works with database and apache, has an API, and there is a
> GUI interface (http://rapidsvn.tigris.org).
>
> Subversion uses WebDAV, and there is even a Wiki using Subversion.
>
> If you were in a corporate environment, perhaps Subversion might not be
> ready for you (but then again, you could afford SourceSafe), but in your
> environment you might like the possibilities in Subversion.  There is
> always CVS if you need it, and don't mind the problems (like the inability
> to rename something).
>
> 	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [ OT ] what source code control system?

Posted by Jon Eaves <jo...@eaves.org>.
Noel J. Bergman wrote:
> Despite the fact that it is widely used, the list of problems with CVS is
> long and distinguished.  

I'll disagree here. CVS is missing some features that other people
find very desirable in a source control system. This doesn't mean it
has a long list of problems.

The only thing that I'd consider a "problem" with CVS is the lack
of an atomic commit. Having said that, I've been using it for over
10 years, nearly always in client-server mode or remotely tunnelling
over SSH and I have _never_ had a problem.

> Since you can't use SourceSafe, I would recommend
> that you look at Subversion (http://subversion.tigris.org).  Subversion is
> self-hosting, works with database and apache, has an API, and there is a GUI
> interface (http://rapidsvn.tigris.org).
> 
> Subversion uses WebDAV, and there is even a Wiki using Subversion.
> 
> If you were in a corporate environment, perhaps Subversion might not be
> ready for you (but then again, you could afford SourceSafe), but in your
> environment you might like the possibilities in Subversion.  There is always
> CVS if you need it, and don't mind the problems (like the inability to
> rename something).

Renaming things is trivial, just get the administrator to rename it
for you.  mv $CVSROOT/src/foo.java,v $CVSROOT/src/bar.java,v. Or if
you don't care about losing your log history, then just delete and
add it.

Sure, it's not the most user friendly approach, but it can be done.

I'm a big, big fan of CVS, it's very stable and it's been used in
technical teams and I've also taught graphic designers to use it.
Throughout that time, I've never had an issue with files being
corrupted, magically deleted or anything else.

Cheers,
	-- jon

-- 
Jon Eaves <jo...@eaves.org>
http://www.eaves.org/jon/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: what source code control system?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Despite the fact that it is widely used, the list of problems with CVS is
long and distinguished.  Since you can't use SourceSafe, I would recommend
that you look at Subversion (http://subversion.tigris.org).  Subversion is
self-hosting, works with database and apache, has an API, and there is a GUI
interface (http://rapidsvn.tigris.org).

Subversion uses WebDAV, and there is even a Wiki using Subversion.

If you were in a corporate environment, perhaps Subversion might not be
ready for you (but then again, you could afford SourceSafe), but in your
environment you might like the possibilities in Subversion.  There is always
CVS if you need it, and don't mind the problems (like the inability to
rename something).

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


OT: what source code control system?

Posted by David Boyer <da...@bvu.edu>.
We have a staff of 8-10 student employees and a couple full time staffers
that write desktop and web applications or their supporting components.
We're mostly using Visual Basic and MS Access for desktop apps and ASP (on
IIS 5.0) for web apps, but I'm nudging everyone toward Tomcat/Java.

I'd like to implement a source code control system that includes a
browser-based interface (preferably JSP/Servlet). Cost is an issue, so I'm
looking at the open source or other free options. The server components
would be running on a Windows 2000 Server platform, but I'm interested in
having the flexibility to integrate with any web and database server so as
not to be chained to a given platform (hence the preference for using JSP).

Any recommendations? Thanks!


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How do I...

Posted by Jacob Hookom <ho...@uwec.edu>.
Refer to your server.xml and look at the examples setup towards the
middle where it declares the logger and file pattern.

| -----Original Message-----
| From: Luc Foisy [mailto:Luc.Foisy@technical-magic.com]
| Sent: Friday, January 10, 2003 11:09 AM
| To: Tomcat User List (E-mail)
| Subject: How do I...
| 
| 
| Get out put to go into the context specific logs rather than
| catalina.out??
| 
| --
| 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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: page cannot be displayed error

Posted by Anup Ray <an...@safeguardproperties.com>.
I did not get any response. I am posting it again. Earlier during
apache-mod_jk-tomcat set John Turner helped me a lot to make it work.
Actually after making httpd.conf as per his suggestion tomcat and the spell
check was started working. But now I am stuck with this error "page cannot
be displayed". The problem lies within the additional line (given below) of
httpd.conf, because after removing these modifications the error
disappeared. Could you please help me suggesting some tips/hints.
Thanks,
Anup

_____________

Our platform is sun sparc solaris 8. We have our web server as apache 1.3.22
(SSL).
This web server hostname is u10-2.safe-prop.com and CNAME for the same host
for outside world is scds.safeguardproperties.com. This webserver has been
working for last one year. Recently we added mod_jk connector and
tomcat(version 4.0.4) to
make a spell check application (jspellhtml) working and  available at this
web server. After this changes we started getting "page cannot be displayed"
error frequently both from inside and outside users.
I then stopped the tomcat process but still the same error used to get.
Finally I put back the original httpd.conf file and restarted the server,
the problem solved. This (problematic) httpd.conf file consists of
additional lines for tomcat/mod_jk configurations. I am giving below the
additinal tomcat lines in httpd.conf files. Could any body help me to find
where I am wrong and to fix this problem?
________________
##########################################
###ajp config lines are addred below 100102
##########################################
#Load mod_jk
#
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c

# Configure mod_jk
#
JkWorkersFile /usr/local/tomcat/conf/workers.properties
#JkLogFile /usr/local/apache/logs/mod_jk.log
JkLogFile /var/apache/logs/mod_jk.log
JkLogLevel info

# First Virtual Host.
#
<VirtualHost 10.10.1.101:443>
DocumentRoot /var/apache/htdocs
ServerName scds.safeguardproperties.com
#ServerName cdidev.safeguardproperties.com
SSLEngine On
SSLCertificateFile /usr/local/apache/1.3.22-1/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/1.3.22-1/conf/ssl.key/server.key
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /jspellhtml/* ajp13
</VirtualHost>

# Second Virtual Host. Also accessible via HTTPS
#
<VirtualHost 10.10.1.101:80>
DocumentRoot /var/apache/htdocs
ServerName u10-2.safe-prop.com
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>

#<VirtualHost 10.0.0.2:443>
#DocumentRoot /web/host2
#ServerName host2.apache.org
#SSLEngine On
#JkMount /*.jsp ajp13
#JkMount /servlet/* ajp13
#</VirtualHost>
#
_________________________________

Thank you,
Anup

Anup Ray
Unix Systems Administrator
Safeguard Properties Inc.
650 Safeguard Plaza
Brooklyn Heights, Ohio 44131
800-852-8306 x1106
anup.ray@safeguardproperties.com



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


page cannot be displayed error

Posted by Anup Ray <an...@safeguardproperties.com>.
Our platform is sun sparc solaris 8. We have our web server as apache 1.3.22
(SSL).
This web server hostname is u10-2.safe-prop.com and CNAME for the same host
for outside world is scds.safeguardproperties.com. This webserver has been
working for last one year. Recently we added mod_jk connector and tomcat to
make a spell check application (jspellhtml) working and  available at this
web server. After this changes we started getting "page cannot be displayed"
error frequently both from inside and outside users.
I then stopped the tomcat process but still the same error used to get.
Finally I put back the original httpd.conf file and restarted the server,
the problem solved. This (problematic) httpd.conf file consists of
additional lines for tomcat/mod_jk configurations. I am giving below the
additinal tomcat lines in httpd.conf files. Could any body help me to find
where I am wrong and to fix this problem?
________________
##########################################
###ajp config lines are addred below 100102
##########################################
#Load mod_jk
#
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c

# Configure mod_jk
#
JkWorkersFile /usr/local/tomcat/conf/workers.properties
#JkLogFile /usr/local/apache/logs/mod_jk.log
JkLogFile /var/apache/logs/mod_jk.log
JkLogLevel info

# First Virtual Host.
#
<VirtualHost 10.10.1.101:443>
DocumentRoot /var/apache/htdocs
ServerName scds.safeguardproperties.com
#ServerName cdidev.safeguardproperties.com
SSLEngine On
SSLCertificateFile /usr/local/apache/1.3.22-1/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/1.3.22-1/conf/ssl.key/server.key
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /jspellhtml/* ajp13
</VirtualHost>

# Second Virtual Host. Also accessible via HTTPS
#
<VirtualHost 10.10.1.101:80>
DocumentRoot /var/apache/htdocs
ServerName u10-2.safe-prop.com
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>

#<VirtualHost 10.0.0.2:443>
#DocumentRoot /web/host2
#ServerName host2.apache.org
#SSLEngine On
#JkMount /*.jsp ajp13
#JkMount /servlet/* ajp13
#</VirtualHost>
#
_________________________________

Thank you,
Anup

Anup Ray
Unix Systems Administrator
Safeguard Properties Inc.
650 Safeguard Plaza
Brooklyn Heights, Ohio 44131
800-852-8306 x1106
anup.ray@safeguardproperties.com



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>