RE: Apache Tomcat takes 3 to 4 browser request clicks to wake up after being idle for 1-2 hours

2008-02-11 Thread Caldarale, Charles R
 From: Brian Le [mailto:[EMAIL PROTECTED] 
 Subject: Re: Apache Tomcat takes 3 to 4 browser request 
 clicks to wake up after being idle for 1-2 hours
 
 Forgot to mention my box has 4gig of RAM.

Is power management enabled?  Are parts of your box shutting down during
idle periods?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Obtain a SocketChannel instead of OutputStream ?

2008-02-11 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John,

John Caron wrote:
| I may need to make many such transfers to satisfy the request, so
| sendfile doesnt seem like it will work.

In this case, are you sure that HTTP is really the protocol for you?
It's not too difficult to write a NIO-based request/response server that
does something specific that is, you don't have to re-implement
everything Tomcat provides just to build your own server.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkewr+EACgkQ9CaO5/Lv0PD5zACfT5wQDvo7LOKujLdfeorG5LPc
u2kAn1qpIHT2RdTv7bPsSBwf4gzBwGI7
=lCv2
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to auto redirect to https from http

2008-02-11 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave,

Dave wrote:
| The url is not changed when I point to
| http://www.mydomain.com/login.html in browser. The .html is mapped to
|  servlet. I expected it to change to https://

I think David identified part of the problem: your XML is not set up
properly. Check out the DTD (or Schema) to see where the
transport-guarantee goes, and try again.

| Even start with https, if url-rewriting is used for session
| tracking(sessionid in url), it is not secure anymore, right?

Correct. To really have a secure system, you need to use HTTPS all the
time and always use cookie-based session tracking.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkewsvgACgkQ9CaO5/Lv0PA/yQCfWHMKGjDBPg0k2O5XJtlf9hFr
sNMAn044vYvhYx52FD3FWRjKFwX52ymx
=42yE
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing the webapp classpath

2008-02-11 Thread Johnny Kewl


---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
Making the Java dream come true.
---
- Original Message - 
From: Dalia,Keith A - TO-DITT1 [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, February 11, 2008 11:07 PM
Subject: Changing the webapp classpath


I was wondering if there was a way to alter the default webapps
classpath.  We use several different .jars in our deployments and would
like to create a directory structure under the web_inf/lib directory.
By default the webapps classloader only looks in web_inf/classes and
web_inf/lib.  Any help is appreciated.

==
I think you outa luck... dont think can be done
But you can modify the Jar names...

MY_x.jar
YOUR_x.jar

Almost looks like folders ;)

==

Keith


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Changing the webapp classpath

2008-02-11 Thread Caldarale, Charles R
 From: Dalia,Keith A - TO-DITT1 [EMAIL PROTECTED]
 Subject: Changing the webapp classpath
 
 I was wondering if there was a way to alter the default
 webapps classpath.

There's an undocumented capability within Tomcat that provides what
you're asking for.  (Since it's undocumented, I would assume it's also
unsupported, but it may suffice for your needs.)

Inside each Context element that needs it, specify a Loader element
with the following attributes:
  className=org.apache.catalina.loader.VirtualWebappLoader
  virtualClasspath=[extraLibraryPaths]
where [extraLibraryPaths] are a series of path tokens separated by
semicolons (regarless of platform).  Each path token is either absolute
or relative to Tomcat's working directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Changing the webapp classpath

2008-02-11 Thread Dalia,Keith A - TO-DITT1
I was wondering if there was a way to alter the default webapps
classpath.  We use several different .jars in our deployments and would
like to create a directory structure under the web_inf/lib directory.
By default the webapps classloader only looks in web_inf/classes and
web_inf/lib.  Any help is appreciated.

Keith


Re: How to avoid session fixation?

2008-02-11 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Delbecq wrote:
| I think this is worth submitting a security issue request on tracker,
| to ask that, at least, the container links the requester IP to the
| session.

I'm pretty sure that nobody will want to do this -- at least not without
the ability to turn the feature off. You'll break a lot of users if you
require session id - ip address matching.

| Changing session ID upon login in container would be a good thing
| imho, it would ensure ID become unknown to attacker after login,
| wouldn't destroy user session (keep session, only change it's
| identifier) and would work whatever authentication mechanism is used.
|
I completely agree. Christopher, I think your valve might be more
attractive if it was able to change the id of the session and leave it
at that. I'm not familiar enough with the Tomcat API to know if this is
possible and/or a good idea.

| Draw back is that webapp that rely on session id for some session
| tracking mechanism would break.

True, although most webapps probably use whatever session id is
currently in use. If you did a lot of AJAX where the session id
available to the page becomes out-of-date after a login, you will have
to make special considerations for that. I think you'll find that this
is not much of a problem.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkewsO8ACgkQ9CaO5/Lv0PBWXQCggsMZA1AGkdzSDvBmYeHC2JED
iU4An15g6IGrG/yU4mgWokKnVkXdnW0O
=eLbx
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [Eclipse-Tomcat] Problem by deploying from Eclipse to Tomcat

2008-02-11 Thread Thomas Chang
1.
  What Eclipse configuration will you know? I can show you.
   
  2.
   Launching Tomcat with the listener class loaded by the system classloader 
would be
a simple way to cause this.
   
  How to avoid this?
   
   
   
  
   
  There is not enough detail about your Eclipse configuration to make
 much of a guess.  Basically the exception says that the
 ServletRequestListener class is not visible to one of the listener classes 
loaded in your
 web.xml.  Either because it's missing (which seems not to be the
 case), or because your listener class is being loaded in a classloader that
 isn't allowed to see classes in common\lib's classloader.  Launching
 Tomcat with the listener class loaded by the system classloader would be
 a simple way to cause this.

Cheers,
Larry

 -Original Message-
 From: Thomas Chang [mailto:[EMAIL PROTECTED]
 Sent: Saturday, February 09, 2008 3:31 PM
 To: users@tomcat.apache.org
 Subject: Re: [Eclipse-Tomcat] Problem by deploying from Eclipse to
 Tomcat

 The servlet-api-2.4.jar is already in /common/lib.

   I doubt that's the cause. :-)


   *

   The missing class:

 javax/servlet/ServletRequestListener

 occurs in servlet-api.jar which appears to be missing in your
 configuration.  The best place for it is in
 Tomcat's  common/lib.

 -Ken

 Thomas Chang wrote:
  Hi all,
 
I am not sure if I should put my question here. But I can't
 google
  out the right place. Hope someone here can help. :-)
 
