Re: Tomcat / WAR File; Classpath not recognised for properties file

2007-06-19 Thread 吴熊敏
The program's default classpath is app/WEB-INF/classes

so,you need to put the property files under this folder.

That means that when you developping,you should put property files under
the src folder.

On Mon, 18 Jun 2007 07:46:19 -0700 (PDT)
nformosa [EMAIL PROTECTED] wrote:

 
 Hi All,
 
 I'm having trouble when deploying my WAR application. The War file contains
 mainly the WEB.xml, and index.html file and a number of required libraries,
 incudling the compiled src code i've written, All libraries are stored
 within the WEB-INF/libs which is correct. Along the libraries i have a
 folder called resources, which have a number of files used as properties
 files. 
 
 The problem is that when i'm trying to access these files (property files)
 i'm givin a 'Not found' error, and mainly this is due to the fact that its
 looking in the bin folder of tomcat as its classpath! 
 
 I'm accesing these files using relative paths ie: /resources/config.xml
 
 How can i fix this problem? any ideas would really be appreciated!
 
 thanks in advance
 Nick
 -- 
 View this message in context: 
 http://www.nabble.com/Tomcat---WAR-File--Classpath-not-recognised-for-properties-file-tf3940737.html#a11177124
 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]


吴熊敏 [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[2]: Is there a config for JSP compiler to ignore [\s] chars in JSP directive line?

2007-06-19 Thread 吴熊敏
If you really need space sometimes,you can use nbsp;


On Mon, 18 Jun 2007 09:47:39 -0700 (PDT)
LiuYan_刘研 [EMAIL PROTECTED] wrote:

 
 Thank you Leon, the 'trimSpaces' servlet parameter works fine except some
 little issues: 
 1. The span it trimmed is a little wider, it even trimmed the continuous
 empty lines and the leading white spaces of the first line after directives..
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 
 
 [EMAIL PROTECTED]
 will output nothing to client, but I want to keep the empty line 3,4,5 which
 are not in the same lines to directives.
 
 
 2. the evaluated body in c:forEach/forEach is trimmed as the same indent
 as the tag directive if there are differnce between them. see the following
 example JSP code:
 
 
 
 
 
 
 
 
 
 %@ page
   session=true
   contentType=text/html; charset=UTF-8
   import=java.util.*
 %
 
 %-- JSTL 1.1 tag library --%
 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
 %-- JSTL 1.0 tag library --%
 %--@ taglib prefix=c uri=http://java.sun.com/jstl/core; --%
 
 %-- 中文 used for save this file as UTF-8 encoding --%
 html
 head
 style type=text/css
 pre,code { border:1px solid}
 /style
 /head
 body
 
 %
 ArrayListString arrayTest =  new ArrayListString();
 pageContext.setAttribute (test, arrayTest);
 for(int i=1; i=5; i++)
 {
   arrayTest.add (String.valueOf(i));
 }
 %
 
 
   pre
   Case 1: c:forEach has 0 indent, non-whitespace characters 
 occurs BEFORE
 c:out
 c:forEach var=t items=${test}
   Line c:out value=${t}/
 /c:forEach
   /pre
   pre
   Case 2: c:forEach has 2 tabs indent, non-whitespace characters 
 occurs
 BEFORE c:out
   c:forEach var=t items=${test}
   Line c:out value=${t}/
   /c:forEach
   /pre
   pre
   Case 3: c:forEach has 0 indent, non-whitespace characters 
 occurs AFTER
 c:out
 c:forEach var=t items=${test}
   c:out value=${t}/ Line
 /c:forEach
   /pre
   pre
   Case 4: c:forEach has 2 tabs indent, non-whitespace characters 
 occurs
 AFTER c:out
   c:forEach var=t items=${test}
   c:out value=${t}/ Line
   /c:forEach
   /pre
   pre
   Case 5: c:forEach has 2 tabs indent, there are no non-whitespace
 characters around c:out
   c:forEach var=t items=${test}
   c:out value=${t}/
   /c:forEach
   /pre
   table border=1
   tr
   c:forEach var=t items=${test}
   td
   c:out value=${t}/
   /td
   /c:forEach
   /tr
   /table
 
 /body
 /html
 
 Unfortunately, non of these 5 cases meet my demand.
 
 The behaviour of 'trimSpaces' in my mind will be:
 1. Trim only whitespace characters if there are no non-whitespace characters
 in the directive line
 2. An exception to 1: Do not trim whitespace characters which the directive
 will generate outputs (such as c:out of JSTL or bean:write, bean:message of
 struts ), maybe this is a trouble to JSP compiler, because it needs knows
 behaviour of tags: which tags are logical tags and which tags are html tags,
 but it is really good if 'trimSpaces' can achieve this.
 3. Do not trim any other lines which does not contain directives.
 
 Wish the JSP compiler can enhance 'trimSpaces' in details...
 (I'm thinking: Am I a boring man... -_-!)
 
 But anyways, the 'trimSpaces' parameter is a good stuff for me now than
 having not it.
 
 
 
 Leon Rosenberg-3 wrote:
  
  trimSpaces was once a setting in the declaration of the jsp servlet in
  the web.xml
  
 servlet
  servlet-namejsp/servlet-name
 
  servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
  init-param
  param-nametrimSpaces/param-name
  param-valuetrue/param-value
  /init-param
  ...
  
  
  regards
  Leon
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/Is-there-a-config-for-JSP-compiler-to-ignore--%5Cs--chars-in-JSP-directive-line--tf3939116.html#a11179552
 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]


吴熊敏 [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: image caching using Apache

2007-06-19 Thread 吴熊敏
I'm interested with it,but i don't know how to do.


On Mon, 18 Jun 2007 18:49:03 -0300
Paulo Alvim [EMAIL PROTECTED] wrote:

 Hi!
 
 We're using TC Cluster with Apache connector as dispatcher.
 
 We'd like to improve performance by caching images served by servlets(DBMS),
 in the dispatcher level (apache connector)... is it as simple as configure a
 'filter'? Any advice about that?
 
 Thanks in advance!
 
 Paulo Alvim
 Brazil
 ( +55 (31) 3213-1019
 * [EMAIL PROTECTED]
 Powerlogic S.A.
 
 


吴熊敏 [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]



Design

2007-06-19 Thread Mohammed Zabin

Hi All

I am developing an online exam site as a graduation project. I have some
questions regardsing the design:

1. In such a program which is a web site that introduce some multiple choice
questions, and shows the result of user answers, DO I HAVE TO USE EJB??


Re: Design

2007-06-19 Thread Kevin Wilhelm

No!

This sounds like a simple webapp to me. Just use some Servlet Container 
(Tomcat) and have all of the presentation (JSP), business and persistence 
things handled in ONE engine.


- Original Message - 
From: Mohammed Zabin [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 9:26 AM
Subject: Design



Hi All

I am developing an online exam site as a graduation project. I have some
questions regardsing the design:

1. In such a program which is a web site that introduce some multiple 
choice

questions, and shows the result of user answers, DO I HAVE TO USE EJB??




-
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: Share one singleton across webapps

2007-06-19 Thread Andre Prasetya

I m assuming you're using WTP and Eclipse. To avoid that disgusting problem,
add the problematic jar to build path only and not to J2EE module
dependency.

UAT : User Acceptance Test
QA : Quality Assurance


On 6/18/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:


It works! Thanks!

The problem has been that each webapp had its own shared-lib jar-file,
because I am developing in Eclipse. So Eclipse needs to know which classes I
am accessing :/ At the end there were 3 times the same jar-file: 1st webapp,
2nd webapp, tomcat/lib.

Removing the jars from the webapps and leaving the one in tomcat/lib
solved the problem.

However this is very disgusting. Every time I am deploying the 2 webapps
to Tomcat, the jars are copied as well. I have to delete them manually, so
that only the jar in Tomcat/lib is used. Is there some workaround for this?
Should I use Ant for deploying then? But I won't be able to debug the
webapps from within my IDE anymore since I am avoiding Eclipse's deployment
mechanisms.


 Original-Nachricht 
Datum: Mon, 18 Jun 2007 15:40:36 +0200
Von: Johnny Kewl [EMAIL PROTECTED]
An: Tomcat Users List users@tomcat.apache.org
Betreff: Re: Share one singleton across webapps


 The typical form is like this

 public class SingletonObject
 {
 private SingletonObject(){}

 public static SingletonObject getSingletonObject()
 {
   if (ref == null)
   // it's ok, we can call this constructor
   ref = new SingletonObject();
   return ref;
 }

 private static SingletonObject ref;
 }

 If thats in Tomcat/lib it should share
 Notice the use of static ie there is only one, no matter how many
 times
 its started.
 ...and the check for null which is how it determines it needs to
make
 one instance if there is non...

 Thats the trick a normal class which is what I imagine you trying,
 will
 load once. but instance many times.

 Hope that helps... try not use them unless you really have to.




 - Original Message -
 From: Kevin Wilhelm [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Monday, June 18, 2007 3:12 PM
 Subject: Share one singleton across webapps


 I managed to get a jar file shared across two webapps in my Tomcat 6.
  Inside there is a class that represents a Singleton.
 
  The problem: the singleton class is instantiated by the first webapp
and
  then again instantiated in the second webapp. So there are 2
  representations of the class and it is not really shared.
 
  There has to be a way to let the first webapp instantiate the
singleton
  and set some property so that the second webapp can use the singleton
  and read the property. How do I achieve this?
  --
  Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
  Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
 
  -
  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]

--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

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





--
-Andre-

People see things the way they are and say why ? I see things that never
were and say Why not ?


Re: Design

2007-06-19 Thread Mohammed Zabin

I am using a Tag that render the whole questions, can i create another tag
that deals with user request?

On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:


No!

This sounds like a simple webapp to me. Just use some Servlet Container
(Tomcat) and have all of the presentation (JSP), business and persistence
things handled in ONE engine.

- Original Message -
From: Mohammed Zabin [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 9:26 AM
Subject: Design


 Hi All

 I am developing an online exam site as a graduation project. I have some
 questions regardsing the design:

 1. In such a program which is a web site that introduce some multiple
 choice
 questions, and shows the result of user answers, DO I HAVE TO USE EJB??



-
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: Design

2007-06-19 Thread Kevin Wilhelm
I'd take the approach with Servlets/JSP that handle user inputs. You could 
in deed use tags for the inputs and process them with suitable controllers 
in the logic tier. May be there are simpler ways to proceed with 
questionaires.



- Original Message - 
From: Mohammed Zabin [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 9:42 AM
Subject: Re: Design



I am using a Tag that render the whole questions, can i create another tag
that deals with user request?

On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:


No!

This sounds like a simple webapp to me. Just use some Servlet Container
(Tomcat) and have all of the presentation (JSP), business and persistence
things handled in ONE engine.

- Original Message -
From: Mohammed Zabin [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 9:26 AM
Subject: Design


 Hi All

 I am developing an online exam site as a graduation project. I have 
 some

 questions regardsing the design:

 1. In such a program which is a web site that introduce some multiple
 choice
 questions, and shows the result of user answers, DO I HAVE TO USE EJB??



-
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: Design

2007-06-19 Thread ben short

Id suggest having a look at the spring web mvc stuff it can help you
simplify form submissions by mapping request params to objects so you
don't have to do, although there will be a slight learning curve.

Just my 2 pence :)

On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:

I'd take the approach with Servlets/JSP that handle user inputs. You could
in deed use tags for the inputs and process them with suitable controllers
in the logic tier. May be there are simpler ways to proceed with
questionaires.


- Original Message -
From: Mohammed Zabin [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 9:42 AM
Subject: Re: Design


I am using a Tag that render the whole questions, can i create another tag
 that deals with user request?

 On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:

 No!

 This sounds like a simple webapp to me. Just use some Servlet Container
 (Tomcat) and have all of the presentation (JSP), business and persistence
 things handled in ONE engine.

 - Original Message -
 From: Mohammed Zabin [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, June 19, 2007 9:26 AM
 Subject: Design


  Hi All
 
  I am developing an online exam site as a graduation project. I have
  some
  questions regardsing the design:
 
  1. In such a program which is a web site that introduce some multiple
  choice
  questions, and shows the result of user answers, DO I HAVE TO USE EJB??
 


 -
 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]



mod_jk2 / Tomcat problem

2007-06-19 Thread Thomas Keller


Hi all!

I know this particular problem came up many many times here on this list 
before, but looking through the archived posts nobody seem to know a 
proper resolution for it.


The symtoms: Apache runs, Tomcat runs, just if Apache requests are 
forwarded to Tomcat through mod_jk2 (2.0.4, I know its ancient, but this 
is a production server for which this setup worked over the last 
year(s)), I get a server error 500 after some time and Apache's 
error_log contains things like


[Tue Jun 19 10:59:45 2007] [error] msgAjp.receive(): Bad signature 00
[Tue Jun 19 10:59:45 2007] [error] channelApr.receive(): Bad header
[Tue Jun 19 10:59:45 2007] [error] workerEnv.processCallbacks() Error 
reading reply
[Tue Jun 19 10:59:45 2007] [error] ajp13.service() ajpGetReply 
recoverable error 12
[Tue Jun 19 10:59:45 2007] [error] ajp13.service() Error  forwarding 
ajp13:localhost:8009 1 0
[Tue Jun 19 10:59:45 2007] [error] mod_jk2.handler() Error connecting to 
tomcat 12, status 0


(This is Gentoo 1.4.16 base, Apache 2.0.52, Tomcat 5.0.27, Kernel 2.6.9 
on an Intel Xeon)


Restarting Apache or Tomcat didn't work, some poster here said he had to 
set LD_ASSUME_KERNEL in his environment to get it back to work, but 
since this isn't set in my environment and it worked before I don't 
believe to much into this solution.


The connector is setup on port 8009 and one can telnet to it.

I'll post more configuration files here if necessary, I just don't want 
to spam my very first post here too much =)


Thanks in advance,

Thomas.

--


itCampus Software- und Systemhaus GmbH
Deutschland * Großbritannien * Italien * Österreich * Schweiz * Slowakei

Nonnenstraße 42
D-04229 Leipzig

[EMAIL PROTECTED]

Tel:   +49. 341. 4 92 87 32
Fax:   +49. 341. 4 92 87 01
Funk:  +49. 175. 4 66 11 98

http://www.itcampus.de

Amtsgericht Leipzig HRB 15872
Geschäftsführer: Andreas Lassmann
techn. Geschäftsführer: Tobias Schmidt



-
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: Design

2007-06-19 Thread Mohammed Zabin

What learning curve?

On 6/19/07, ben short [EMAIL PROTECTED] wrote:


Id suggest having a look at the spring web mvc stuff it can help you
simplify form submissions by mapping request params to objects so you
don't have to do, although there will be a slight learning curve.

Just my 2 pence :)

On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:
 I'd take the approach with Servlets/JSP that handle user inputs. You
could
 in deed use tags for the inputs and process them with suitable
controllers
 in the logic tier. May be there are simpler ways to proceed with
 questionaires.


 - Original Message -
 From: Mohammed Zabin [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, June 19, 2007 9:42 AM
 Subject: Re: Design


 I am using a Tag that render the whole questions, can i create another
tag
  that deals with user request?
 
  On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:
 
  No!
 
  This sounds like a simple webapp to me. Just use some Servlet
Container
  (Tomcat) and have all of the presentation (JSP), business and
persistence
  things handled in ONE engine.
 
  - Original Message -
  From: Mohammed Zabin [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Tuesday, June 19, 2007 9:26 AM
  Subject: Design
 
 
   Hi All
  
   I am developing an online exam site as a graduation project. I have
   some
   questions regardsing the design:
  
   1. In such a program which is a web site that introduce some
multiple
   choice
   questions, and shows the result of user answers, DO I HAVE TO USE
EJB??
  
 
 
  -
  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: Design

2007-06-19 Thread ben short

In learning the spring frameworks, or learning any new technology.

On 6/19/07, Mohammed Zabin [EMAIL PROTECTED] wrote:

What learning curve?

On 6/19/07, ben short [EMAIL PROTECTED] wrote:

 Id suggest having a look at the spring web mvc stuff it can help you
 simplify form submissions by mapping request params to objects so you
 don't have to do, although there will be a slight learning curve.

 Just my 2 pence :)

 On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:
  I'd take the approach with Servlets/JSP that handle user inputs. You
 could
  in deed use tags for the inputs and process them with suitable
 controllers
  in the logic tier. May be there are simpler ways to proceed with
  questionaires.
 
 
  - Original Message -
  From: Mohammed Zabin [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Tuesday, June 19, 2007 9:42 AM
  Subject: Re: Design
 
 
  I am using a Tag that render the whole questions, can i create another
 tag
   that deals with user request?
  
   On 6/19/07, Kevin Wilhelm [EMAIL PROTECTED] wrote:
  
   No!
  
   This sounds like a simple webapp to me. Just use some Servlet
 Container
   (Tomcat) and have all of the presentation (JSP), business and
 persistence
   things handled in ONE engine.
  
   - Original Message -
   From: Mohammed Zabin [EMAIL PROTECTED]
   To: Tomcat Users List users@tomcat.apache.org
   Sent: Tuesday, June 19, 2007 9:26 AM
   Subject: Design
  
  
Hi All
   
I am developing an online exam site as a graduation project. I have
some
questions regardsing the design:
   
1. In such a program which is a web site that introduce some
 multiple
choice
questions, and shows the result of user answers, DO I HAVE TO USE
 EJB??
   
  
  
   -
   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: Design

2007-06-19 Thread Pierre Goupil

Hello,

Learning curve means : the time it will take you to learn a new technology.
While learning it, you're not using it, that's the concept.

And yes, definitely, you should learn to use Spring : it's a kind of an
EJB-like service provider, but a lightweight one. As said, it will help you
code your interface with its MVC framework, amongst other things.

http://www.springframework.net

And, no, definitely you don't need EJB : that's a too heavy-weight
technology for such a project. And the learning curve is far more longer.

You can consider Struts as an alternative to Spring if you are only looking
for a view-layer framework :

http://struts.apache.org/

Regards,

Pierre


--
Mon horizon était désormais les pétales courbés,
Ma nouvelle demeure resplendissait de flèches d'herbes folles
Et d'oreillers de pollens odorants.

(Naïmah, le philosophe Fémereif)


too many sessions serving from another context

2007-06-19 Thread Paulo Alvim
Hi again!

We're using TC 5.5.9 with two WARs and the following situation:

/app1/example.jsp
(renders HTML with references to images being served from a servlet in
another application (context):

/app2/myImgs?name=image1.gif
/app2/myImgs?name=image2.gif
/app2/myImgs?name=image3.gif

We're also using 'single singon' because we need it for another reason.

The problem is that TC is creating 1 session for app1 and 3 sessions for
app2 (one per image served)!

I tried TC 6 and it seems that it creates only one session (as we
expected...).

1. Does anyone know if there's bug related to that?
2. Is there a better way to declare specific URLs to not creating new
sessions (ie: filter the myImgs servlet)?

Thanks in advance!

Paulo Alvim
Brazil
( +55 (31) 3213-1019
* [EMAIL PROTECTED]
Powerlogic S.A.





Re: Failed to install Tomcat5 service

2007-06-19 Thread TOM SSEMWOGERERE

I also got a smilar problem. I got it when i tried to
remove version 
5.5.23 and install version 6. Try to reinstall the
previous Tomcat 
version. Then go to C:\Program Files\Apache Software 
Foundation\Tomcat 5.5\bin  and double click on the
file tomcat5 
which is a service runner.

I got this error when trying to install Tomcat 5.5.23
on Windows XP:

 Failed to install Tomcat5 service.
 Check your settings and permissions
 Ignore and continue anyway (not
recommended)?

the above error occurs with these status:
 ..
 tomcat-users.xml written
 Remove folder: C:\Temp\confinstall
 Using Jvm: C:\Program
Files\Java\jre1.5.0_11\bin\client\jvm.dll

I abort the installation at this point.

After searching the Google, I tried to set the
environment variable
TEMP and TMP to C:\Temp, but that doesn't help
either.

When I open the Services (Local) window, I see that
there is a service
named Apache Tomcat (Apache Tomcat 5.5.23 Server -
http://tomcat.apache.org/; ...
I think this service is created but not being remove
when I abort the
Tomcat installation.

Please help, thank you!


--

Hez

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





 

Looking for earth-friendly autos? 
Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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



How can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Prashant Thakkar

Hi All,

I am frequently getting this error in tomcat which stops my tomcat service.
Pl help me its urgent and costing my service as well:

I am getting bellow error in my catalina logs:
Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (250) are currently busy, waiting. Increase maxThreads
(250) or check the servlet status
Thanks in advance
- Prashant Thakkar


Re: How can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 19/06/2007, at 3:25 PM, Prashant Thakkar wrote:
I am frequently getting this error in tomcat which stops my tomcat  
service.

Pl help me its urgent and costing my service as well:

I am getting bellow error in my catalina logs:
Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool  
logFull
SEVERE: All threads (250) are currently busy, waiting. Increase  
maxThreads

(250) or check the servlet status


Hi Prashant,

You may want to increase your 'maxThreads' setting in conf/server.xml

Connector port=8080 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25  
maxSpareThreads=75
   enableLookups=false redirectPort=8443  
acceptCount=100

   connectionTimeout=2 disableUploadTimeout=true /

You may also want to look at why you have 250 connections open at  
once


Based on the question, It sounds like you have an infinite loop  
somewhere in your
application rather than a lot of traffic, causing the threads to lock  
up...


Cheers

Andrew

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFGd9u0W126qUNSzvURAiDKAJ4ujmWo8Mnd8jHGQdZnEqBCcuIaGQCfVD30
oa6A6IWqNscwAtejrIvf0tM=
=VNFN
-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 can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Robert Harper
Do as it says and increase the max threads parameter or manage your threads
better.

Robert S. Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA 84121-7411
(801)265-8800 Ext. 255 
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.

-Original Message-
From: Prashant Thakkar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 7:25 AM
To: users@tomcat.apache.org
Subject: How can i configure tomcat to avoid threads error in tomcat

Hi All,

I am frequently getting this error in tomcat which stops my tomcat service.
Pl help me its urgent and costing my service as well:

I am getting bellow error in my catalina logs:
Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (250) are currently busy, waiting. Increase maxThreads
(250) or check the servlet status
Thanks in advance
- Prashant Thakkar



-
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 can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Prashant Thakkar

Hi,

Thanks,
But this is the clients application which we are running. We dont have the
access to the servlet code. That was the the obvious reason we had increased
the thread limit to 250.

Other thing i would like to know is about the thread pooling. How can i use
this with tomcat 5.0.28
Below is the connector which we are using:

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector port=8080
  maxThreads=250 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=0
  disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 --

!-- Note : To use gzip compression you could set the following properties :

compression=on
compressionMinSize=2048
noCompressionUserAgents=gozilla, traviata
compressableMimeType=text/html,text/xml
--

!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --
!--
Connector port=8443
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
  clientAuth=false sslProtocol=TLS /
--

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector port=8009
  enableLookups=false redirectPort=8443 debug=0
  protocol=AJP/1.3 /

!-- Define a Proxied HTTP/1.1 Connector on port 8082 --
!-- See proxy documentation for more information about using this. --
!--
Connector port=8082
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false
  acceptCount=100 debug=0 connectionTimeout=2
  proxyPort=80 disableUploadTimeout=true /
--

Thanks and Regards,
- Prashant Thakkar

On 6/19/07, Robert Harper [EMAIL PROTECTED] wrote:


Do as it says and increase the max threads parameter or manage your
threads
better.

Robert S. Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA 84121-7411
(801)265-8800 Ext. 255
FAX (801)265-8880


This e-mail is intended only for the addressee and may contain
confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is
the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.

-Original Message-
From: Prashant Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 19, 2007 7:25 AM
To: users@tomcat.apache.org
Subject: How can i configure tomcat to avoid threads error in tomcat

Hi All,

I am frequently getting this error in tomcat which stops my tomcat
service.
Pl help me its urgent and costing my service as well:

I am getting bellow error in my catalina logs:
Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (250) are currently busy, waiting. Increase maxThreads
(250) or check the servlet status
Thanks in advance
- Prashant Thakkar



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





--
Prashant Thakkar


load balancing

2007-06-19 Thread Asensio, Rodrigo
I'm trying to implement a load balancing solution with tomcat55 with an
ubuntu704 as load balancer with 3 legacy win2003 tomcat55 behind. 
I found a great article  published in onjava.com
(http://onjava/com/lpt/a/4702) that guides you thru the process.

I also thinked about use tomcat6 in the ubuntu, but my surprise was
there is no load balancer webapp anymore! I'm I screwed ? My only option
is mod_proxy or jk connectors if I use tomcat6 ??
Thanks!
R


 
---
Rodrigo Asensio
http://www.rodrigoasensio.com
Fuel Management Services
Gilbarco Veeder Root
phone: +1 336 547 5023
email: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

-
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 can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Andrew Miehs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 19/06/2007, at 4:45 PM, Prashant Thakkar wrote:


Hi,

Thanks,
But this is the clients application which we are running. We dont  
have the
access to the servlet code. That was the the obvious reason we had  
increased

the thread limit to 250.


Is the server running a lot of traffic? Then you may want to increase  
this

even further.

Is the CPU load of the server at 100%? If so, the clients software  
probably

has an infinite loop - and no amount of config 'tuning' will fix this.


Other thing i would like to know is about the thread pooling. How  
can i use

this with tomcat 5.0.28


What do you mean exactly by thread pooling?

Andrew
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFGd+3OW126qUNSzvURAnt7AJ9ciXedLgRkgMSiEELTcfalAaPFOwCfR81w
/N4rNbJfMiZ1FKJLIGILbxI=
=6+1V
-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 can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Brantley Hobbs

Prashant,

Unless I'm load-testing, the only time I've seen thread counts that
high is when something is wrong with the app, and it's usually a
database connection that hasn't been closed.  Check the number of
database connections in use out of the pool (this is typically
something that you'd do on the database server itself; I don't know of
any mechanism in Tomcat to get that measurement).  If that is also an
extraordinarily large number, then you might consider checking for
database connections that haven't been closed.  For typical sites, you
really don't usually need a database connection pool any larger than a
few tens of connections.

What happens is that the database connection pool (or the database
server itself) exhausts its supply of connections, and new requests
that come in to Tomcat queue until more connections come open or the
connection requests time out.

Good luck.

B.



Prashant Thakkar wrote:

Hi,

Thanks,
But this is the clients application which we are running. We dont have 
the
access to the servlet code. That was the the obvious reason we had 
increased

the thread limit to 250.

Other thing i would like to know is about the thread pooling. How can 
i use

this with tomcat 5.0.28
Below is the connector which we are using:

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
Connector port=8080
  maxThreads=250 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=0
  disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 --

!-- Note : To use gzip compression you could set the following 
properties :


compression=on
compressionMinSize=2048
noCompressionUserAgents=gozilla, traviata
compressableMimeType=text/html,text/xml
--

!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --
!--
Connector port=8443
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
  clientAuth=false sslProtocol=TLS /
--

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector port=8009
  enableLookups=false redirectPort=8443 debug=0
  protocol=AJP/1.3 /

!-- Define a Proxied HTTP/1.1 Connector on port 8082 --
!-- See proxy documentation for more information about using this. --
!--
Connector port=8082
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false
  acceptCount=100 debug=0 connectionTimeout=2
  proxyPort=80 disableUploadTimeout=true /
--

Thanks and Regards,
- Prashant Thakkar

On 6/19/07, Robert Harper [EMAIL PROTECTED] wrote:


Do as it says and increase the max threads parameter or manage your
threads
better.

Robert S. Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA 84121-7411
(801)265-8800 Ext. 255
FAX (801)265-8880


This e-mail is intended only for the addressee and may contain
confidential
and/or privileged information. Any review, retransmission, or action 
taken

upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is
the
responsibility of the recipient to ensure that anything received or 
opened
is virus free. No responsibility is accepted by IAT for any loss or 
damage

in the event that such a virus or defect exists.

-Original Message-
From: Prashant Thakkar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 19, 2007 7:25 AM
To: users@tomcat.apache.org
Subject: How can i configure tomcat to avoid threads error in tomcat

Hi All,

I am frequently getting this error in tomcat which stops my tomcat
service.
Pl help me its urgent and costing my service as well:

I am getting bellow error in my catalina logs:
Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool 
logFull
SEVERE: All threads (250) are currently busy, waiting. Increase 
maxThreads

(250) or check the servlet status
Thanks in advance
- Prashant Thakkar



-
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: How can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Prashant Thakkar

Hi,

I read an abt thread pooling on below url:
http://www.hp.com/products1/unix/webservers/apache/techtips/tomcat.html

Thanks and Regards,
-Prashant Thakkar


On 6/19/07, Andrew Miehs [EMAIL PROTECTED] wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 19/06/2007, at 4:45 PM, Prashant Thakkar wrote:

 Hi,

 Thanks,
 But this is the clients application which we are running. We dont
 have the
 access to the servlet code. That was the the obvious reason we had
 increased
 the thread limit to 250.

Is the server running a lot of traffic? Then you may want to increase
this
even further.

Is the CPU load of the server at 100%? If so, the clients software
probably
has an infinite loop - and no amount of config 'tuning' will fix this.


 Other thing i would like to know is about the thread pooling. How
 can i use
 this with tomcat 5.0.28

What do you mean exactly by thread pooling?

Andrew
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFGd+3OW126qUNSzvURAnt7AJ9ciXedLgRkgMSiEELTcfalAaPFOwCfR81w
/N4rNbJfMiZ1FKJLIGILbxI=
=6+1V
-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]





--
Prashant Thakkar


Re: How can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Prashant Thakkar

Hi,

The application does not make database connection. Instead makes and http
request to web server to fetch content.

This web server is heavily loaded with traffic. The high end web server
configuration and optimization handles all the request quite efficiently.
(No doubt on the web server processing speed)

Thanks and Regards,
-Prashant Thakkar.

On 6/19/07, Brantley Hobbs [EMAIL PROTECTED] wrote:


Prashant,

Unless I'm load-testing, the only time I've seen thread counts that
high is when something is wrong with the app, and it's usually a
database connection that hasn't been closed.  Check the number of
database connections in use out of the pool (this is typically
something that you'd do on the database server itself; I don't know of
any mechanism in Tomcat to get that measurement).  If that is also an
extraordinarily large number, then you might consider checking for
database connections that haven't been closed.  For typical sites, you
really don't usually need a database connection pool any larger than a
few tens of connections.

What happens is that the database connection pool (or the database
server itself) exhausts its supply of connections, and new requests
that come in to Tomcat queue until more connections come open or the
connection requests time out.

Good luck.

B.



Prashant Thakkar wrote:
 Hi,

 Thanks,
 But this is the clients application which we are running. We dont have
 the
 access to the servlet code. That was the the obvious reason we had
 increased
 the thread limit to 250.

 Other thing i would like to know is about the thread pooling. How can
 i use
 this with tomcat 5.0.28
 Below is the connector which we are using:

 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
 Connector port=8080
   maxThreads=250 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   debug=0 connectionTimeout=0
   disableUploadTimeout=true /
 !-- Note : To disable connection timeouts, set connectionTimeout value
 to 0 --

 !-- Note : To use gzip compression you could set the following
 properties :

 compression=on
 compressionMinSize=2048
 noCompressionUserAgents=gozilla, traviata
 compressableMimeType=text/html,text/xml
 --

 !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --
 !--
 Connector port=8443
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https secure=true
   clientAuth=false sslProtocol=TLS /
 --

 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
 Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /

 !-- Define a Proxied HTTP/1.1 Connector on port 8082 --
 !-- See proxy documentation for more information about using this. --
 !--
 Connector port=8082
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false
   acceptCount=100 debug=0 connectionTimeout=2
   proxyPort=80 disableUploadTimeout=true /
 --

 Thanks and Regards,
 - Prashant Thakkar

 On 6/19/07, Robert Harper [EMAIL PROTECTED] wrote:

 Do as it says and increase the max threads parameter or manage your
 threads
 better.

 Robert S. Harper
 Senior Engineer
 Information Access Technology, Inc.
 1100 East 6600 South, Suite 300
 Salt Lake City Utah USA 84121-7411
 (801)265-8800 Ext. 255
 FAX (801)265-8880


 This e-mail is intended only for the addressee and may contain
 confidential
 and/or privileged information. Any review, retransmission, or action
 taken
 upon this information by persons other than the intended recipient is
 prohibited by law. If you received this communication in error, please
 contact us immediately at 801-265-8800. Although this e-mail and any
 attachments are believed to be free of any virus or other defect, it is
 the
 responsibility of the recipient to ensure that anything received or
 opened
 is virus free. No responsibility is accepted by IAT for any loss or
 damage
 in the event that such a virus or defect exists.

 -Original Message-
 From: Prashant Thakkar [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 19, 2007 7:25 AM
 To: users@tomcat.apache.org
 Subject: How can i configure tomcat to avoid threads error in tomcat

 Hi All,

 I am frequently getting this error in tomcat which stops my tomcat
 service.
 Pl help me its urgent and costing my service as well:

 I am getting bellow error in my catalina logs:
 Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool
 logFull
 SEVERE: All threads (250) are currently busy, waiting. Increase
 maxThreads
 (250) or check the servlet status
 Thanks in advance
 - Prashant Thakkar



 -
 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: too many sessions serving from another context

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paulo,

Paulo Alvim wrote:
 /app1/example.jsp
 (renders HTML with references to images being served from a servlet in
 another application (context):
 
 /app2/myImgs?name=image1.gif
 /app2/myImgs?name=image2.gif
 /app2/myImgs?name=image3.gif
 
 We're also using 'single singon' because we need it for another reason.
 
 The problem is that TC is creating 1 session for app1 and 3 sessions for
 app2 (one per image served)!

Often this happens because your login page does not correctly pass URLs
through HttpServletResponse.encodeURL. Make sure that URLs (even to
static content) contain ;jsessionid unless you are absolutely sure
that your users will always have cookies available. Otherwise, you might
get a new session for every single request.

 2. Is there a better way to declare specific URLs to not creating new
 sessions (ie: filter the myImgs servlet)?

I don't believe there is any way /at all/ to do this, unless you put a
web server in front of Tomcat to serve static content (which is not
necessary at all... just an option).

- -chris

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

iD8DBQFGeAgp9CaO5/Lv0PARAiLSAJ9/2Oc8ohehoQb36TexDv1GydkHqgCgii9N
V0APPeYV+kGTpary2KURfSE=
=g3qj
-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: Data Sources Overwritten

2007-06-19 Thread ScottAnders
Chris,

Using your method of including the context within the application how do
you adjust for different environments (dev vs production)?  Different
WARs?  

How we do it now is have a context.xml.default included in the
conf/Catalina/NameOfYourHostInServer.xml/ directory where the JNDI
datasource is defined.  That way we can take the exact same WAR that was
deployed on dev and deploy it to production (since they point to
different DBs and thus have different datasources).  

Scott

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 10:35 AM
To: Tomcat Users List
Subject: Re: Data Sources Overwritten

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff,
You have not followed my suggestions:

1. Remove all JNDI datasource information from server.xml and never put
it back in.

2. Use a META-INF/context.xml file and bundle it into your WAR file for
deployment. context.xml should include 100% of the JNDI data source
configuration that you need for your app. Consider using Resource and
specifying everything instead of trying to use Resource /and/
ResourceParams.

3. Stop using the Manager to do anything at all.

This will allow your application to setup its own data source instead of
relying on the server to have it ready to go before deployment.
Re-deployments will re-setup the connection, just as it was intended.

This is all documented (poorly, I might add), on this page:
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.h
tml

Under MySQL DBCP Example / 2. server.xml configuration, replace the
direction to put the configuration into server.xml inside your
Context element with into context.xml inside your Context
element.

- -chris

Jeffrey C. Baldwin wrote:
 Also, here is a copy of my server.xml.
 
 ?xml version='1.0' encoding='utf-8'?
 Server
   Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener/
   Listener

className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/

   GlobalNamingResources
 Environment name=simpleValue type=java.lang.Integer
value=30/
 Resource auth=Container description=User database that can be
 updated and saved name=UserDatabase
 type=org.apache.catalina.UserDatabase/
 ResourceParams name=UserDatabase
   parameter
 namefactory/name

valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams
   /GlobalNamingResources
   Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
 disableUploadTimeout=true port=8080 redirectPort=8443
 maxSpareThreads=75 maxThreads=150
 minSpareThreads=25
 /Connector
 Connector port=8009 protocol=AJP/1.3
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 redirectPort=8443
 /Connector
 Engine defaultHost=localhost name=Catalina
 Host name=localhost debug=0 appBase=webapps unpackWARs=true
 autoDeploy=true xmlValidation=false xmlNamespaceAware=false
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=localhost_access_log. suffix=.txt
 pattern=common resolveHosts=fal
 se /
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs prefix=localhost_log. suffix=.txt
timestamp=true /
 Context debug=0 docBase=mrs2 path=/mrs2 reloadable=true
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_mrs2_log. suffix=.txt timestamp=true/
Resource name=jdbc/ZosDataSource
auth=Container
 type=javax.sql.DataSource/Resource
ResourceParams name=jdbc/ZosDataSource
parameter
namefactory/name
 
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value5/value
/parameter
parameter
namemaxIdle/name
value1/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
valueTS59MRS/value
/parameter
parameter
namepassword/name
valuepassword/value
/parameter
parameter
namedriverClassName/name
valuecom.ibm.db2.jcc.DB2Driver/value
/parameter
parameter
nameurl/name
 
 valuejdbc:db2://123.456.789.120:5019/NETSNDB01/value  !--
 production 

Re: Invalid Content-Length error for the size greater than

2007-06-19 Thread Rainer Jung
I committed a patch for mod_jk using 64 Bit unsigned ints for content 
length. This patch still needs testing. I only verified, that it does 
not break normal operation (at least not on Solaris with Apache 2.2).


I don't know, if anyone of those who were working on this bug until now 
(Bill? Mark? Chris? Daniel) already have a good test setup including 
Bills patch for the JK connector. It would be nice, if you could report 
your findings. I included a download URL in BZ 42608, where you can find 
a ready to build mod_jk tarball.


I tried to adjust all places, including Apache 1.3, 2.x, IIS and 
Netscape, also the byte counters in the load balancer and AJP12/AJP13.


For the web servers I actually don't know, if we can really get huge 
byte counts back, e.g. if there is a huge upload, or if they already 
have a 32Bit problem decoding the sizes.


We would need to test separately for *nix and Win, because the jk 64Bit 
unsigned uses different types and formatting characters for those platforms.


Regards,

Rainer

Bill Barker wrote:
Of course both Mladen and Rainer are on [EMAIL PROTECTED], so they have seen the 
traffic on the bug report (as are a couple of the other mod_proxy_ajp 
developers).


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



Tomcat and commons logging

2007-06-19 Thread Diego Rodríguez Martín

Hi,

   I have some problems using commons logging with log4j and tomcat, 
related to classloading. After some google searching, I have come to 
this article by one of the log4j experts


   http://www.qos.ch/logging/classloader.jsp

   In this article, it is explained how commons-logging (1.0.3) can 
lead to some classloading problems. There is a solution at the end of 
the article, but for Tomcat 5.0.x.


   I'm using Tomcat 6.0.13, configured to use log4j as it is explained 
in the docs (http://tomcat.apache.org/tomcat-6.0-doc/logging.html) and I 
have this problem.


   My questions is:

  The article says that I have to use version 1.0.4 or later but I 
haven't found which version it is used by Tomcat,
  
   which version of commons-logging is built in the extras in Tomcat 6?


 


--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.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: Data Sources Overwritten

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Scott,

[EMAIL PROTECTED] wrote:
 Using your method of including the context within the application how do
 you adjust for different environments (dev vs production)?  Different
 WARs?

We use ant for deployment, and we have a release type. The release
type dictates the directory whence config files come, so our WARs are
built to contain the context.xml file (as well as other files)
appropriate for the target environment.

 How we do it now is have a context.xml.default included in the
 conf/Catalina/NameOfYourHostInServer.xml/ directory where the JNDI
 datasource is defined.  That way we can take the exact same WAR that was
 deployed on dev and deploy it to production (since they point to
 different DBs and thus have different datasources).  

My preference is to avoid making any changes at all to a stock Tomcat
installation. Once installed (as root), the only change we make to the
Tomcat installation directory is to make some files (web.xml, for
instance) to be world-readable.

Everything else is done as a non-privileged user with a separate
CATALINA_HOME, config files, and deployment directory. We never mess
with conf/Catalina or its contents. All applications are completely
self-contained within their WAR files. This gives us the least
resistance when it comes to deployment in any environment.

Hope that helps,
- -chris

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

iD8DBQFGeA9Z9CaO5/Lv0PARAgz2AKCVYFX95xYNAj015BsCHJXE9gaY3ACeK5om
Sqz5uM8YzHYOAorkUFmQCRM=
=z40z
-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: Design

2007-06-19 Thread Nelson, Tracy M.
| From: Pierre Goupil [mailto:[EMAIL PROTECTED]
| Sent: Tuesday, 19 June, 2007 05:59
| 
| And, no, definitely you don't need EJB : that's a too heavy-weight
| technology for such a project. And the learning curve is far more
longer.

Actually, with annotations and a supportive IDE (NetBeans, and probably
Eclipse as well), EJBs aren't too terribly difficult anymore.  You don't
have to worry about generating stubs and keeping your deployment
descriptors in sync anymore, pretty much all you have to do is specify
whether you want local and/or remote access.  They're not painless, but
they are friendlier.

That said, I agree that they're too heavyweight for this application.
I'd stick with Struts for handling the form submissions, and look into
Tomcat's connection pooling if database access is required.  This kind
of app wouldn't take an experienced web developer more than a couple of
days to write, after the requirements were nailed down.  It actually
sounds like an excellent extended example for learning web app
development.
-

The information contained in this message is confidential
proprietary property of Nelnet, Inc. and its affiliated 
companies (Nelnet) and is intended for the recipient only.
Any reproduction, forwarding, or copying without the express
permission of Nelnet is strictly prohibited. If you have
received this communication in error, please notify us
immediately by replying to this e-mail.


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



Tomcat 6.0.10 DataSourceRealm says Name jdbc is not bound in this Context

2007-06-19 Thread Michael Wesner
I am sure someone has run across this before.  I appreciate any help  
or pointers to other threads about this.


in the logs I get this error:

un 19, 2007 1:01:24 PM org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
	javax.naming.NameNotFoundException: Name jdbc is not bound in this  
Context



What am I doing wrong?



I have a default server.xml.   I configure everything using   META- 
INF/context.xml  and WEB-INF/web.xml



context.xml:

?xml version=1.0 encoding=UTF-8?
Context path=apppath docBase=appname reloadable=true  
antiJARLocking=true

Resource auth=Container
driverClassName=org.gjt.mm.mysql.Driver
maxActive=10
maxIdle=5
name=jdbc/gateway
password=apassword
type=javax.sql.DataSource
url=jdbc:mysql://localhost:3306/gateway?autoReconnect=true
username=myusername/
Realm className=org.apache.catalina.realm.DataSourceRealm debug=99
   dataSourceName=jdbc/gateway
   userTable=user
   userNameCol=Username
   userCredCol=Password
   userRoleTable=loginroleview
   roleNameCol=RoleName/
/Context

web.xml:  (has other things, but here is the auth part)

security-constraint
web-resource-collection
web-resource-nameSecured Area/web-resource-name
url-pattern/secure/*/url-pattern
/web-resource-collection
auth-constraint
role-nameAdministrator/role-name
role-nameUser/role-name
/auth-constraint
/security-constraint


login-config
auth-methodBASIC/auth-method
realm-nameGateway Secure Area/realm-name
/login-config

security-role
description
The role that is required
/description
role-nameAdministrator/role-name
/security-role
security-role
description
The role that is required
/description
role-nameUser/role-name
/security-role
/web-app






Re: Tomcat 6.0.10 DataSourceRealm says Name jdbc is not bound in this Context

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael,

Michael Wesner wrote:
 I am sure someone has run across this before.  I appreciate any help or
 pointers to other threads about this.

Ooh! So close...

What you are looking for is documented on this page (and unfortunately
nowhere else, AFAICT):
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html

If you look under the DataSourceRealm section, you'll see that you
need to set the localDataSource attribute to true in order to use a
datasource defined in the Context element when you want to use a
Realm with that data source. Otherwise, it will look for a global
JNDI datasource.

- -chris

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

iD8DBQFGeCkC9CaO5/Lv0PARAspvAJ4zPNV8wvGYgZu7b3Emyn6I310NlACeN4dl
wSTYi03A3hPndArNWIjUIZQ=
=V2RF
-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]



webapp security in tomcat

2007-06-19 Thread Herman Schultz

Hi,

Can you please tell me if I can configure tomcat to let a range of IP
address to access 1 web app hosted by tomcat, while another set of IP
address to access another web app hosted by the same tomcat?

Thank you.


how to flush cache of authenticated users

2007-06-19 Thread Ken Moore
The Realm Configuration HOW-TO doc (
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html  ) says that:
Once a user has been authenticated, the user (and his or her
associated roles) are cached within Tomcat for the duration of the
user's login. and for BASIC authentication, that means until the
user closes their browser

We use basic authentication for web services. I'd like to flush the
cache when the password is changed.

I've been looking through the doc and code and I've not yet found the
cache or a way to flush it.

Anyone know where it is?



Re: webapp security in tomcat

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Herman,

Herman Schultz wrote:
 Can you please tell me if I can configure tomcat to let a range of IP
 address to access 1 web app hosted by tomcat, while another set of IP
 address to access another web app hosted by the same tomcat?

You're looking for a remote address valve. Check out the documentation
for this type of valve on this page:
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

Since you can configure any valve within a Context element, you /can/
control each of your web applications separately.

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

iD8DBQFGeEk99CaO5/Lv0PARAnR8AKC3ySjKZexZRNJLT0gZ2bwuEoQwewCgu8rz
kVMh4U3i7nuPsTqhGW81/t4=
=Au/O
-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 flush cache of authenticated users

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ken,

Ken Moore wrote:
 We use basic authentication for web services. I'd like to flush the
 cache when the password is changed.

Do you mean that you want to force your users to re-login when they
change their passwords?

 I've been looking through the doc and code and I've not yet found the
 cache or a way to flush it.

The cached value is really associated with the session. So, if you
invalidate the session, you will destroy this cache. Since the browser
will continue to send the (old) HTTP AUTH header, Tomcat will likely
react by vetoing the re-login and respond with a WWW-Authenticate
response header. The browser will then ask the user for credentials (the
familiar pop-up username/password dialog) and the user should be
re-logged-in.

If this isn't happening smoothly, you can issue a 401 response and
include a WWW-Authenticate header manually (along with a session
invalidation) to attempt to force a re-request of the user's credentials.

- -chris



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

iD8DBQFGeEqF9CaO5/Lv0PARAnaDAJ9l8d8w9RS9GyoiauS854v1DzIbaACggkwA
J9jFbniNwNu6yQP82duWhyk=
=icOa
-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]



Cannot load customized valve and realm from META-INF/context.xml

2007-06-19 Thread Zhiyong Liu
I am using Tomcat 5.0.28 and trying to get my customized valve and realm 
work but no luck with the following steps.
(1) put the jar file containing MyRealm.class and MyValve.class into 
webapps/myapp/WEB-INF/lib;
(2) created a context.xml file in webapps/myapp/META-INF with the 
following content

?xml version=1.0 encoding=utf-8 ?
 Context
  Valve className=com.mycompany.myapp.MyValve /
  Realm className=com.mycompany.myapp.MyRealm /
 /Context
(3)Then I restarted Tomcat and debugged it but only found MyValve and 
MyRealm were not called at all.


I tried to move the context.html to conf/Catalina/localhost and the jar 
file to server/lib then everything went well. But this is not what I 
want since the customized Realm and Valve are specific to my application.


I am new to Tomcat and start to get frustrated with this. I thought it 
should be easy but after googled a lot I still cannot figure out a 
solution. Any tip will be highly appreciated


Zhiyong

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



RES: too many sessions serving from another context

2007-06-19 Thread Paulo Alvim
Thanks Cris,

But in the first case I can reproduce the problem in my computer, running
with cookies...

-Mensagem original-
De: Christopher Schultz [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 19 de junho de 2007 13:45
Para: Tomcat Users List
Assunto: Re: too many sessions serving from another context


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paulo,

Paulo Alvim wrote:
 /app1/example.jsp
 (renders HTML with references to images being served from a servlet in
 another application (context):

 /app2/myImgs?name=image1.gif
 /app2/myImgs?name=image2.gif
 /app2/myImgs?name=image3.gif

 We're also using 'single singon' because we need it for another reason.

 The problem is that TC is creating 1 session for app1 and 3 sessions for
 app2 (one per image served)!

Often this happens because your login page does not correctly pass URLs
through HttpServletResponse.encodeURL. Make sure that URLs (even to
static content) contain ;jsessionid unless you are absolutely sure
that your users will always have cookies available. Otherwise, you might
get a new session for every single request.

 2. Is there a better way to declare specific URLs to not creating new
 sessions (ie: filter the myImgs servlet)?

I don't believe there is any way /at all/ to do this, unless you put a
web server in front of Tomcat to serve static content (which is not
necessary at all... just an option).

- -chris

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

iD8DBQFGeAgp9CaO5/Lv0PARAiLSAJ9/2Oc8ohehoQb36TexDv1GydkHqgCgii9N
V0APPeYV+kGTpary2KURfSE=
=g3qj
-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: Cannot load customized valve and realm from META-INF/context.xml

2007-06-19 Thread Caldarale, Charles R
 From: Zhiyong Liu [mailto:[EMAIL PROTECTED] 
 Subject: Cannot load customized valve and realm from 
 META-INF/context.xml
 
 I tried to move the context.html to conf/Catalina/localhost 
 and the jar file to server/lib then everything went well.

Is it possible you already had a myapp.xml in conf/Catalina/localhost?
(Tomcat sometimes creates one there during deployment.)  If so, that
would have overridden the webapps/myapp/META-INF/context.xml values.

 - 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: how to flush cache of authenticated users

2007-06-19 Thread Ken Moore
Hi Christopher,

Thanks! I thought it might be stored in the session.

Our web app mainly supports web services. We are pretty much stateless
on the app server and don't have the notion of logging in. We don't
explicitly do anything with sessions.

Instead, we use basic authentication and the credentials are supplied
with each web service request, in the standard http headers. The clients
are not browsers, they are other applications.

If a password is changed, we need to ensure that any web service
requests sent in with old password are rejected.

I wonder if I've misunderstood the nature of the caching mentioned in
the realm how-to doc. It sounds as if the login module might be invoked
for each web service request. At any rate, it is time for me to do some
more digging and investigation.

Thanks again.


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 2:29 PM
To: Tomcat Users List
Subject: Re: how to flush cache of authenticated users

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ken,

Ken Moore wrote:
 We use basic authentication for web services. I'd like to flush the
 cache when the password is changed.

Do you mean that you want to force your users to re-login when they
change their passwords?

 I've been looking through the doc and code and I've not yet found the
 cache or a way to flush it.

The cached value is really associated with the session. So, if you
invalidate the session, you will destroy this cache. Since the browser
will continue to send the (old) HTTP AUTH header, Tomcat will likely
react by vetoing the re-login and respond with a WWW-Authenticate
response header. The browser will then ask the user for credentials (the
familiar pop-up username/password dialog) and the user should be
re-logged-in.

If this isn't happening smoothly, you can issue a 401 response and
include a WWW-Authenticate header manually (along with a session
invalidation) to attempt to force a re-request of the user's
credentials.

- -chris



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

iD8DBQFGeEqF9CaO5/Lv0PARAnaDAJ9l8d8w9RS9GyoiauS854v1DzIbaACggkwA
J9jFbniNwNu6yQP82duWhyk=
=icOa
-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: how to flush cache of authenticated users

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ken,

Ken Moore wrote:
 Thanks! I thought it might be stored in the session.

The servlet specification does not dictate where this information is
stored. Since the spec does not state this, Tomcat intentionally does
not store the information in the session. But you could expect that a
session is more or less directly related to this information.

 Our web app mainly supports web services. We are pretty much stateless
 on the app server and don't have the notion of logging in. We don't
 explicitly do anything with sessions.

It is very possible that sessions are being used without your knowledge.
For instance, Tomcat /may/ use a session so that your credentials work.
It may also use a JSESSIONID cookie without an actual session or
something else entirely. JSPs and some other components can sometimes
inadvertently create sessions. You might consider creating an
HttpSessionListener to log session creations (with a stack trace) to see
where they might be being created, if at all.

 Instead, we use basic authentication and the credentials are supplied
 with each web service request, in the standard http headers. The clients
 are not browsers, they are other applications.
 
 If a password is changed, we need to ensure that any web service
 requests sent in with old password are rejected.

This makes a lot more sense.

 I wonder if I've misunderstood the nature of the caching mentioned in
 the realm how-to doc. It sounds as if the login module might be invoked
 for each web service request. At any rate, it is time for me to do some
 more digging and investigation.

Generally, Tomcat will only validate the credentials once for a
particular session. The WWW-Authenticate header will probably be
compared to the cached value that includes a flag that says yep,
these creds have already been validated, so validation only occurs that
one time.

If you are issuing a WWW-Authenticate header to a web service, there's
nothing for it to ask of a user, so my suggestion is probably worthless
for your needs. Invalidating the session object itself /should/ work,
but if HttpServletRequest.getSession(false) returns null, then I'm out
of ideas ;)

Good luck.

- -chris

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

iD8DBQFGeFTW9CaO5/Lv0PARAnRtAJ9kVmTO6bLTp6OzvNPWEqDNUAPh2ACdGpks
cuneNLDe87cKEOjEuKJwBcg=
=8kiy
-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]



JNDI Tomcat

2007-06-19 Thread Tom Miller
Any one have a better document on howto on JNDI  Tomcat 
than this link
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-
examples-howto.html?

I am trying to set up JNDI to work with Tomcat 5.5.7
I had followed instructions on apache.org but have not able 
to get it work yet.  

Any hints will be appreciate.

Thank you.

Tom



 Original message 
Date: Tue, 19 Jun 2007 12:35:10 -0400
From: Christopher Schultz [EMAIL PROTECTED]  
Subject: Re: Data Sources Overwritten  
To: Tomcat Users List users@tomcat.apache.org

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff,
You have not followed my suggestions:

1. Remove all JNDI datasource information from server.xml 
and never put
it back in.

2. Use a META-INF/context.xml file and bundle it into your 
WAR file for
deployment. context.xml should include 100% of the JNDI 
data source
configuration that you need for your app. Consider using 
Resource and
specifying everything instead of trying to use 
Resource /and/
ResourceParams.

3. Stop using the Manager to do anything at all.

This will allow your application to setup its own data 
source instead of
relying on the server to have it ready to go before 
deployment.
Re-deployments will re-setup the connection, just as it was 
intended.

This is all documented (poorly, I might add), on this page:
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-
examples-howto.html

Under MySQL DBCP Example / 2. server.xml configuration, 
replace the
direction to put the configuration into server.xml inside 
your
Context element with into context.xml inside your 
Context element.

- -chris

Jeffrey C. Baldwin wrote:
 Also, here is a copy of my server.xml.
 
 ?xml version='1.0' encoding='utf-8'?
 Server
   Listener 
className=org.apache.catalina.mbeans.ServerLifecycleListener
/
   Listener
 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycl
eListener/
   GlobalNamingResources
 Environment name=simpleValue 
type=java.lang.Integer value=30/
 Resource auth=Container description=User database 
that can be
 updated and saved name=UserDatabase
 type=org.apache.catalina.UserDatabase/
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/v
alue
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams
   /GlobalNamingResources
   Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
 disableUploadTimeout=true port=8080 
redirectPort=8443
 maxSpareThreads=75 maxThreads=150
 minSpareThreads=25
 /Connector
 Connector port=8009 protocol=AJP/1.3
 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandle
r
 redirectPort=8443
 /Connector
 Engine defaultHost=localhost name=Catalina
 Host name=localhost debug=0 appBase=webapps 
unpackWARs=true
 autoDeploy=true xmlValidation=false 
xmlNamespaceAware=false
 Valve 
className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=localhost_access_log. 
suffix=.txt
 pattern=common resolveHosts=fal
 se /
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs prefix=localhost_log. suffix=.txt 
timestamp=true /
 Context debug=0 docBase=mrs2 path=/mrs2 
reloadable=true
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_mrs2_log. suffix=.txt 
timestamp=true/
Resource name=jdbc/ZosDataSource 
auth=Container
 type=javax.sql.DataSource/Resource
ResourceParams 
name=jdbc/ZosDataSource
parameter
namefactory/name
 
 
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value5/value
/parameter
parameter
namemaxIdle/name
value1/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
valueTS59MRS/value
/parameter
parameter
namepassword/name
valuepassword/value
/parameter
parameter
namedriverClassName/name

valuecom.ibm.db2.jcc.DB2Driver/value
/parameter
parameter
nameurl/name
 
 valuejdbc:db2://123.456.789.120:5019/NETSNDB01/value  
!--
 production 123.456.789.120:5019/NETSNDB01 --
/parameter

Re: JNDI Tomcat

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tom,

1. DO NOT hijack threads.
2. DO post the things you have already tried.

- -chris

Tom Miller wrote:
 Any one have a better document on howto on JNDI  Tomcat 
 than this link
 http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-
 examples-howto.html?
 
 I am trying to set up JNDI to work with Tomcat 5.5.7
 I had followed instructions on apache.org but have not able 
 to get it work yet.  
 
 Any hints will be appreciate.
 
 Thank you.
 
 Tom
 
 
 
  Original message 
 Date: Tue, 19 Jun 2007 12:35:10 -0400
 From: Christopher Schultz [EMAIL PROTECTED]  
 Subject: Re: Data Sources Overwritten  
 To: Tomcat Users List users@tomcat.apache.org

 Jeff,
 You have not followed my suggestions:
 
 1. Remove all JNDI datasource information from server.xml 
 and never put
 it back in.
 
 2. Use a META-INF/context.xml file and bundle it into your 
 WAR file for
 deployment. context.xml should include 100% of the JNDI 
 data source
 configuration that you need for your app. Consider using 
 Resource and
 specifying everything instead of trying to use 
 Resource /and/
 ResourceParams.
 
 3. Stop using the Manager to do anything at all.
 
 This will allow your application to setup its own data 
 source instead of
 relying on the server to have it ready to go before 
 deployment.
 Re-deployments will re-setup the connection, just as it was 
 intended.
 This is all documented (poorly, I might add), on this page:
 http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-
 examples-howto.html
 Under MySQL DBCP Example / 2. server.xml configuration, 
 replace the
 direction to put the configuration into server.xml inside 
 your
 Context element with into context.xml inside your 
 Context element.
 -chris
 
 Jeffrey C. Baldwin wrote:
 Also, here is a copy of my server.xml.

 ?xml version='1.0' encoding='utf-8'?
 Server
   Listener 
 className=org.apache.catalina.mbeans.ServerLifecycleListener
 /
   Listener

 className=org.apache.catalina.mbeans.GlobalResourcesLifecycl
 eListener/
   GlobalNamingResources
 Environment name=simpleValue 
 type=java.lang.Integer value=30/
 Resource auth=Container description=User database 
 that can be
 updated and saved name=UserDatabase
 type=org.apache.catalina.UserDatabase/
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 
 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/v
 alue
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams
   /GlobalNamingResources
   Service name=Catalina
 Connector acceptCount=100 connectionTimeout=2
 disableUploadTimeout=true port=8080 
 redirectPort=8443
 maxSpareThreads=75 maxThreads=150
 minSpareThreads=25
 /Connector
 Connector port=8009 protocol=AJP/1.3

 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandle
 r
 redirectPort=8443
 /Connector
 Engine defaultHost=localhost name=Catalina
 Host name=localhost debug=0 appBase=webapps 
 unpackWARs=true
 autoDeploy=true xmlValidation=false 
 xmlNamespaceAware=false
 Valve 
 className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=localhost_access_log. 
 suffix=.txt
 pattern=common resolveHosts=fal
 se /
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs prefix=localhost_log. suffix=.txt 
 timestamp=true /
 Context debug=0 docBase=mrs2 path=/mrs2 
 reloadable=true
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_mrs2_log. suffix=.txt 
 timestamp=true/
Resource name=jdbc/ZosDataSource 
 auth=Container
 type=javax.sql.DataSource/Resource
ResourceParams 
 name=jdbc/ZosDataSource
parameter
namefactory/name


 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value5/value
/parameter
parameter
namemaxIdle/name
value1/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
valueTS59MRS/value
/parameter
parameter
namepassword/name
valuepassword/value
/parameter
parameter
namedriverClassName/name

 valuecom.ibm.db2.jcc.DB2Driver/value
/parameter
parameter

Re: Cannot load customized valve and realm from META-INF/context.xml

2007-06-19 Thread Zhiyong Liu
Thanks Chuck's reply. 

However, there was no such myapp.xml file there. In fact, I manually copied my 
context.xml into localhost and renamed it to myapp.xml and it did not work 
either. 

Is there a simple way to check whether the context.xml is loaded or not at all? 

Zhiyong
- Original Message -
From: Charles R Caldarale [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 19, 2007 5:47:14 o'clock PM GMT-0500 Auto-Detected
Subject: RE: Cannot load customized valve and realm from META-INF/context.xml

 From: Zhiyong Liu [mailto:[EMAIL PROTECTED] 
 Subject: Cannot load customized valve and realm from 
 META-INF/context.xml
 
 I tried to move the context.html to conf/Catalina/localhost 
 and the jar file to server/lib then everything went well.

Is it possible you already had a myapp.xml in conf/Catalina/localhost?
(Tomcat sometimes creates one there during deployment.)  If so, that
would have overridden the webapps/myapp/META-INF/context.xml values.

 - 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: Cannot load customized valve and realm from META-INF/context.xml

2007-06-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Zhiyong,

Zhiyong Liu wrote:
 Thanks Chuck's reply.
 
 However, there was no such myapp.xml file there. In fact, I manually
 copied my context.xml into localhost and renamed it to myapp.xml and
 it did not work either.

You claimed that it did:

 I tried to move the context.html to conf/Catalina/localhost and the
 jar file to server/lib then everything went well.

It looks to be that the difference is the placement of the JAR file.
Perhaps valves must be available through Tomcat's classloader instead of
the web application's disposable one.

 Is there a simple way to check whether the context.xml is loaded or
 not at all?

If your application deploys, then the context.xml file should have been
loaded. I'm kind of interested in why the webapp works when those
valves have obviously not been attached.

How are you testing that your valves have been started?

- -chris

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

iD8DBQFGeGw89CaO5/Lv0PARApb9AJ0a7W0CxncGMbTUragB+9TF1vpelACfQhuF
Rblq9BrsHyGG3jwCC3MosoY=
=AdUp
-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: Cannot load customized valve and realm from META-INF/context.xml

2007-06-19 Thread Mark Thomas
Christopher Schultz wrote:
 Zhiyong Liu wrote:
 It looks to be that the difference is the placement of the JAR file.
 Perhaps valves must be available through Tomcat's classloader instead of
 the web application's disposable one.

That will indeed be the problem. They need to be visible to the
Catalina classloader.

Mark

-
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: webapp security in tomcat

2007-06-19 Thread Tim Funk

http://tomcat.apache.org/faq/security.html#restrict

-Tim

Herman Schultz wrote:

Hi,

Can you please tell me if I can configure tomcat to let a range of IP
address to access 1 web app hosted by tomcat, while another set of IP
address to access another web app hosted by the same tomcat?




-
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: Save sessions across restarts

2007-06-19 Thread Stephen Souness

Martin Gainty wrote:
playing around with sessions or cookies has no impact on ability to 
preserve one's capability or ability to establish role verification

if you dont know anything about jetspeed you need to stay quiet

In any event lets take this offline as you dont have a clue what SSO means
Bye



Ignorance is bliss.

If you don't know, don't send people on wild goose chases.

--
Stephen


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



Tomcat 5.5.23 on Microsoft Vista

2007-06-19 Thread David Kider
Hi. I have a machine running the Microsoft Vista OS. I've tried installing 
Tomcat 5.5.23 using the Microsoft Service Installer. This seems to run 
successfully. But when I open my browser and go to http://localhost:8080 I get 
the general The webpage cannot be displayed page. I then checked through the 
list of open ports and allowed programs in the Windows firewall. I added port 
8080 to the list of allowed ports. This didn't fix the problem. So I 
uninstalled Tomcat and tried unzipping the zipped version of Tomcat from the 
tomcat download page. This gave me the same result. I've googled all over the 
place and looked through the Tomcat help and FAQ, to no avail. Can anyone help 
me out?


   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos  more. 
http://mobile.yahoo.com/go?refer=1GNXIC

RE: Tomcat 5.5.23 on Microsoft Vista

2007-06-19 Thread Caldarale, Charles R
 From: David Kider [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 5.5.23 on Microsoft Vista
 
 So I uninstalled Tomcat and tried unzipping the zipped 
 version of Tomcat from the tomcat download page. This
 gave me the same result.

What JVM version do you have installed?  Does it run other Java programs
properly?

What happens when you run Tomcat from the command line?

 - 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: How can i configure tomcat to avoid threads error in tomcat

2007-06-19 Thread Bill Barker

Prashant Thakkar [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,

 Thanks,
 But this is the clients application which we are running. We dont have the
 access to the servlet code. That was the the obvious reason we had 
 increased
 the thread limit to 250.

 Other thing i would like to know is about the thread pooling. How can i 
 use
 this with tomcat 5.0.28
 Below is the connector which we are using:

 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
 Connector port=8080
   maxThreads=250 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false redirectPort=8443 acceptCount=100
   debug=0 connectionTimeout=0
   disableUploadTimeout=true /

You almost certainly don't want connectionTimeout=0.  That will tie up 
threads until the browser decides to drop the connection.

 !-- Note : To disable connection timeouts, set connectionTimeout value
 to 0 --

 !-- Note : To use gzip compression you could set the following properties 
 :

 compression=on
 compressionMinSize=2048
 noCompressionUserAgents=gozilla, traviata
 compressableMimeType=text/html,text/xml
 --

 !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --
 !--
 Connector port=8443
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https secure=true
   clientAuth=false sslProtocol=TLS /
 --

 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
 Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /

 !-- Define a Proxied HTTP/1.1 Connector on port 8082 --
 !-- See proxy documentation for more information about using this. --
 !--
 Connector port=8082
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false
   acceptCount=100 debug=0 connectionTimeout=2
   proxyPort=80 disableUploadTimeout=true /
 --

 Thanks and Regards,
 - Prashant Thakkar

 On 6/19/07, Robert Harper [EMAIL PROTECTED] wrote:

 Do as it says and increase the max threads parameter or manage your
 threads
 better.

 Robert S. Harper
 Senior Engineer
 Information Access Technology, Inc.
 1100 East 6600 South, Suite 300
 Salt Lake City Utah USA 84121-7411
 (801)265-8800 Ext. 255
 FAX (801)265-8880


 This e-mail is intended only for the addressee and may contain
 confidential
 and/or privileged information. Any review, retransmission, or action 
 taken
 upon this information by persons other than the intended recipient is
 prohibited by law. If you received this communication in error, please
 contact us immediately at 801-265-8800. Although this e-mail and any
 attachments are believed to be free of any virus or other defect, it is
 the
 responsibility of the recipient to ensure that anything received or 
 opened
 is virus free. No responsibility is accepted by IAT for any loss or 
 damage
 in the event that such a virus or defect exists.

 -Original Message-
 From: Prashant Thakkar [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 19, 2007 7:25 AM
 To: users@tomcat.apache.org
 Subject: How can i configure tomcat to avoid threads error in tomcat

 Hi All,

 I am frequently getting this error in tomcat which stops my tomcat
 service.
 Pl help me its urgent and costing my service as well:

 I am getting bellow error in my catalina logs:
 Jun 19, 2007 5:55:44 PM org.apache.tomcat.util.threads.ThreadPool logFull
 SEVERE: All threads (250) are currently busy, waiting. Increase 
 maxThreads
 (250) or check the servlet status
 Thanks in advance
 - Prashant Thakkar



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




 -- 
 Prashant Thakkar
 




-
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 flush cache of authenticated users

2007-06-19 Thread 吴熊敏
What kind of authentication do you use??

Session or Cookies or others?
On Tue, 19 Jun 2007 14:18:16 -0700
Ken Moore [EMAIL PROTECTED] wrote:

 The Realm Configuration HOW-TO doc (
 http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html
 http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html  ) says that:
 Once a user has been authenticated, the user (and his or her
 associated roles) are cached within Tomcat for the duration of the
 user's login. and for BASIC authentication, that means until the
 user closes their browser
 
 We use basic authentication for web services. I'd like to flush the
 cache when the password is changed.
 
 I've been looking through the doc and code and I've not yet found the
 cache or a way to flush it.
 
 Anyone know where it is?
 


吴熊敏 [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[2]: Save sessions across restarts

2007-06-19 Thread 吴熊敏
Hahaha!!agree with you !!


On Wed, 20 Jun 2007 12:51:08 +1200
Stephen Souness [EMAIL PROTECTED] wrote:

 Martin Gainty wrote:
  playing around with sessions or cookies has no impact on ability to 
  preserve one's capability or ability to establish role verification
  if you dont know anything about jetspeed you need to stay quiet
  
  In any event lets take this offline as you dont have a clue what SSO means
  Bye
  
 
 Ignorance is bliss.
 
 If you don't know, don't send people on wild goose chases.
 
 --
 Stephen
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


吴熊敏 [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: Tomcat 5.5.23 on Microsoft Vista

2007-06-19 Thread 吴熊敏
Hi,David:

Your issue seems to be very strange.
Are you sure that you have started the Tomcat Service??


On Tue, 19 Jun 2007 18:57:14 -0700 (PDT)
David Kider [EMAIL PROTECTED] wrote:

 Hi. I have a machine running the Microsoft Vista OS. I've tried installing 
 Tomcat 5.5.23 using the Microsoft Service Installer. This seems to run 
 successfully. But when I open my browser and go to http://localhost:8080 I 
 get the general The webpage cannot be displayed page. I then checked 
 through the list of open ports and allowed programs in the Windows firewall. 
 I added port 8080 to the list of allowed ports. This didn't fix the problem. 
 So I uninstalled Tomcat and tried unzipping the zipped version of Tomcat from 
 the tomcat download page. This gave me the same result. I've googled all over 
 the place and looked through the Tomcat help and FAQ, to no avail. Can anyone 
 help me out?
 
 

 
 Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, 
 news, photos  more. 
 http://mobile.yahoo.com/go?refer=1GNXIC


吴熊敏 [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]



log4j error! log4j:ERROR Attempted to append to closed appender named.

2007-06-19 Thread Peter

hi,all

we are using log4j under tomcat. and it appeals  so many following erros ;

log4j:ERROR Attempted to append to closed appender named [DEFAULT_LOGFILE].

does anyone has an idea why and how to sovle it.

thanks !

here is our log4j.xml


?xml version=1.0 encoding=UTF-8?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
debug=false

appender name=OTHERS_LOGFILE class=org.apache.log4j.RollingFileAppender

 param name=Threshold value=DEBUG/
 param name=File value=../logs/others.log/
 param name=Append value=false/
 param name=MaxFileSize value=2000KB/
 param name=MaxBackupIndex value=10/
 layout class= org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d %-5p [%c] %m%n/
 /layout
/appender

appender name=DEFAULT_LOGFILE class=
org.apache.log4j.RollingFileAppender
 param name=Threshold value=DEBUG/
 param name=File value=../logs/shucoms.log/
 param name=Append value=false/
 param name=MaxFileSize value=2000KB/
 param name=MaxBackupIndex value=10/
 layout class= org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d %-5p [%c] %m%n/
 /layout
/appender



appender name=ASYNC class=org.apache.log4j.AsyncAppender

 appender-ref ref=OTHERS_LOGFILE/

 appender-ref ref=DEFAULT_LOGFILE/

/appender

category name=gxlu.eoms additivity=false
 priority value=DEBUG/
 appender-ref ref=DEFAULT_LOGFILE/
/category
category name=org additivity=false
 priority value=INFO/
 appender-ref ref=OTHERS_LOGFILE/
/category

!-- Setup the Root category --
root
 priority value=DEBUG/
 appender-ref ref=ASYNC/
/root
/log4j:configuration


Re: log4j error! log4j:ERROR Attempted to append to closed appender named.

2007-06-19 Thread 吴熊敏
I think the configuration of LOG4J has some problems

param name=File value=../logs/others.log/

System can't find the log file.

On Wed, 20 Jun 2007 12:42:45 +0800
Peter [EMAIL PROTECTED] wrote:

 hi,all
 
 we are using log4j under tomcat. and it appeals  so many following erros ;
 
  log4j:ERROR Attempted to append to closed appender named [DEFAULT_LOGFILE].
 
 does anyone has an idea why and how to sovle it.
 
 thanks !
 
 here is our log4j.xml
 
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE log4j:configuration SYSTEM log4j.dtd
 
 log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
 debug=false
 
  appender name=OTHERS_LOGFILE class=org.apache.log4j.RollingFileAppender
 
   param name=Threshold value=DEBUG/
   param name=File value=../logs/others.log/
   param name=Append value=false/
   param name=MaxFileSize value=2000KB/
   param name=MaxBackupIndex value=10/
   layout class= org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d %-5p [%c] %m%n/
   /layout
  /appender
 
  appender name=DEFAULT_LOGFILE class=
 org.apache.log4j.RollingFileAppender
   param name=Threshold value=DEBUG/
   param name=File value=../logs/shucoms.log/
   param name=Append value=false/
   param name=MaxFileSize value=2000KB/
   param name=MaxBackupIndex value=10/
   layout class= org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d %-5p [%c] %m%n/
   /layout
  /appender
 
 
 
  appender name=ASYNC class=org.apache.log4j.AsyncAppender
 
   appender-ref ref=OTHERS_LOGFILE/
 
   appender-ref ref=DEFAULT_LOGFILE/
 
  /appender
 
  category name=gxlu.eoms additivity=false
   priority value=DEBUG/
   appender-ref ref=DEFAULT_LOGFILE/
  /category
  category name=org additivity=false
   priority value=INFO/
   appender-ref ref=OTHERS_LOGFILE/
  /category
 
 !-- Setup the Root category --
  root
   priority value=DEBUG/
   appender-ref ref=ASYNC/
  /root
 /log4j:configuration


吴熊敏 [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: log4j error! log4j:ERROR Attempted to append to closed appender named.

2007-06-19 Thread Peter

thanks

but it also generate log file as well. log file can be write.

i donot know if the error:

*log4j:ERROR Attempted to append to closed appender named
[DEFAULT_LOGFILE].*

will slow down our system or this error can be ignored?

how to solve it

thanks


On 6/20/07, 吴熊敏 [EMAIL PROTECTED] wrote:


I think the configuration of LOG4J has some problems

param name=File value=../logs/others.log/

System can't find the log file.

On Wed, 20 Jun 2007 12:42:45 +0800
Peter [EMAIL PROTECTED] wrote:

 hi,all

 we are using log4j under tomcat. and it appeals  so many following erros
;

  log4j:ERROR Attempted to append to closed appender named
[DEFAULT_LOGFILE].

 does anyone has an idea why and how to sovle it.

 thanks !

 here is our log4j.xml


 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE log4j:configuration SYSTEM log4j.dtd

 log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
 debug=false

  appender name=OTHERS_LOGFILE class=
org.apache.log4j.RollingFileAppender
 
   param name=Threshold value=DEBUG/
   param name=File value=../logs/others.log/
   param name=Append value=false/
   param name=MaxFileSize value=2000KB/
   param name=MaxBackupIndex value=10/
   layout class= org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d %-5p [%c] %m%n/
   /layout
  /appender

  appender name=DEFAULT_LOGFILE class=
 org.apache.log4j.RollingFileAppender
   param name=Threshold value=DEBUG/
   param name=File value=../logs/shucoms.log/
   param name=Append value=false/
   param name=MaxFileSize value=2000KB/
   param name=MaxBackupIndex value=10/
   layout class= org.apache.log4j.PatternLayout
param name=ConversionPattern value=%d %-5p [%c] %m%n/
   /layout
  /appender



  appender name=ASYNC class=org.apache.log4j.AsyncAppender

   appender-ref ref=OTHERS_LOGFILE/

   appender-ref ref=DEFAULT_LOGFILE/

  /appender

  category name=gxlu.eoms additivity=false
   priority value=DEBUG/
   appender-ref ref=DEFAULT_LOGFILE/
  /category
  category name=org additivity=false
   priority value=INFO/
   appender-ref ref=OTHERS_LOGFILE/
  /category

 !-- Setup the Root category --
  root
   priority value=DEBUG/
   appender-ref ref=ASYNC/
  /root
 /log4j:configuration


吴熊敏 [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[2]: log4j error! log4j:ERROR Attempted to append to closed appender named.

2007-06-19 Thread 吴熊敏

param name=Append value=false/

change Append's value 'true' and try again

On Wed, 20 Jun 2007 13:18:01 +0800
Peter [EMAIL PROTECTED] wrote:

 thanks
 
 but it also generate log file as well. log file can be write.
 
 i donot know if the error:
 
  *log4j:ERROR Attempted to append to closed appender named
 [DEFAULT_LOGFILE].*
 
 will slow down our system or this error can be ignored?
 
 how to solve it
 
 thanks
 
 
 On 6/20/07, 吴熊敏 [EMAIL PROTECTED] wrote:
 
  I think the configuration of LOG4J has some problems
 
  param name=File value=../logs/others.log/
 
  System can't find the log file.
 
  On Wed, 20 Jun 2007 12:42:45 +0800
  Peter [EMAIL PROTECTED] wrote:
 
   hi,all
  
   we are using log4j under tomcat. and it appeals  so many following erros
  ;
  
log4j:ERROR Attempted to append to closed appender named
  [DEFAULT_LOGFILE].
  
   does anyone has an idea why and how to sovle it.
  
   thanks !
  
   here is our log4j.xml
  
  
   ?xml version=1.0 encoding=UTF-8?
   !DOCTYPE log4j:configuration SYSTEM log4j.dtd
  
   log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
   debug=false
  
appender name=OTHERS_LOGFILE class=
  org.apache.log4j.RollingFileAppender
   
 param name=Threshold value=DEBUG/
 param name=File value=../logs/others.log/
 param name=Append value=false/
 param name=MaxFileSize value=2000KB/
 param name=MaxBackupIndex value=10/
 layout class= org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d %-5p [%c] %m%n/
 /layout
/appender
  
appender name=DEFAULT_LOGFILE class=
   org.apache.log4j.RollingFileAppender
 param name=Threshold value=DEBUG/
 param name=File value=../logs/shucoms.log/
 param name=Append value=false/
 param name=MaxFileSize value=2000KB/
 param name=MaxBackupIndex value=10/
 layout class= org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d %-5p [%c] %m%n/
 /layout
/appender
  
  
  
appender name=ASYNC class=org.apache.log4j.AsyncAppender
  
 appender-ref ref=OTHERS_LOGFILE/
  
 appender-ref ref=DEFAULT_LOGFILE/
  
/appender
  
category name=gxlu.eoms additivity=false
 priority value=DEBUG/
 appender-ref ref=DEFAULT_LOGFILE/
/category
category name=org additivity=false
 priority value=INFO/
 appender-ref ref=OTHERS_LOGFILE/
/category
  
   !-- Setup the Root category --
root
 priority value=DEBUG/
 appender-ref ref=ASYNC/
/root
   /log4j:configuration
 
  
  吴熊敏 [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]
 
 


吴熊敏 [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]