I built a web-app and can deploy it successfully from Tomcat
  Manager. But as I deploy it from the Eclipse, I get the following
 exception.
 
P.S.: I use Eclipse 3.4 and the WTP package.
 
Regards
 
Thomas
 

 
SCHWERWIEGEND: Error configuring application listener of class
  org.springframework.web.context.request.RequestContextListener
java.lang.NoClassDefFoundError:
  javax/servlet/ServletRequestListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at


 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at


 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCl
 assLoader.java:1812)
at


 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoade
 r.java:866)
at


 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade
 r.java:1319)
at


 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade
 r.java:1198)
at


 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.
 java:3677)
at


 org.apache.catalina.core.StandardContext.start(StandardContext.java:418
 7)
at

  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at
  org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at

  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at

  org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at


 org.apache.catalina.core.StandardService.start(StandardService.java:450
 )
at

  org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at


 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
 va:39)
at


 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
 rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
09.02.2008 20:57:23 org.apache.catalina.core.StandardContext
  listenerStart




   
-
Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. 

Re: managing user uploads best practices

2008-02-11 Thread Alan Chaney

Totally agree with everything brien says below.

I also run a web site with a large number of media objects. I've been 
involved in filing system and media projects for many years both in 
research and production capacity.


The slight increase in complexity of the solution to maintain the media 
objects outside the database is completely offset by the huge 
improvement in performance of the database.


Also it is particularly worth stressing the backup advantages. If you 
have 10,000 users (not a large number these days) each with 5 images 
and/or one podcast you are going to have very, very large monolithic 
database backups which are either going to be in a binary form and thus 
very opaque or simply huge as sql dumps unless you separate the binary data.


Another advantage is that it allows you to have a very scalable media 
server. The media server does not have to participate in the session. 
You can have a number of independent media servers who simply download 
files identified by an ID. The media server(s) don't have to be on the 
same box, platform or even in the same building. The issues of 
clustering simply go away (a media download is a single operation and 
thus does not benefit from clustering.) If you are running a large 
number of concurrent downloads, you only need a trivial load balancing

front end server to direct requests at the media servers. If you require
authentication to restrict access to the media then you may have a bit 
more work to do but it is not too difficult.


So if you have a site with a lot of media, you can tune the application 
component to be small and responsive and the media delivery components 
to be simple and fast and optimizied for continuous download.






brien colwell wrote:

On the topic of DB versus filesystem for media, I prefer storing media
in a filesystem and meta data in a DB. The advantages of storing large
binary files outside of the DB are

* Reduce contention in the DB -- it's doing so much
* You have more control with a filesystem where your data goes -- e.g.
you can have a disk for one type of data, and another disk for a
different type
* Filesystems are optimized to stream out data ... which I think makes sense

That first point is really key. If you're serving data to a UI from
the same database you're storing large files into, the whole
experience is going to suffer. The best article I've read on this
topic is

http://mysqldatabaseadministration.blogspot.com/2008/01/i-will-not-blob.html

The main scale issue I'm careful of is how many files I put per
directory. For large amounts of files, I sometimes link directories
into trees. I might be a little paranoid about this, but it seems to
scale well.

In terms of backup and security, I think a FS is easier to manage --
e.g. chmod and rsync on a cron job -- though you'll have to write more
code and scripts. You also have to be careful of things like shell
injection if you're running shell commands from your webserver.


Anyway, hope that gives some help. I was also confused with this when
I started writing DB backed apps.



On Feb 9, 2008 4:58 PM,  [EMAIL PROTECTED] wrote:

Thanks for the suggestions!

I like using the database for storage for it's easy maintenance and security, 
but marshalling a lot of binary data (like a large image library) adds a bit of 
overhead to the application.

I'll look into pursuing a storage directory external to the webapp.



 -- Original message --
From: Johnny Kewl [EMAIL PROTECTED]

---
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
Making the Java dream come true.
---
- Original Message -
From: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Friday, February 08, 2008 11:13 PM
Subject: managing user uploads best practices

Yes... outside.
Its been a long long time now, vaguely remember struggling with Apache
uploader then eventually getting all to work...
Anyway... what I did is store the files in an Apache httpD folder, so I
could spy on the uploads, and they available for viewing again.
And whats cool is because Apache is also the load balancer in my case... can
have lots of TC's doing their thing.
I was making a kind of wiki thing for an estate agency... thats how I did
it way back when...



What's the current wisdom on managing user uploaded files to a web app
that's
deployed via a WAR?

In other words, when the WAR is updated, the directory containing uploaded
files
would be wiped out.

Do people save uploaded files outside of the web app root directory?
Security
issues with this?
Do people not use auto-expanding WAR files and manage the deployment by
hand?
Do you not include the directory for uploaded files in the WAR (but create
it at
runtime) and then trust that the 

How to configure Tomcat,Struts in eclipse ?

2008-02-11 Thread Muruli Krishnaiah
Hello,

I am new to struts. can any one give me some tips or good links to
configuring tomcat and struts in eclipse 3.0
. I have been trying to find some websits that can provide me the
steps without much luck.

Thanks in advance

Murali


Re: Incorrect cookie value in tomcat5.5.26

2008-02-11 Thread Filip Hanik - Dev Lists

not broken, corrected. the java doc says


 setValue

public void *setValue*(String 
http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html newValue)

   Assigns a new value to a cookie after the cookie is created. If you
   use a binary value, you may want to use BASE64 encoding.

   With Version 0 cookies, values should not contain white space,
   brackets, parentheses, equals signs, commas, double quotes, slashes,
   question marks, at signs, colons, and semicolons. Empty values may
   not behave the same way on all browsers.

   *Parameters:*
   |newValue| - a |String| specifying the new value


to fix this, all you need to do is

cookie.setVersion(1);

Filip

Konstantin Kolinko wrote:

I guess the cause is the same as for tomcat 6.0.16.
See messages entitles Cookies are broken in 6.0.16?.

http://www.nabble.com/Cookies-are-broken-in-6.0.16--to15369118.html

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Changing the webapp classpath

2008-02-11 Thread Dalia,Keith A - TO-DITT1
So, I would place the Loader in the web.xml that ships with my webapp?
In the past I've only used the Context in the server.xml when defining
virtual sites.

Thanks.

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 2:58 PM
To: Tomcat Users List
Subject: RE: Changing the webapp classpath

 From: Dalia,Keith A - TO-DITT1 [EMAIL PROTECTED]
 Subject: Changing the webapp classpath
 
 I was wondering if there was a way to alter the default
 webapps classpath.

There's an undocumented capability within Tomcat that provides what
you're asking for.  (Since it's undocumented, I would assume it's also
unsupported, but it may suffice for your needs.)

Inside each Context element that needs it, specify a Loader element
with the following attributes:
  className=org.apache.catalina.loader.VirtualWebappLoader
  virtualClasspath=[extraLibraryPaths]
where [extraLibraryPaths] are a series of path tokens separated by
semicolons (regarless of platform).  Each path token is either absolute
or relative to Tomcat's working directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Incorrect cookie value in tomcat5.5.26

2008-02-11 Thread Sushil Vegad
Thanks Konstantin for you prompt response.

Is the solution identified? I don't find it anywhere on google.


-Original Message-
From: Konstantin Kolinko [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 11:25 AM
To: Tomcat Users List
Subject: Re: Incorrect cookie value in tomcat5.5.26

I guess the cause is the same as for tomcat 6.0.16.
See messages entitles Cookies are broken in 6.0.16?.

http://www.nabble.com/Cookies-are-broken-in-6.0.16--to15369118.html

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



rotating catalina.out using log4j

2008-02-11 Thread Amir Fadaghi
Hi,

I am trying to implement the catalina.out log rotation in the development 
environment (for now and will implement to other environments once I figure 
this out) using log4j.  I am running apache-tomcat version 5.5.25 and 
downloaded the apache-log4j-1.2.15 and commons-logging-1.1.1.  I copied the 
log4j.jar and commons-logging.jar into the $CATALINA_HOME/lib and created the 
log4j.properties in the common/classes.  However, when I stop and start the 
apache-tomcat the cataline.out is not rotating.

 Here is the my directory listings in the commons/lib direcotry and 
commons/classes directory:

/usr/local/apache-tomcat-5.5.25/common:
ls lib
commons-el.jar jasper-runtime.jar naming-factory.jar
commons-logging-1.1.1.jar  jsp-api.jarnaming-resources.jar
jasper-compiler-jdt.jarlog4j-1.2.15.jar   servlet-api.jar
jasper-compiler.jarnaming-factory-dbcp.jar

should I change the highlighted filenames to commons-logging.jar and, log4j.jar?

/usr/local/apache-tomcat-5.5.25/common:
ls classes
log4j.properties

tail classes/log4j.properties

#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO

is the above line uncommented correct for rotating catalina.out rotation?

My environment is:
Sun Solaris 10

I thank you for any help you provide.



-
Email messages cannot be guaranteed to be secure or error-free as
transmitted information can be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
Centers for Medicare  Medicaid Services therefore does not accept
liability for any error or omissions in the contents of this
message, which arise as a result of email transmission.

CONFIDENTIALITY NOTICE: This communication, including any
attachments, may contain confidential information and is intended
only for the individual or entity to which it is addressed. Any
review, dissemination, or copying of this communication by anyone
other than the intended recipient is strictly prohibited. If you
are not the intended recipient, please contact the sender by reply
email and delete and destroy all copies of the original message.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Incorrect cookie value in tomcat5.5.26

2008-02-11 Thread Sushil Vegad
Hello,

We upgraded to tomcat 5.5.26 from 5.0.28 and now its returning incorrect
cookie value.

 

We are setting user email/id in a cookie to remember the user, as follows

Cookie cookie = new Cookie(Constants.COOKIE_NAME, [EMAIL PROTECTED]);

 

On doing cookie.getValue(), tomcat 5.5.26 just returns vsushil instead of
the whole string. Since some of our code was written on JDK 1.4, we
installed the JDK 4 compatibility package for tomcat5.5.26 

 

Please let me know the possible options to fix this.

 

Thanks,

Sushil Vegad

Technical Lead, Scheduling Project

Serebrum Corporation - translating strategy into results

Work: 609.777.3563

Cell: 732.216.4908  

Email: [EMAIL PROTECTED]

Conference Dial-in: 1-218-486-1300, Bridge: 427526

 



Re: Tomcat 6/IIS 6 Connection Frustration

2008-02-11 Thread DJChaos

 I think I solved my problem.  For every context launched in Tomcat, I need
to create a blank directory with the same name as the context.  This has
somehow stopped the 404.2 errors.  I had put a directory in there for
examples for a different exercise, and for some reason it works.

 I don't know why or how, but it does.

That said, I feel somewhat unsatisfied with this.  Creating a blank
directory is a band-aid, and not fixing the problem.  So I'm still up for
any comments/suggestions.
-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-IIS-6-Connection-Frustration-tp15412852p15413436.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache Tomcat takes 3 to 4 browser request clicks to wake up after being idle for 1-2 hours

2008-02-11 Thread Brian Le
Thank you Peter and Len, trying your advise right now.

Forgot to mention my box has 4gig of RAM.


- Original Message 
From: Peter Crowther [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, February 11, 2008 8:55:21 AM
Subject: RE: Apache Tomcat takes 3 to 4 browser request clicks to wake up 
after being idle for 1-2 hours


 
From: 
Brian 
Le 
[mailto:[EMAIL PROTECTED]
 
So 
how 
do 
I 
make 
Tomcat 
responsive 
to 
website 
visitors 
after
 
1-2 
hours 
of 
no 
visitors?

 
Web 
server 
setup:
 
Suse 
Linux 
10.3 
- 
text 
based, 
minimal 
install
 
Apache 
2.2.8 
- 
mpm_worker, 
compiled 
front 
end 
using 
mod_jk
 
1.2.26 
Tomcat 
connector, 
default 
configuration
 
Tomcat 
6.0.16 
- 
JSF 
1.2
 
JDK 
1.6.0_04 
- 
1.5gig 
heap

Run 
vmstat 
(or 
your 
preferred 
performance 
monitor) 
on 
the 
box 
(vmstat 
1 
might 
be 
appropriate 
for 
you).  
Leave 
it 
idle.  
Watch 
vmstat 
as 
the 
box 
wakes 
up 
Tomcat.  
What's 
happening 
- 
disk 
i/o?  
CPU?  
Paging 
traffic?

My 
first 
guess 
is 
that 
some 
other 
process 
has 
caused 
large 
chunks 
of 
Tomcat's 
heap 
to 
be 
paged 
out, 
and 
the 
delay 
is 
due 
to 
paging 
issues.  
If 
you 
use 
a 
back-end 
database, 
this 
could 
also 
happen 
to 
the 
database.

  
  
  
  
  
  
  
  
- 
Peter

-
To 
start 
a 
new 
topic, 
e-mail: 
users@tomcat.apache.org
To 
unsubscribe, 
e-mail: 
[EMAIL PROTECTED]
For 
additional 
commands, 
e-mail: 
[EMAIL PROTECTED]







  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

RE: Apache Tomcat takes 3 to 4 browser request clicks to wake up after being idle for 1-2 hours

2008-02-11 Thread Peter Crowther
 From: Brian Le [mailto:[EMAIL PROTECTED]
 So how do I make Tomcat responsive to website visitors after
 1-2 hours of no visitors?

 Web server setup:
 Suse Linux 10.3 - text based, minimal install
 Apache 2.2.8 - mpm_worker, compiled front end using mod_jk
 1.2.26 Tomcat connector, default configuration
 Tomcat 6.0.16 - JSF 1.2
 JDK 1.6.0_04 - 1.5gig heap

Run vmstat (or your preferred performance monitor) on the box (vmstat 1 might 
be appropriate for you).  Leave it idle.  Watch vmstat as the box wakes up 
Tomcat.  What's happening - disk i/o?  CPU?  Paging traffic?

My first guess is that some other process has caused large chunks of Tomcat's 
heap to be paged out, and the delay is due to paging issues.  If you use a 
back-end database, this could also happen to the database.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache Tomcat takes 3 to 4 browser request clicks to wake up after being idle for 1-2 hours

2008-02-11 Thread Brian Le
Hello,

Issue:
Apache Tomcat takes 3-4 browser request clicks to wake up after being idle 
for 1-2 hours.

Tomcat is very responsive after Apache and Tomcat server startup also after 
doing my 3-4 browser request clicks to the website to wake up Tomcat.
However, after 1-2 hours of being idle (having no bowser requests or visits), 
it seem like Tomcat require me to click 3-4 browser request clicks  to wake it 
up then it will become very responsive again.

I just developed the website and just started to promote it, so the traffic to 
the website is very very low.  Every website visitor is very important, I don't 
want any users who visit the website and thinking the website is down.

Question:
So how do I make Tomcat responsive to website visitors after 1-2 hours of no 
visitors?

I have being searching and googling for a solution to this issue for a long 
time but could not find a solution.

Web server setup:
Suse Linux 10.3 - text based, minimal install
Apache 2.2.8 - mpm_worker, compiled front end using mod_jk 1.2.26 Tomcat 
connector, default configuration
Tomcat 6.0.16 - JSF 1.2
JDK 1.6.0_04 - 1.5gig heap

Thank you for any help and sorry if I am not clear,
-Brian





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

RE: [Eclipse-Tomcat] Problem by deploying from Eclipse to Tomcat

2008-02-11 Thread Larry Isaacs
There is not enough detail about your Eclipse configuration to make much of a 
guess.  Basically the exception says that the ServletRequestListener class is 
not visible to one of the listener classes loaded in your web.xml.  Either 
because it's missing (which seems not to be the case), or because your listener 
class is being loaded in a classloader that isn't allowed to see classes in 
common\lib's classloader.  Launching Tomcat with the listener class loaded by 
the system classloader would be a simple way to cause this.

Cheers,
Larry

 -Original Message-
 From: Thomas Chang [mailto:[EMAIL PROTECTED]
 Sent: Saturday, February 09, 2008 3:31 PM
 To: users@tomcat.apache.org
 Subject: Re: [Eclipse-Tomcat] Problem by deploying from Eclipse to
 Tomcat

 The servlet-api-2.4.jar is already in /common/lib.

   I doubt that's the cause. :-)


   *

   The missing class:

 javax/servlet/ServletRequestListener

 occurs in servlet-api.jar which appears to be missing in your
 configuration.  The best place for it is in
 Tomcat's  common/lib.

 -Ken

 Thomas Chang wrote:
  Hi all,
 
I am not sure if I should put my question here. But I can't google
  out the right place. Hope someone here can help. :-)
 
I built a web-app and can deploy it successfully from Tomcat
  Manager. But as I deploy it from the Eclipse, I get the following
 exception.
 
P.S.: I use Eclipse 3.4 and the WTP package.
 
Regards
 
Thomas
 

 
SCHWERWIEGEND: Error configuring application listener of class
  org.springframework.web.context.request.RequestContextListener
java.lang.NoClassDefFoundError:
  javax/servlet/ServletRequestListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at

 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at

 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCl
 assLoader.java:1812)
at

 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoade
 r.java:866)
at

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade
 r.java:1319)
at

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade
 r.java:1198)
at

 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.
 java:3677)
at

 org.apache.catalina.core.StandardContext.start(StandardContext.java:418
 7)
at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at
  org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at
  org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at

 org.apache.catalina.core.StandardService.start(StandardService.java:450
 )
at
  org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
 va:39)
at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
 rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
09.02.2008 20:57:23 org.apache.catalina.core.StandardContext
  listenerStart



 -
 Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Apache2 + Tomcat5 + mod_jk mounting issues

2008-02-11 Thread philip.coates
Hi - sorry if this is a repost as I found my email wasn't properly validated,

We have a set-up of Apache 2 and Tomcat 5 on our dev server (running Debian). I 
have a VirtualHost set up that has a JkMount in it that corresponds to a Tomcat 
webapp (so far so standard), like JkMount /*webapp* ajpw13 (which is a 
configured worker).  

I am also using mod_rewrite; my rewrite.conf contains mappings like 
RewriteRule ^/blah/?$ /servlet/blah. These mappings and rewrites work 
perfectly on my local machine (running XP) and on a colleague's box (running 
OSX). When we deploy to our Dev server, we find that things almost but don't 
quite work.

We enter a URL, e.g. http://dev.abc.com/blah and, on my machine and my 
colleague's this gets neatly mapped to the JkMount point. On the Debian box 
this doesn't happen, and I find myself having to use 
http://dev.abc.com/servlet/blah to get to the JkMount point.

Is there something obvious that I might have done/not done? I've never had this 
problem before?

A suitable Connector is set up in my server.xml too...

Thanks,

Phil.


This email has been scanned by Postini.
For more information please visit http://www.postini.com



Re: How to avoid session fixation?

2008-02-11 Thread david delbecq

Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Delbecq wrote:
| I think this is worth submitting a security issue request on tracker,
| to ask that, at least, the container links the requester IP to the
| session.

I'm pretty sure that nobody will want to do this -- at least not without
the ability to turn the feature off. You'll break a lot of users if you
This won't be the first fix in tomcat that would potentially break other 
application, in the past tomcat team have always made such change 
optionnal. IT wold anywa be good for system administrator if they can 
prevent such issue.


| Changing session ID upon login in container would be a good thing
| imho, it would ensure ID become unknown to attacker after login,
| wouldn't destroy user session (keep session, only change it's
| identifier) and would work whatever authentication mechanism is used.
|
I completely agree. Christopher, I think your valve might be more
attractive if it was able to change the id of the session and leave it
at that. I'm not familiar enough with the Tomcat API to know if this is
possible and/or a good idea.

| Draw back is that webapp that rely on session id for some session
| tracking mechanism would break.

True, although most webapps probably use whatever session id is
currently in use. If you did a lot of AJAX where the session id
available to the page becomes out-of-date after a login, you will have
to make special considerations for that. I think you'll find that this
is not much of a problem.
I would more be thinking about applications that plays with 
sessionlistener and maintain list of active session (to track number of 
users / who is logged in, etc). Like ip-session id matching, a change 
id on the fly could also break at several levels and should be 
optional.Also, for example, of non-cookies enabled user, for which url 
previous to login would become useless (or at least would point to an 
inexistant session).


- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkewsO8ACgkQ9CaO5/Lv0PBWXQCggsMZA1AGkdzSDvBmYeHC2JED
iU4An15g6IGrG/yU4mgWokKnVkXdnW0O
=eLbx
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Incorrect cookie value in tomcat5.5.26

2008-02-11 Thread Filip Hanik - Dev Lists
we made a correction, if you read the javadoc, that is an invalid value 
for a v0 cookie.


do a cookie.setVersion(1);

Filip
Sushil Vegad wrote:

Hello,

We upgraded to tomcat 5.5.26 from 5.0.28 and now its returning incorrect
cookie value.

 


We are setting user email/id in a cookie to remember the user, as follows

Cookie cookie = new Cookie(Constants.COOKIE_NAME, [EMAIL PROTECTED]);

 


On doing cookie.getValue(), tomcat 5.5.26 just returns vsushil instead of
the whole string. Since some of our code was written on JDK 1.4, we
installed the JDK 4 compatibility package for tomcat5.5.26 

 


Please let me know the possible options to fix this.

 


Thanks,

Sushil Vegad

Technical Lead, Scheduling Project

Serebrum Corporation - translating strategy into results

Work: 609.777.3563

Cell: 732.216.4908  


Email: [EMAIL PROTECTED]

Conference Dial-in: 1-218-486-1300, Bridge: 427526

 



  



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.2/1271 - Release Date: 2/11/2008 8:16 AM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Incorrect cookie value in tomcat5.5.26

2008-02-11 Thread Konstantin Kolinko
I guess the cause is the same as for tomcat 6.0.16.
See messages entitles Cookies are broken in 6.0.16?.

http://www.nabble.com/Cookies-are-broken-in-6.0.16--to15369118.html

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14

2008-02-11 Thread Dan D.

This worked perfectly.

Thank you very much for your patience and help.

- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, February 11, 2008 5:09 PM
Subject: RE: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14


From: Dan D. [mailto:[EMAIL PROTECTED] 
Subject: Re: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14


Would it work to then change the appBase to 
/home/user/html/ROOT, or would 
it be better to have a secondary directory 
(/home/user/html/webapps) with a 
ROOT directory inside of it?


The latter, since you must not ever have appBase == docBase.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can Tomcat support multiple SSL certificates for multiple domains?

2008-02-11 Thread Jan Mönnich
Ooops, my fault! I've read and replied too fast (maybe because it's Monday? :-))
Of course this shouldn't be done with *two domain names* only with
two host names in the same domain... I suppose it won't work in
actual browsers but if it does I let you all know...

Sorry
Jan

Hassan Schroeder schrieb:
 On Feb 11, 2008 5:00 AM, Jan Mönnich [EMAIL PROTECTED] wrote:
 
 You can get one certificate with both domain names in the Subject
 Alternative Name of the Certificate. All modern browsers can handle that
 and you can use just one Certificate for both domains. That's the
 workaround we are recommending to all of our customers.
 
 Have you actually seen this deployed?
 
 I ask because I've only seen Subject Alternative Name used as e.g.
  foo.example.com, bar.example.com -- never two *domain* names.
 
 If that really works, it'd be good to know :-)
 

-- 
Dipl.-Inf. (FH) Jan Mönnich, PKI Team
Phone: +49 40 808077-632, Fax: +49 40 808077-556, [EMAIL PROTECTED]

DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-555
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
Sachsenstraße 5, 20097 Hamburg/Germany, CEO: Dr. Klaus-Peter Kossakowski

15 Jahre DFN-CERT + 15. DFN-Workshop Sicherheit in vernetzten Systemen
am 13./14. Februar 2008 im CCH Hamburg - https://www.dfn-cert.de/ws2008/




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Can Tomcat support multiple SSL certificates for multiple domains?

2008-02-11 Thread Hassan Schroeder
On Feb 11, 2008 5:00 AM, Jan Mönnich [EMAIL PROTECTED] wrote:

 You can get one certificate with both domain names in the Subject
 Alternative Name of the Certificate. All modern browsers can handle that
 and you can use just one Certificate for both domains. That's the
 workaround we are recommending to all of our customers.

Have you actually seen this deployed?

I ask because I've only seen Subject Alternative Name used as e.g.
 foo.example.com, bar.example.com -- never two *domain* names.

If that really works, it'd be good to know :-)

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache Tomcat takes 3 to 4 browser request clicks to wake up after being idle for 1-2 hours

2008-02-11 Thread Len Popp
Are there any errors in the Tomcat logs? Are the requests even getting
to the Tomcat server? You can have Apache, Tomcat and mod_jk log all
requests to see if they're getting lost somewhere. Also check if
there's a problem with the database (if you're using one).

As a stop-gap, you could write a little program to ping the site
with an HTTP request every few minutes, to keep it awake.
-- 
Len

On Feb 11, 2008 9:43 AM, Brian Le [EMAIL PROTECTED] wrote:
 Hello,

 Issue:
 Apache Tomcat takes 3-4 browser request clicks to wake up after being idle 
 for 1-2 hours.

 Tomcat is very responsive after Apache and Tomcat server startup also after 
 doing my 3-4 browser request clicks to the website to wake up Tomcat.
 However, after 1-2 hours of being idle (having no bowser requests or visits), 
 it seem like Tomcat require me to click 3-4 browser request clicks  to wake 
 it up then it will become very responsive again.

 I just developed the website and just started to promote it, so the traffic 
 to the website is very very low.  Every website visitor is very important, I 
 don't want any users who visit the website and thinking the website is down.

 Question:
 So how do I make Tomcat responsive to website visitors after 1-2 hours of no 
 visitors?

 I have being searching and googling for a solution to this issue for a long 
 time but could not find a solution.

 Web server setup:
 Suse Linux 10.3 - text based, minimal install
 Apache 2.2.8 - mpm_worker, compiled front end using mod_jk 1.2.26 Tomcat 
 connector, default configuration
 Tomcat 6.0.16 - JSF 1.2
 JDK 1.6.0_04 - 1.5gig heap

 Thank you for any help and sorry if I am not clear,
 -Brian





   
 
 Looking for last minute shopping deals?
 Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping



-- 
Len

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14

2008-02-11 Thread Dan D.

Chuck,

I updated the server.xml for this user to be:

Host name='www.domain.com'
   debug='0'
   appBase='/home/user/html'
   unpackWARs='true'
   autoDeploy='false'
   Aliasdomain.com/Alias
   Valve 
className='org.apache.catalina.authenticator.SingleSignOn'

   debug='0'/
   Valve 
className='org.apache.catalina.valves.AccessLogValve'

   directory='/var/log/user'
   prefix='tomcat_access.'
   suffix='.log'
   pattern='common'
   resolveHosts='false'/
   /Host

I added a ROOT directory in /home/user/html, with a META-INF and WEB-INF 
directory in it.  Added context.xml with the contents of:


Context debug='0' reloadable='false'/

inside META-INF.

Removed WEB-INF from /home/user/html.

Removed all contents from the Tomcat work directory as well.

When starting tomcat, however, the work directory is still full of 
directories that have nothing to do with the actual application.


If I read your response correctly (there's a good chance I didn't), the 
steps I took should be the right ones.  However, if that were the case, 
should all of the random directories still have a place in the Tomcat work 
directory?


Thanks!

Dan.

- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, February 07, 2008 6:09 PM
Subject: RE: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14



From: Dan D. [mailto:[EMAIL PROTECTED]
Subject: Re: Out of Memory Errors when upgrading from 5.0.27 to 6.0.14

Host name='www.domain.com'
 appBase='/home/user/html'
 Context path='' docBase='' debug='0' reloadable='false'/
/Host


Right there is the first problem: docBase and appBase must never be the
same - lots of things go wrong internally when they both refer to the
same directory.  You need to remove the Context entry for the default
webapp from server.xml and place the default webapp files under
/home/user/html/ROOT.  If you want to specify attributes for the default
webapp, put the Context element in
/home/user/html/ROOT/META-INF/context.xml, without the path or docBase
attributes.  This works on all levels from 5.0 on up.

When that's straightened out, delete everything under the work directory
before restarting Tomcat.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make Tomcat not clean directory on new deployment

2008-02-11 Thread Sébastien Piller

Ok thank you, that's what I was afraid on...

My only problem is that I use a special web framework, I'll try to see 
how I can load resource from out of the app in that framework.


Thank you again for your confirmation

David Smith a écrit :
If you want to retain modifications like this, your only option is to 
deploy the exploded webapp.  I would encourage you to store the 
uploaded files in another folder outside your webapp which would make 
updating your webapp cleaner, easier to manage.


--David



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Make two authentication schemes coexist on the same app

2008-02-11 Thread Diego Manilla Suárez
Hi. I have a web app with standard form authentication and a custom 
JDBCRealm. Now, I need to enable client certificate authentication, and 
be able to use both authentication mechanisms (certificates when the 
user sends them, and standard login form when he doesn't).


I don't know if this is even possible. I think I can validate the user's 
certificates when he tries to access a secure area using a Filter, but I 
have no way to set the Principal on the CoyoteRequestFacade (since the 
facade prevents me from using the setUserPrincipal present on 
CoyoteRequest).


Any idea?

Thanks in advance.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: catalina.out is not reloading

2008-02-11 Thread David Smith
Sorry guy.  Maybe someone else can provide such updates.  I'd have to 
write it as I've never had the need for such functionality.


--David

persistence k wrote:

Thanks Mr.David .

Will you please send me a sample start up script to handle renaming or
deleting the old catalina.out file.


Regards,
Persistence




On 2/11/08, David Smith [EMAIL PROTECTED] wrote:
  

Then you should modify the startup script to handle renaming or deleting
the old file before starting tomcat.  Catalina.out itself is just the
redirected standard output from tomcat and tomcat has no control over
what the OS does with what it spews out.

As a better alternative, configure your favorite logging framework to
provide rolling log files.  There are lots of messages in the archives
regarding log4j and dealing with the classloader system in tomcat if you
want to go that direction.

--David

persistence k wrote:


Yes, Mr.David. I want each time tomcat's redirects its standard output to
catalina.out file,
this file should reflect that change and during tomcat start up all the
content in the file should be deleted, instead of appending it to previous
messages.

Right now I'm closing and reopening the file to notice the changes in it.
Instead I would like to see the file reloaded each time tomcat redirects
  

its


standard output to
that file, just as it happens in windows.

Please suggest me a solution for this.

Thanks
Persistence.




On Feb 7, 2008 4:08 PM, David Smith [EMAIL PROTECTED] wrote:


  

I'm not clear on what you mean by 'reloading' as catalina.out is just a
text file accepting tomcat's redirected standard output.  It should
simply be appended to as messages are generated.  Are you saying you
want the file to be deleted and started fresh on every tomcat startup?

--David

persistence k wrote:



Hi,

whenever I restart the tomcat in linux, the file ' catalina.out ' is not
automatically reloading just like the file ' std.out ' does in windows.

' catalina.out ' file containing all the 'System.out ' statements

  

printed



from the day tomcat
was installed in my linux system.

Please tell me a solution so that the file ' catalina.out ' gets
reloaded for each and every time I made change in WEB UI.

-Persistence



  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make Tomcat not clean directory on new deployment

2008-02-11 Thread David Smith
If you want to retain modifications like this, your only option is to 
deploy the exploded webapp.  I would encourage you to store the uploaded 
files in another folder outside your webapp which would make updating 
your webapp cleaner, easier to manage.


--David

Sébastien Piller wrote:
Is it at least possible? Or is the only way to fix my issue to upload 
only exploded files (so Tomcat will not redeploy the app)?


Anybody has an idea?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make Tomcat not clean directory on new deployment

2008-02-11 Thread Sébastien Piller
Is it at least possible? Or is the only way to fix my issue to upload 
only exploded files (so Tomcat will not redeploy the app)?


Anybody has an idea?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: catalina.out is not reloading

2008-02-11 Thread persistence k
Thanks Mr.David .

Will you please send me a sample start up script to handle renaming or
deleting the old catalina.out file.


Regards,
Persistence




On 2/11/08, David Smith [EMAIL PROTECTED] wrote:
 Then you should modify the startup script to handle renaming or deleting
 the old file before starting tomcat.  Catalina.out itself is just the
 redirected standard output from tomcat and tomcat has no control over
 what the OS does with what it spews out.

 As a better alternative, configure your favorite logging framework to
 provide rolling log files.  There are lots of messages in the archives
 regarding log4j and dealing with the classloader system in tomcat if you
 want to go that direction.

 --David

 persistence k wrote:
  Yes, Mr.David. I want each time tomcat's redirects its standard output to
  catalina.out file,
  this file should reflect that change and during tomcat start up all the
  content in the file should be deleted, instead of appending it to previous
  messages.
 
  Right now I'm closing and reopening the file to notice the changes in it.
  Instead I would like to see the file reloaded each time tomcat redirects
 its
  standard output to
  that file, just as it happens in windows.
 
  Please suggest me a solution for this.
 
  Thanks
  Persistence.
 
 
 
 
  On Feb 7, 2008 4:08 PM, David Smith [EMAIL PROTECTED] wrote:
 
 
  I'm not clear on what you mean by 'reloading' as catalina.out is just a
  text file accepting tomcat's redirected standard output.  It should
  simply be appended to as messages are generated.  Are you saying you
  want the file to be deleted and started fresh on every tomcat startup?
 
  --David
 
  persistence k wrote:
 
  Hi,
 
  whenever I restart the tomcat in linux, the file ' catalina.out ' is not
  automatically reloading just like the file ' std.out ' does in windows.
 
  ' catalina.out ' file containing all the 'System.out ' statements
 
  printed
 
  from the day tomcat
  was installed in my linux system.
 
  Please tell me a solution so that the file ' catalina.out ' gets
  reloaded for each and every time I made change in WEB UI.
 
  -Persistence
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Make Tomcat not clean directory on new deployment

2008-02-11 Thread Sébastien Piller

Hello people,

First, I would like to thank you all for your work on this great 
project. Tomcat is, was, and will be my favourite webapp server from a 
long time ;)


I never need to do a lot with its internal configuration, but now I'm 
asking myself if the following stuff could be done:


I have an upload directory in my app. Users send us some files 
(pictures and swf) and I put them in this directory.


But when I make some update of my webapp, I deploy a .war file. But 
*this one doesn't have all the images* that were previously on the server!


Is it possible to tell Tomcat not to clean the webapp directory when a 
war file is deployed?


Thank you vm ;)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: rotating catalina.out using log4j

2008-02-11 Thread David Delbecq
catalina.out is just the sink for System.out and System.err, it's not 
managed by logging facilities. It's not even seen by jvm, as the 
redirection is done in the startup script (using the shell '' 
redirector). If you configure a log4j logger for tomcat that uses an 
other file (see below our simple config) and teach all your webapps to 
not use stdout and stderr, you shouldn't see anymore things appear in 
catalina.out. If you still need rolling of file during startup, you will 
need to ask external tools (like unix logrotate) to do it for you.


..common/classes# cat log4j.properties
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=./logs/tomcat.log
log4j.appender.R.MaxFileSize=30MB
log4j.appender.R.MaxBackupIndex=20
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n


En l'instant précis du 11/02/08 17:39, Amir Fadaghi s'exprimait en ces 
termes:

Hi,

I am trying to implement the catalina.out log rotation in the development 
environment (for now and will implement to other environments once I figure 
this out) using log4j.  I am running apache-tomcat version 5.5.25 and 
downloaded the apache-log4j-1.2.15 and commons-logging-1.1.1.  I copied the 
log4j.jar and commons-logging.jar into the $CATALINA_HOME/lib and created the 
log4j.properties in the common/classes.  However, when I stop and start the 
apache-tomcat the cataline.out is not rotating.

 Here is the my directory listings in the commons/lib direcotry and 
commons/classes directory:

/usr/local/apache-tomcat-5.5.25/common:
ls lib
commons-el.jar jasper-runtime.jar naming-factory.jar
commons-logging-1.1.1.jar  jsp-api.jarnaming-resources.jar
jasper-compiler-jdt.jarlog4j-1.2.15.jar   servlet-api.jar
jasper-compiler.jarnaming-factory-dbcp.jar

should I change the highlighted filenames to commons-logging.jar and, log4j.jar?

/usr/local/apache-tomcat-5.5.25/common:
ls classes
log4j.properties

tail classes/log4j.properties

#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO

is the above line uncommented correct for rotating catalina.out rotation?

My environment is:
Sun Solaris 10

I thank you for any help you provide.



-
Email messages cannot be guaranteed to be secure or error-free as
transmitted information can be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
Centers for Medicare  Medicaid Services therefore does not accept
liability for any error or omissions in the contents of this
message, which arise as a result of email transmission.

CONFIDENTIALITY NOTICE: This communication, including any
attachments, may contain confidential information and is intended
only for the individual or entity to which it is addressed. Any
review, dissemination, or copying of this communication by anyone
other than the intended recipient is strictly prohibited. If you
are not the intended recipient, please contact the sender by reply
email and delete and destroy all copies of the original message.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: catalina.out is not reloading

2008-02-11 Thread Vamsavardhana Reddy
I am guessing...  Somewhere in the script there should be a  catalina.out
to append to catalina.out.  Change that to  catalina.out so that the old
file is automatically rewritten.  Or else you may use rotatelogs program
that comes with apache http server.  See
http://httpd.apache.org/docs/2.0/programs/rotatelogs.html

++Vamsi

On Feb 11, 2008 3:47 PM, persistence k [EMAIL PROTECTED] wrote:

 Thanks Mr.David .

 Will you please send me a sample start up script to handle renaming or
 deleting the old catalina.out file.


 Regards,
 Persistence




 On 2/11/08, David Smith [EMAIL PROTECTED] wrote:
  Then you should modify the startup script to handle renaming or deleting
  the old file before starting tomcat.  Catalina.out itself is just the
  redirected standard output from tomcat and tomcat has no control over
  what the OS does with what it spews out.
 
  As a better alternative, configure your favorite logging framework to
  provide rolling log files.  There are lots of messages in the archives
  regarding log4j and dealing with the classloader system in tomcat if you
  want to go that direction.
 
  --David
 
  persistence k wrote:
   Yes, Mr.David. I want each time tomcat's redirects its standard output
 to
   catalina.out file,
   this file should reflect that change and during tomcat start up all
 the
   content in the file should be deleted, instead of appending it to
 previous
   messages.
  
   Right now I'm closing and reopening the file to notice the changes in
 it.
   Instead I would like to see the file reloaded each time tomcat
 redirects
  its
   standard output to
   that file, just as it happens in windows.
  
   Please suggest me a solution for this.
  
   Thanks
   Persistence.
  
  
  
  
   On Feb 7, 2008 4:08 PM, David Smith [EMAIL PROTECTED] wrote:
  
  
   I'm not clear on what you mean by 'reloading' as catalina.out is just
 a
   text file accepting tomcat's redirected standard output.  It should
   simply be appended to as messages are generated.  Are you saying you
   want the file to be deleted and started fresh on every tomcat
 startup?
  
   --David
  
   persistence k wrote:
  
   Hi,
  
   whenever I restart the tomcat in linux, the file ' catalina.out ' is
 not
   automatically reloading just like the file ' std.out ' does in
 windows.
  
   ' catalina.out ' file containing all the 'System.out ' statements
  
   printed
  
   from the day tomcat
   was installed in my linux system.
  
   Please tell me a solution so that the file ' catalina.out ' gets
   reloaded for each and every time I made change in WEB UI.
  
   -Persistence
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Very strange problem with forms ...

2008-02-11 Thread Rafal Markut

Hello,

I know that this list isn't for web developping but I have impression that 
maybe tomcat makes problems so I'm writting here ...


I made very simple web application. Namely on the main page there is list of 
records (list.jsp). I can create new record, edit and delete.


So when user clicks ADD or EDIT then new page appears (article.jsp) with 2 
form fields, and ...

when user press SAVE then:
1. it goes to article.jsp
2. check if information from these 2 fields are valid
3. makes INSERT or UPDATE in the database
4. performs redirection to the list.jsp.

Normally it works perfectly ... but sometimes when the user press SAVE then 
it lands again in article.jsp and it doesn't save the data. Here are two 
cases:


1. Sometimes when the user press SAVE then he sees form with data (which he 
typed in) but he can press SAVE 100 times but stil he sees this same filled 
form (he doesn't save in the database and doesn't jump to the list.jsp).


2. OR ... sometimes when the user press SAVE then he sees empty form but 
user can fill form again and press SAVE  but stil he sees this same empty 
form (he doesn't save in the database and doesn't jump to list.jsp).


Of course the form-data are in both cases valid.

It helps only when user closes browser and opens it again. About 60-70 users 
works with that application. Most of them works with Internet Explorer 6. It 
happens only sometimes.

I wasn't able to reproduce this error, it didn't happen to me.

I made this application in JSF+Spring+Hibernate. I wasn't able to find the 
solution, I coundn't reproduce error and find the reason.


So I made this application so simple as it's possible, namely in pure JSP, 
connection with database via JDBC. But this error also appears.


I made thousands such applications and i didn't have such strange problems.
This forms behaves like POST data would be removed (all or partly).

There are no any exceptions or errors in logs.

Do you have any idea what could it be ? Did anyone have such problems ?

Tomcat 5.5
Apache 2.0.59, Apache 2.0 Filter
MySql 5.0.18

with best regards,
Rafal 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]