RE: mod_jk2 under heavy load

2005-10-20 Thread fix
Hi

We also had problems with performance using mod_jk2 under heavy load,
because we are using apache2, we used mod_proxy instead and now are
redirecting the requests to the default http listener.
We are using (debian) linux with tomcat 4_1.

Bjorn

 HI

 We are using IIS with JBoss 4.01(tomcat 5)
 What verion of tomcat are you using??

 We are using windows 2003 servres, with 4G ram.  JVM is 1.42 and we
 allocate 1.4G of ram to it when running Jboss.

 These are my property files, Can you see anything wrong??

 worker.insight.port=8009
worker.insight.type=ajp13
worker.insight.cachesize=200

# worker.insight.cache_timeout=60
# worker.insight.recycle_timeout=60
worker.insight.socket_keepalive=1
worker.insight.socket_timeout=60

# if the retries value is greater than three,
# there will be a pause of 100 ms between each retry
# so this would be a good value if your average response
# time is 1.7 seconds:
worker.insight.retries=20


Property for tomcat

Connector port=8009 address=${jboss.bind.address}
enableLookups=false redirectPort=8443 debug=0
minProcessors=75 maxProcessors=200 protocol=AJP/1.3/


   -Original Message-
   From: j r [mailto:[EMAIL PROTECTED]
   Sent: Thu 20/10/2005 03:03
   To: Tomcat Users List
   Cc:
   Subject: Re: mod_jk2 under heavy load



   We handle 1-2million hits per hour using mod_jk-1.2.13. No special
   config setup. It just worked out of the box.

   jr

   On 10/19/05, Steve Gaunt [EMAIL PROTECTED] wrote:
   
HI,
   
Has anyone else had any issue using mod_jk under heavy load..
   
It seems after a period of time(or large no. opf requests) under
heavy load AJP connetor just hangs. It's crazy.
All the ajp connections seem to be hanging in service mode, and the
only way to recover this is to restart tomcat. I'm really stuck with
this. Has anyone got success stories with jk2(mod)jk) under heavey
load. Around 1/2-1 million hits/day.
   
Steve
   
__
This email has been scanned by the MessageLabs Email Security
System. For more information please visit
http://www.messagelabs.com/email
__
   

   __
   This email has been scanned by the MessageLabs Email Security System.
   For more information please visit http://www.messagelabs.com/email
   __



 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __


-- 
Bjorn Monnens (software developer)
visit me   @ http://www.pczone.be
contact me @ [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JAASRealm, Tomcat 5.5 getting HTTP error page 403 Access denied

2005-10-20 Thread Carsten Schiller
Hello!

We are trying to implement a login/security environment using Tomcat 5.5's 
JAASRealm and Struts as a MVC-Framework.
After Login ,which fails with error HTTP Status 403 - Access to the 
requested ressource has been denied, we can navigate manually to our 
output.jsp and use 
...
%= request.getUserPrincipal % , 
...
%= request.isUserInRole(administrator) % 
...
logic:present role=administrator
Admin present!
/logic:present

These return correct username, (true) for isUserInRole, and the logic tag 
also works... 
BUT
Our problem is: We protected *.do in our web.xml to be only accessible by 
users in role administrator, which fails as described above. 
Why does the login fail, but we still get a valid Subject with Principals, 
and can access the roles on the output.jsp?
We are stuck now for over a week, reading tutorials, asking google, but 
with no success... Any Ideas would be appreciated!

Our relevant sourcecode:

- Tomcats server.xml 
--
Server port=8005 shutdown=SHUTDOWN
...
  Service name=Catalina
...
Engine name=Catalina defaultHost=localhost
...
Realm className=org.apache.catalina.realm.JAASRealm 
appName=SimpleLogin 
userClassNames=my.strutsLogin.UserPrincipal 
roleClassNames=my.strutsLogin.GroupPrincipal
useContextClassLoader=false 
/
Host ... /Host
/Engine
/Service
/Server


 web.xml of our Project 

...
servlet-namelogonAction/servlet-name
...
  servlet-mapping
servlet-namelogonAction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
security-constraint
 web-resource-collection
 web-resource-namelogonAction/web-resource-name
 url-pattern*.do/url-pattern
 /web-resource-collection 
 auth-constraint
 role-nameadministrator/role-name 
 /auth-constraint
 /security-constraint
 login-config
 auth-methodBASIC/auth-method
 realm-nameJAASRealm/realm-name
 /login-config
  security-role
  role-nameadministrator/role-name
  /security-role
/web-app

Greetings

Carsten Schiller.
+++ 
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.
  
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. 
Any unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.


Re: Unsubscribe DON'T WORK!

2005-10-20 Thread David Delbecq
That's fun, you can post to the mailing list, but
your messages for unsuscribing are considered spams :)

[EMAIL PROTECTED]: host asf.osuosl.org[140.211.166.49]
said: 552 spam score (7.0) exceeded threshold




[EMAIL PROTECTED] a écrit :

Hi team of Tomcat Users List!

All email that you have for unsubscribe DON'T WORK!

I send more then 20 times for the 2 emails that you gave and they DON'T WORK!
Always get the Undelivered Mail Returned to Sender!
Do you have any ideia of what is going on?

Best Regards
António

- Mensagem Reenviada de [EMAIL PROTECTED] -
Data: Wed, 19 Oct 2005 22:53:08 +0100 (WEST)
  De: Mail Delivery System [EMAIL PROTECTED]
Responder para: Mail Delivery System [EMAIL PROTECTED]
 Assunto: Undelivered Mail Returned to Sender
Para: [EMAIL PROTECTED]

This is the Postfix program at host galadriel.portugalmail.pt.

I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

For further assistance, please send mail to postmaster

If you do so, please include this problem report. You can
delete your own text from the message returned below.

   The Postfix program

[EMAIL PROTECTED]: host asf.osuosl.org[140.211.166.49]
said: 552 spam score (7.0) exceeded threshold


- Finalizar mensagem reenviada -


  



Reporting-MTA: dns; galadriel.portugalmail.pt
Arrival-Date: Wed, 19 Oct 2005 22:52:44 +0100 (WEST)

Final-Recipient: rfc822; [EMAIL PROTECTED]
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; host asf.osuosl.org[140.211.166.49] said: 552 spam
score (7.0) exceeded threshold
  


 

 Expéditeur:
 [EMAIL PROTECTED]
 Date:
 Wed, 19 Oct 2005 22:52:44 +0100
 Destinataire:
 [EMAIL PROTECTED]

 Destinataire:
 [EMAIL PROTECTED]

 Received:
 by galadriel.portugalmail.pt (Postfix, from userid 30) id B7D287C80F;
 Wed, 19 Oct 2005 22:52:44 +0100 (WEST)
 Received:
 from 213-58-9-102.acesso.portugalmail.pt
 (213-58-9-102.acesso.portugalmail.pt [213.58.9.102]) by
 gold.portugalmail.pt (IMP) with HTTP for
 [EMAIL PROTECTED]@localhost; Wed, 19 Oct 2005 22:52:44 +0100
 ID du Message:
 [EMAIL PROTECTED]
 Version de MIME:
 1.0
 Content-Type:
 text/plain
 Content-Disposition:
 inline
 Agent utilisateur:
 Internet Messaging Program (IMP) 4.0-cvs
 Content-Transfer-Encoding:
 7bit


Received: by galadriel.portugalmail.pt (Postfix, from userid 30)
   id B7D287C80F; Wed, 19 Oct 2005 22:52:44 +0100 (WEST)
Received: from 213-58-9-102.acesso.portugalmail.pt 
(213-58-9-102.acesso.portugalmail.pt [213.58.9.102]) 
   by gold.portugalmail.pt (IMP) with HTTP 
   for [EMAIL PROTECTED]@localhost; Wed, 19 Oct 2005 22:52:44 +0100
Message-ID: [EMAIL PROTECTED]
Date: Wed, 19 Oct 2005 22:52:44 +0100
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustered Tomcat JSF

2005-10-20 Thread Mindaugas Zaksauskas
Hi,

I was trying to make this work for more than a week, maybe there will be 
someone who will be able to help.

Configuration: Tomcat [EMAIL PROTECTED] GNU/Linux, 2.6.13. Cluster configured 
accordingly to http://raibledesigns.com/tomcat/ (Apache2 + mod_jk + two 
Tomcat instances on the same box, memory-in-memory session replication). 
Sticky sessions are turned off, so by requesting a page, I am redirected to 
Tomcat #1, then to Tomcat #2, then again to Tomcat #1 and so on.

At the beginning, the application I was trying to launch was developed and 
tested on a regular (non-clustered) Tomcat, and the life was beautiful :) 
When we decided to move to the cluster, we got some exceptions about 
non-serializable data in the session which we had all fixed.

The actual problem is that session data in our application doesn't seem to be 
replicated under random circumstances and under random screens. What I see 
from the logs, that entire managed beans are missing from within different 
Tomcat instance and they really exist in another.

I have written a simple .jsp test with the session replication and it seemed 
to work well.

Then I got really angry and tried with more sophisticated example which didn't 
(see sourcecode at the bottom). This example puts relatively large amount of 
data into the session and under next request this data is retrieved from the 
different Tomcat node. I have tested this with IE 6.0 - by opening this page, 
and clicking on F5 (refresh), the upper number (current timestamp) must go to 
the bottom at the next request. The bug scenario is the following: hold F5 
for a couple of seconds and wait till hundreds of refreshes/session 
replications finish. Then, quickly save the upper number and _immediately_ 
click F5 once again. The upper number is *not* getting written into the 
session nor gets replicated, some old value is retrieved from the session 
instead. Sometimes, the following exception appears in the catalina.out.

java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:448)
at 
java.io.ObjectInputStream$BlockDataInputStream.readInt(ObjectInputStream.java:2657)
at java.io.ObjectInputStream.readInt(ObjectInputStream.java:900)
at 
org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.readExternal(DeltaRequest.java:285)
(...skipped...)

The two problems (session replication in my test and in JSF webapp) might have 
nothing in common just because I have tested JSF webapp under no load. 
However, our JSF webapp is supposed to handle 200+ users so this also might 
be an issue.

I have tried the same config on Tomcat 5.5.9. I have tried all the replication 
modes (pooled, synchronous and asynchronous), also tried with 
waitForAck=false. None has helped.

I'd appreciate any help. Thanks in advance.

m.

8-- test.jsp 
html
body
center

!-- Tomcat id is accordingly to instance, for another I have Tomcat 1 --
h1Tomcat 2/h1

%= request.getSession().getId() %BR
%
String[] mas = new String[1];
long time = System.currentTimeMillis() % 10;
out.println(time:  + time + BR);
for (int i=0; imas.length; i++)
{
mas[i] =  + time;
}

String[] from_session = (String[]) session.getAttribute(attr);
if (from_session == null)
{
session.setAttribute(attr, mas);
out.println(from session: null);
}
else
{
String value = from_session[0].toString();
out.println(got from session; length: + from_session.length +   
value:  + value);
session.setAttribute(attr, mas);
}
%
/body
/html
8-- test.jsp 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using placeholders in context.xml for builds

2005-10-20 Thread Allistair Crossley
Hi,

Anyone know if you can use placeholders in context files, e.g

Context docBase=ROOT reloadable=${tomcat.webapp.root.reloadable} 
antiJARLocking=tomcat.webapp.root.antijarlocking 
antiResourceLocking=tomcat.webapp.root.antireslocking

Currently I am using Ant to perform replacements on the single quoted values in 
full, e.g replace reloadable='true' with reloadable='false'

Context docBase=ROOT reloadable='true' antiJARLocking='false' 
antiResourceLocking='false'

It works but it's not quite elegant,

Cheers, Allistair


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Missing application web.xml, using defaults only - is this a Tomcat bug?

2005-10-20 Thread Rob Hills
Hi All,

On 17 Oct 2005 at 11:23, Rob Hills wrote:

 I am currently using Tomcat 5.5.9 on Window XP Pro in my development 
 environment and I believe I have finally tracked down the 
 cause of a problem that has been plaguing me for some time.  Until recently 
 I've not had the time to do the testing to establish what 
 the problem was.  It appears to me that if you use a context.xml file inside 
 a WAR file and include in that file a Context 
 .../Context element (ie an element with opening and closing tags, 
 attributes, but no contents) Tomcat will not deploy the context 
 properly.

This issue gets curiouser and curiouser!

As mentioned in my previous email, I eventually established that my 
WAR file-based web application (built using Ant) would deploy on 
Tomcat 5.5 on Windows if I used a context.xml file with a simple 
context element like this:

Context reloadable=true/

For my sins, I am having to deploy the same application in Tomcat 5.5 
on Windows and also Tomcat 5.0 on Linux (FC4/TC5.0.30-8jpp).

I've established (I believe) that I can't use the same context.xml file for 
my WAR file for both systems.  From the my reading of the 
Documentation, docBase and Path are mandatory attributes of the 
Context element for Tomcat 5.0.  From my experience, if I include 
them in the Context element and deploy the WAR file on Tomcat 5.5 
on Windows, I get my Missing application web.xml error.

However, to date, after much fiddling with the context.xml, I've not 
been able to succeed in getting it to deploy on the linux box.  The 
catalina.out log shows only the missing application web.xml, using 
defaults only error and accessing the apps url gives a file list showing 
the ROOT.war file.

If I delete the Catalina/my-app/ROOT.xml, unzip my WAR file and 
bounce Tomcat, the web app starts up OK, without the missing 
application web.xml error.

Has anyone else seen this?  Is there any way to crank up the logging 
of Tomcat's processing of the WAR,  web.xml and context.xml files so 
I can get a better idea what's upsetting it?

Cheers,

Rob Hills
West Perth
Western Australia

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamically included jsp's

2005-10-20 Thread Tim Funk
That should work but with development=false checkInterval=900 - there might 
be a lag of 900 seconds before the nwe file is used.


Try development=true

-Tim

j r wrote:


All,

This is perhaps a very easy question for many of you, but here it goes:

What has changed from tomcat 4.1.30 to tomcat 5.5 that would make dynamic
jsp includes not work? I have tried setting the following settings to ensure
that it works: development=false, reloading=true, checkInterval=900 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



NPE in init()

2005-10-20 Thread Zohar Amir

Hello,
I'm new here, so all the normal disclaimers...
I wrote a servlet and needed to read some configuration, so I overrode 
init(ServletConfig config). I forgot to invoke super(config) and then tried 
invoking getServletContext() and got a NPE. It took me some (a lot actually) 
time to figure out why...
My question is why can't a descriptive exception be thrown when invoking 
anything that presumes that config is set? I refer to GenericServlet, where 
a few methods rely on getServletConfig() to return a non-null value, and act 
on it. TMHO the return value should be checked and a descriptive exception 
be thrown (servlet should be initialized or whatever), instead of the NPE.

Thanks,
Zohar. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DoS on tomcat 5.5.x or false alert ?

2005-10-20 Thread David Maciejak
Hi,

 

Seems that many requests (about 100) on a big dir listing cause catalina
stop responding, in fact java takes all CPU. After that, a kill is
necessary.

Configuration files are the default ones. 

I have experienced the problem on Tomcat 5.5.0 to 5.5.11. Seems that 5.5.12
is not affected.

Nobody else has seen this strange behaviour?

 

thanks

David Maciejak



 



Re: DoS on tomcat 5.5.x or false alert ?

2005-10-20 Thread nag for
Hello.. I have expeienced similar problem but on
5.0.28. So far, we could not find the reason or
solution... Any help would be much appreciated.

--- David Maciejak [EMAIL PROTECTED]
wrote:

 Hi,
 
  
 
 Seems that many requests (about 100) on a big dir
 listing cause catalina
 stop responding, in fact java takes all CPU. After
 that, a kill is
 necessary.
 
 Configuration files are the default ones. 
 
 I have experienced the problem on Tomcat 5.5.0 to
 5.5.11. Seems that 5.5.12
 is not affected.
 
 Nobody else has seen this strange behaviour?
 
  
 
 thanks
 
 David Maciejak
 
 
 
  
 
 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Clustered Tomcat JSF

2005-10-20 Thread Peter Rossbach

Hey,

the tomcat clustering is design for sticky session is on, like the servlet
spec described (SRV 7.7.2 Servlet Sepc 2.4) Clustering is implemented as 
backup,  when a node is crashed

or went shutdown. At rare special cases you can used synchron pooled mode
without stickyness (waitForAck=true).

Peter


Mindaugas Zaksauskas schrieb:


Hi,

I was trying to make this work for more than a week, maybe there will be 
someone who will be able to help.


Configuration: Tomcat [EMAIL PROTECTED] GNU/Linux, 2.6.13. Cluster configured 
accordingly to http://raibledesigns.com/tomcat/ (Apache2 + mod_jk + two 
Tomcat instances on the same box, memory-in-memory session replication). 
Sticky sessions are turned off, so by requesting a page, I am redirected to 
Tomcat #1, then to Tomcat #2, then again to Tomcat #1 and so on.


At the beginning, the application I was trying to launch was developed and 
tested on a regular (non-clustered) Tomcat, and the life was beautiful :) 
When we decided to move to the cluster, we got some exceptions about 
non-serializable data in the session which we had all fixed.


The actual problem is that session data in our application doesn't seem to be 
replicated under random circumstances and under random screens. What I see 
from the logs, that entire managed beans are missing from within different 
Tomcat instance and they really exist in another.


I have written a simple .jsp test with the session replication and it seemed 
to work well.


Then I got really angry and tried with more sophisticated example which didn't 
(see sourcecode at the bottom). This example puts relatively large amount of 
data into the session and under next request this data is retrieved from the 
different Tomcat node. I have tested this with IE 6.0 - by opening this page, 
and clicking on F5 (refresh), the upper number (current timestamp) must go to 
the bottom at the next request. The bug scenario is the following: hold F5 
for a couple of seconds and wait till hundreds of refreshes/session 
replications finish. Then, quickly save the upper number and _immediately_ 
click F5 once again. The upper number is *not* getting written into the 
session nor gets replicated, some old value is retrieved from the session 
instead. Sometimes, the following exception appears in the catalina.out.


java.io.EOFException
   at java.io.DataInputStream.readInt(DataInputStream.java:448)
   at 
java.io.ObjectInputStream$BlockDataInputStream.readInt(ObjectInputStream.java:2657)

   at java.io.ObjectInputStream.readInt(ObjectInputStream.java:900)
   at 
org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.readExternal(DeltaRequest.java:285)

(...skipped...)

The two problems (session replication in my test and in JSF webapp) might have 
nothing in common just because I have tested JSF webapp under no load. 
However, our JSF webapp is supposed to handle 200+ users so this also might 
be an issue.


I have tried the same config on Tomcat 5.5.9. I have tried all the replication 
modes (pooled, synchronous and asynchronous), also tried with 
waitForAck=false. None has helped.


I'd appreciate any help. Thanks in advance.

m.

8-- test.jsp 
html
body
center

!-- Tomcat id is accordingly to instance, for another I have Tomcat 1 --
h1Tomcat 2/h1

%= request.getSession().getId() %BR
%
   String[] mas = new String[1];
   long time = System.currentTimeMillis() % 10;
   out.println(time:  + time + BR);
   for (int i=0; imas.length; i++)
   {
   mas[i] =  + time;
   }

   String[] from_session = (String[]) session.getAttribute(attr);
   if (from_session == null)
   {
   session.setAttribute(attr, mas);
   out.println(from session: null);
   }
   else
   {
   String value = from_session[0].toString();
   out.println(got from session; length: + from_session.length +   
value:  + value);

   session.setAttribute(attr, mas);
   }
%
/body
/html
8-- test.jsp 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PernGen memory leak with Tomcat 5.5.9

2005-10-20 Thread Félix Pedrera García

Hi!

We are working on a web application using Struts 1.2.7, deployed on 
Tomcat 5.5.9 on Solaris SunOS 5.8 and JVM 1.5.0_04-b05 and we have the 
following problem:


Sometimes we get an  java.lang.OutOfMemoryError: PermGen space and the 
logs do not say anything more about the problem.


We are monitoring the PerGen space with JMap command and we noticed that 
the PerGen space is always growing up untill it gets the maximum 
configured PermGen size: -XX:MaxPermSize=256m and then we get the 
OutOfMemoryError.
With JMap -histo we monitor the alive instances in our JVM and we see 
that, aside of multiple java.lang.String and other similar objects, 
there are also a lot of DTO objects that we use in the application to 
transfer data from Action classes to the view (jsp), and we understand 
that these objects should only be alive while the request is active, 
but, as we can see looking at the number of these objects, they are 
still alive.


160576 5018 zyx.mvc.model.DeviceData
116480 3640 zyx.mvc.model.DeviceData
73584 1533 zyx.mvc.model.TestResultByUser
60120 1503 zyx.mvc.model.TestResultData
27440 490 zyx.mvc.model.DeviceDataByUserPattern
15240 381 zyx.mvc.model.Device
14400 300 zyx.mvc.model.TestCaseWithLastResult
13032 543 zyx.mvc.model.Technology
12576 262 zyx.mvc.model.TestCase
12520 313 zyx.mvc.model.TestGroup
10656 444 zyx.mvc.model.Service
4848 101 zyx.mvc.model.TestCase
4320 108 zyx.mvc.model.Device
3808 68 zyx.mvc.model.DeviceDataByUserPattern
1120 28 zyx.mvc.model.TestGroup
920 23 zyx.mvc.model.User
840 15 zyx.mvc.model.TechnologiesReportData
600 15 zyx.mvc.model.Firmware
504 7 zyx.mvc.forms.TestResultsForm
320 8 zyx.utils.TestCasesNavigator
240 10 zyx.common.ActivityLogDBAccess
192 3 zyx.mvc.forms.ResultsByServiceForm
160 5 zyx.mvc.model.PreviousTestResultData
160 5 zyx.utils.Text2HTMLTag
136 17 zyx.database.DBManager
128 2 zyx.mvc.forms.ResultsByTechForm
112 14 zyx.database.DBDevice
1 zyx.mvc.forms.ResultsByServiceForm
64 1 zyx.mvc.forms.ResultsByTechForm
56 1 zyx.mvc.ControlServlet
56 1 zyx.database.pool.DBConnectionPool
56 1 zyx.sms.SMSServlet
56 1 zyx.mvc.ControlServlet

Why these resources are not destroyed?

We have been looking at the

http://issues.apache.org/bugzilla/show_bug.cgi?id=14042

and since this bug is fixed from struts version 1.2.7, we think this can 
not be the problem.


Any idea?

Thanks in advance,

--
Félix Pedrera García


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Missing application web.xml, using defaults only - is this a Tomcat bug?

2005-10-20 Thread Caldarale, Charles R
 From: Rob Hills [mailto:[EMAIL PROTECTED] 
 Subject: Re: Missing application web.xml, using defaults only 
 - is this a Tomcat bug?
 
 From the my reading of the Documentation, docBase and Path are 
 mandatory attributes of the Context element for Tomcat 5.0.

Check the 5.5 doc for Context:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

The path attribute is not allowed unless the Context element is in
server.xml, which is strongly discouraged.  (I have a vague memory of
Remy M saying that 5.5.12 disallows path, whereas previous 5.5 levels
ignored it.)  So yes, the target Tomcat level does make a difference.  I
believe that there are other configuration changes between 5.0 and 5.5
as well, notably in how resources are configured.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk2 under heavy load

2005-10-20 Thread j r
Steve,

I use tomcat 5.5 with jvm 1.5 on linux. I allocate 1.4G of ram also. Your
configs look like mine for the property files.


-jr

On 10/19/05, Steve Gaunt [EMAIL PROTECTED] wrote:

 HI

 We are using IIS with JBoss 4.01(tomcat 5)
 What verion of tomcat are you using??

 We are using windows 2003 servres, with 4G ram. JVM is 1.42 and we
 allocate 1.4G of ram to it when running Jboss.

 These are my property files, Can you see anything wrong??

 worker.insight.port=8009
 worker.insight.type=ajp13
 worker.insight.cachesize=200

 # worker.insight.cache_timeout=60
 # worker.insight.recycle_timeout=60
 worker.insight.socket_keepalive=1
 worker.insight.socket_timeout=60

 # if the retries value is greater than three,
 # there will be a pause of 100 ms between each retry
 # so this would be a good value if your average response
 # time is 1.7 seconds:
 worker.insight.retries=20


 Property for tomcat

 Connector port=8009 address=${jboss.bind.address}
 enableLookups=false redirectPort=8443 debug=0 minProcessors=75
 maxProcessors=200 protocol=AJP/1.3/


 -Original Message-
 From: j r [mailto:[EMAIL PROTECTED]
 Sent: Thu 20/10/2005 03:03
 To: Tomcat Users List
 Cc:
 Subject: Re: mod_jk2 under heavy load



 We handle 1-2million hits per hour using mod_jk-1.2.13. No special config
 setup. It just worked out of the box.

 jr

 On 10/19/05, Steve Gaunt [EMAIL PROTECTED] wrote:
 
  HI,
 
  Has anyone else had any issue using mod_jk under heavy load..
 
  It seems after a period of time(or large no. opf requests) under heavy
  load AJP connetor just hangs. It's crazy.
  All the ajp connections seem to be hanging in service mode, and the only
  way to recover this is to restart tomcat. I'm really stuck with this.
  Has anyone got success stories with jk2(mod)jk) under heavey load.
 Around
  1/2-1 million hits/day.
 
  Steve
 
  __
  This email has been scanned by the MessageLabs Email Security System.
  For more information please visit http://www.messagelabs.com/email
  __
 

 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __


 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_jk2 under heavy load

2005-10-20 Thread nag for
But... Are you experiencing the same with Tomcat
5.5???


--- j r [EMAIL PROTECTED] wrote:

 Steve,
 
 I use tomcat 5.5 with jvm 1.5 on linux. I allocate
 1.4G of ram also. Your
 configs look like mine for the property files.
 
 
 -jr
 
 On 10/19/05, Steve Gaunt [EMAIL PROTECTED]
 wrote:
 
  HI
 
  We are using IIS with JBoss 4.01(tomcat 5)
  What verion of tomcat are you using??
 
  We are using windows 2003 servres, with 4G ram.
 JVM is 1.42 and we
  allocate 1.4G of ram to it when running Jboss.
 
  These are my property files, Can you see anything
 wrong??
 
  worker.insight.port=8009
  worker.insight.type=ajp13
  worker.insight.cachesize=200
 
  # worker.insight.cache_timeout=60
  # worker.insight.recycle_timeout=60
  worker.insight.socket_keepalive=1
  worker.insight.socket_timeout=60
 
  # if the retries value is greater than three,
  # there will be a pause of 100 ms between each
 retry
  # so this would be a good value if your average
 response
  # time is 1.7 seconds:
  worker.insight.retries=20
 
 
  Property for tomcat
 
  Connector port=8009
 address=${jboss.bind.address}
  enableLookups=false redirectPort=8443
 debug=0 minProcessors=75
  maxProcessors=200 protocol=AJP/1.3/
 
 
  -Original Message-
  From: j r [mailto:[EMAIL PROTECTED]
  Sent: Thu 20/10/2005 03:03
  To: Tomcat Users List
  Cc:
  Subject: Re: mod_jk2 under heavy load
 
 
 
  We handle 1-2million hits per hour using
 mod_jk-1.2.13. No special config
  setup. It just worked out of the box.
 
  jr
 
  On 10/19/05, Steve Gaunt
 [EMAIL PROTECTED] wrote:
  
   HI,
  
   Has anyone else had any issue using mod_jk under
 heavy load..
  
   It seems after a period of time(or large no. opf
 requests) under heavy
   load AJP connetor just hangs. It's crazy.
   All the ajp connections seem to be hanging in
 service mode, and the only
   way to recover this is to restart tomcat. I'm
 really stuck with this.
   Has anyone got success stories with jk2(mod)jk)
 under heavey load.
  Around
   1/2-1 million hits/day.
  
   Steve
  
  

__
   This email has been scanned by the MessageLabs
 Email Security System.
   For more information please visit
 http://www.messagelabs.com/email
  

__
  
 
 

__
  This email has been scanned by the MessageLabs
 Email Security System.
  For more information please visit
 http://www.messagelabs.com/email
 

__
 
 
 

__
  This email has been scanned by the MessageLabs
 Email Security System.
  For more information please visit
 http://www.messagelabs.com/email
 

__
 
 

-
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WAR versions

2005-10-20 Thread Zohar Amir

Hello,
I was wondering what is the best way to indicate a war file's version. 
Should the file's name indicate it (e.g., bla_1.3.2.war), and/or should the 
manifest in META-INF include an entry for it?

Thanks,
Zohar. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Missing application web.xml, using defaults only - is this a Tomcat bug?

2005-10-20 Thread Rob Hills
Hi Chuck,

On 20 Oct 2005 at 8:44, Caldarale, Charles R wrote:

  From: Rob Hills [mailto:[EMAIL PROTECTED] 
  Subject: Re: Missing application web.xml, using defaults only 
  - is this a Tomcat bug?
  
  From the my reading of the Documentation, docBase and Path are
  mandatory attributes of the Context element for Tomcat 5.0.
 
 Check the 5.5 doc for Context:
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
 
 The path attribute is not allowed unless the Context element is in
 server.xml, which is strongly discouraged.  (I have a vague memory of
 Remy M saying that 5.5.12 disallows path, whereas previous 5.5 levels
 ignored it.)  So yes, the target Tomcat level does make a difference. 
 I believe that there are other configuration changes between 5.0 and
 5.5 as well, notably in how resources are configured.

Thanks for the info, I had missed that subtlety in the 5.5 docs, but I'd 
figured out about the Path element in 5.5 anyway.

My problem is getting 5.0 working on Linux.  I am using a virtually 
identical WAR file that only differs in as much as its context.xml has a 
Context element with Path= and docBase=ROOT values in it.  I keep 
getting that pesky Missing application web.xml error message that I 
suspect is pointing away from the cause of the problem.  I re-iterate that 
if I unzip my ROOT.war file in situ (ie into a ROOT directory next to the 
ROOT.war file) the site works!

Cheers,

Rob Hills
West Perth
Western Australia

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Unable to open Tomcat Manager?

2005-10-20 Thread 梁炳場
My tomcat-users.xml
?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=tomcat password=tomcat roles=tomcat/
  user username=role1 password=tomcat roles=role1/
  user username=both password=tomcat roles=tomcat,role1/
  user username=admin password=abc123 roles=admin,manager/
/tomcat-users

My server.xml
  Realm  className=org.apache.catalina.realm.JDBCRealm
 driverName=com.mysql.jdbc.Driver
  connectionURL=jdbc:mysql://localhost:3306/erp
 connectionName=root connectionPassword=abc123 digest=MD5
  userTable=user_profile userNameCol=usernm userCredCol=passwd
  userRoleTable=user_role roleNameCol=role_name /

I have inputted username and user role in tables.

Still receive this message

HTTP Status 403 - Access to the requested resource has been denied

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WAR versions

2005-10-20 Thread David Delbecq
manifest as name of .war is used by tomcat during deployement to name
the webapp :)

Zohar Amir a écrit :

 Hello,
 I was wondering what is the best way to indicate a war file's version.
 Should the file's name indicate it (e.g., bla_1.3.2.war), and/or
 should the manifest in META-INF include an entry for it?
 Thanks,
 Zohar.
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can you intercept the default Servlet ? stack servlets ? forward to specific class ?

2005-10-20 Thread Darryl L. Miles


I would like to change a sub-tree (/subdir) of my web-app so that I run 
every request runs through my own default servlet (for a security check) 
then if it drops out of the bottom I wish to forward to tomcat's default 
servlet.



Does Servlet technology allow the stacking of servlets, so mine can be 
innermost and get first choice on creating a response or doing nothing 
and letting the next outermost servlet have a go with the request ?


Can I forward the request I'm holding to a specific servlet class ?

What config changed to I need to make to web.xml ?  I'm thinking i just 
create my new servlet and declare a servlet mapping of the containing 
directory tree /subdir/.


Do you have any advise about the situation that I might find useful?


Many Thanks

Darryl

--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can you intercept the default Servlet ? stack servlets ? forward to specific class ?

2005-10-20 Thread Brantley Hobbs
It sounds like a filter might be what you're looking for.

http://java.sun.com/products/servlet/Filters.html

B.

 -Original Message-
 From: Darryl L. Miles [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 20, 2005 10:51 AM
 To: Tomcat Users List
 Subject: Can you intercept the default Servlet ? stack servlets ?
forward
 to specific class ?
 
 
 I would like to change a sub-tree (/subdir) of my web-app so that I
run
 every request runs through my own default servlet (for a security
check)
 then if it drops out of the bottom I wish to forward to tomcat's
default
 servlet.
 
 
 Does Servlet technology allow the stacking of servlets, so mine can be
 innermost and get first choice on creating a response or doing nothing
 and letting the next outermost servlet have a go with the request ?
 
 Can I forward the request I'm holding to a specific servlet class ?
 
 What config changed to I need to make to web.xml ?  I'm thinking i
just
 create my new servlet and declare a servlet mapping of the containing
 directory tree /subdir/.
 
 Do you have any advise about the situation that I might find useful?
 
 
 Many Thanks
 
 Darryl
 
 --
 Darryl L. Miles
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Trouble finding Datsource Resource with DataSourceRealm

2005-10-20 Thread GB Developer
I should have mentioned, I have a ContextListener that contains the
following:

---
initCtx = new InitialContext();
envCtx  = (Context) initCtx.lookup(java:comp/env);

logger.info(*** loading Data Source);
try {
ds = (DataSource) envCtx.lookup(sql/DataSource);
application.setAttribute(services.datasource, ds);
logger.info(*** DataSource loaded @ services.datasource);
} catch (NamingException ne) {
logger.fatal(ERROR loading DataSource: , ne);
}
---

And I get both 'info' messages.  So the DataSource resource is being loaded,
and it *can* be found at sql/DataSource (by my code in the context
listener).  It's just the Realm that can't seem to find it, as indicated by
the stacktrace below.

However, leaving no stone un-turned, I deleted the entire work directory for
the 'foo' host and get the same result. 


This still appears in the engine log when I attempt to authenticate: 

2005-10-20 09:51:15 DataSourceRealm[]: Exception performing authentication
javax.naming.NameNotFoundException: Name sql is not bound in this Context
  at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
  at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:437)
  at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:
277)
  at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe
nticator.java:129)



 -Original Message-
 From: Stanley Bradbury [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 19, 2005 8:07 PM
 To: Tomcat Users List
 Subject: Re: Trouble finding Datsource Resource with DataSourceRealm
 
 big snip /

 
 Hi -
 I had a similar problem (with 5.5.12) that turned out to be 
 related to 
 restart persistence (see post 10/17 Subj: Odd problem with Restart 
 Persistance... for more info).  You can do a quick test by 
 deleting the 
 SESSIONS.ser file in ...work/Catalina/localhost/myWebApp 
 (or whatever 
 name and host relates to your installation) - start Tomcat and see if 
 the datasource is found.  If so, you will want to disable restart 
 persistance for this App (see my note for more info).
 
 Hope this Helps
 
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FTP from Tomcat Servlet: Socket Timeouts

2005-10-20 Thread Jacob Hookom
I'm attempting to create an HTTP-FTP proxy servlet. The remote FTP server
works fine and is accessible, in addition, the Java code I have (Commons
Net) is able to connect fine to the remote FTP from eclipse.

The problem with connection timeouts only occurs when the same code is
placed in a servlet within Tomcat. Initially, I was getting remote host
timeout messages from FTPClient, but then nailed it down to timing out of
the actual Socket creation. No security errors are thrown.

I'm wondering if anyone had suggestions on how I could go about resolving
this issue?

Cheers!
Jacob


Re: Can you intercept the default Servlet ? stack servlets ? forward to specific class ?

2005-10-20 Thread Tim Funk

There called ServletFilters.

-Tim

Darryl L. Miles wrote:



I would like to change a sub-tree (/subdir) of my web-app so that I run 
every request runs through my own default servlet (for a security check) 
then if it drops out of the bottom I wish to forward to tomcat's default 
servlet.



Does Servlet technology allow the stacking of servlets, so mine can be 
innermost and get first choice on creating a response or doing nothing 
and letting the next outermost servlet have a go with the request ?


Can I forward the request I'm holding to a specific servlet class ?

What config changed to I need to make to web.xml ?  I'm thinking i just 
create my new servlet and declare a servlet mapping of the containing 
directory tree /subdir/.


Do you have any advise about the situation that I might find useful?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WAR versions

2005-10-20 Thread Zohar Amir

any standard entry for that?

- Original Message - 
From: David Delbecq [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 20, 2005 4:47 PM
Subject: Re: WAR versions



manifest as name of .war is used by tomcat during deployement to name
the webapp :)

Zohar Amir a écrit :


Hello,
I was wondering what is the best way to indicate a war file's version.
Should the file's name indicate it (e.g., bla_1.3.2.war), and/or
should the manifest in META-INF include an entry for it?
Thanks,
Zohar.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Accessing resource from another context.. ..

2005-10-20 Thread Robert Graf-Waczenski
Remember that you have to configure your web context app1 to
allow cross-context access. If you have not done so, the method
you call below will always return null.

So your context xml file should look similar to this here:

Context docBase=YOUR_DOC_BASE crossContext=true/

I.e. the parameter crossContext=true must be there, otherwise
all calls to getContext() with whatever cross-context path will
return null.

Robert

 -Original Message-
 From: Archana Mathur [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 20, 2005 5:03 PM
 To: Tomcat Users List
 Subject: Accessing resource from another context.. ..
 
 
 Hi,
 I have got a jsp page a.jsp within tomcat 5.5.9 application 
 (say app1). I need to access some other page a2  which is at 
 different location ( at root context) within a.jsp.
 Example - http://localhost/app1/a.jsp - (a.jsp  wants access 
 to other jsp which is at location (http://localhost/a2.jsp) - 
 root context
  
 tag jsp:include  will only pick up pages from current context (app1)
  
 I added had some code in my jsp page  to make it working -
 ServletContext ctx = pageContext.getServletContext().getContext(/);
 String myUrl = /a2.jsp; 
  RequestDispatcher dispatcher = ctx.getRequestDispatcher(myUrl); 
  dispatcher.include(request, response);
 Somehow getContext(/) returns me null. After reading 
 getContext method ,it mentions -  In security conscious 
 environments, the servlet engine can return null for a given 
 URL.  What do I need to do so that this getContext(/) 
 doen't return null value. 
  
 Please help..
  
 Archana
  
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jakarta verisign transaction slow?

2005-10-20 Thread Tim Tyler

  Jakarta experts,

We are running Jakarta 5.0 on an AIX 5.1 system.  We have never worked with 
jakarta before.  We seem to have it successfully installed.  We are using 
it to make financial transactions through Verisign's Payflowpro java 
programs.   As far as we can tell the transactions appear to be successful, 
but rather slow.  I don't know if slow is a perception or if there is 
something we can do to improve performance.  Tech support at Verisign 
suggested the slowness would be at our end if we are in fact slow.  We see 
posts take 13 seconds and longer.  My first question is what should our 
expectations be with regards to how long a transaction might take?   Is 
there anything we can configure that might make java programs that run 
through Jakarta go faster?
  Note: We are using jdk 1.4 underneath.  If I left out any important 
information, please let me know.



Tim Tyler
Network Engineer - Beloit College
[EMAIL PROTECTED] 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FTP from Tomcat Servlet: Socket Timeouts

2005-10-20 Thread Jacob Hookom
I'm attempting to create an HTTP-FTP proxy servlet. The remote FTP server
works fine and is accessible, in addition, the Java code I have (Commons
Net) is able to connect fine to the remote FTP from eclipse.

The problem with connection timeouts only occurs when the same code is
placed in a servlet within Tomcat. Initially, I was getting remote host
timeout messages from FTPClient, but then nailed it down to timing out of
the actual Socket creation. No security errors are thrown.

I'm wondering if anyone had suggestions on how I could go about resolving
this issue?

Cheers!
 Jacob


Memory leaks solved

2005-10-20 Thread Lionel Farbos
A usefull link :
http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669

This could be added to the FAQ deployment ( 
http://tomcat.apache.org/faq/deployment.html#deployMemIncrease)...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ajp13.service() Error

2005-10-20 Thread MC Moisei

Anyone can tell why I get errors like this in apache2's error log ?
I have tomcat in tandam with apache2 and I use the mod_jk for that purpose.
The errors seems not critical but nonetheless they are errors.

[Thu Oct 20 09:11:50 2005] [error] ajp13.service() ajpGetReply recoverable 
error 3
[Thu Oct 20 09:11:50 2005] [error] ajp13.service() Error  forwarding 
ajp13:localhost:8009 1 0
[Thu Oct 20 09:11:50 2005] [error] mod_jk2.handler() Error connecting to 
tomcat 3, status 200
[Thu Oct 20 09:37:32 2005] [error] ajp13.service() ajpGetReply recoverable 
error 3
[Thu Oct 20 09:37:32 2005] [error] ajp13.service() ajpGetReply recoverable 
error 3
[Thu Oct 20 09:37:32 2005] [error] ajp13.service() Error  forwarding 
ajp13:localhost:8009 1 0
[Thu Oct 20 09:37:32 2005] [error] mod_jk2.handler() Error connecting to 
tomcat 3, status 200



Constantin
http://www.goodstockimages.com





From: Jukka Uusisalo [EMAIL PROTECTED]
Reply-To: Tomcat Users List users@tomcat.apache.org
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: JAASRealm, Tomcat 5.5 getting HTTP error page 403 Access 
denied

Date: Thu, 20 Oct 2005 18:37:31 +0300

Carsten Schiller wrote:

Hello!

We are trying to implement a login/security environment using Tomcat 5.5's 
JAASRealm and Struts as a MVC-Framework.
After Login ,which fails with error HTTP Status 403 - Access to the 
requested ressource has been denied, we can navigate manually to our 
output.jsp and use ...

%= request.getUserPrincipal % , ...
%= request.isUserInRole(administrator) % ...
logic:present role=administrator
Admin present!
/logic:present

These return correct username, (true) for isUserInRole, and the logic tag 
also works... BUT
Our problem is: We protected *.do in our web.xml to be only accessible by 
users in role administrator, which fails as described above. Why does 
the login fail, but we still get a valid Subject with Principals, and can 
access the roles on the output.jsp?
We are stuck now for over a week, reading tutorials, asking google, but 
with no success... Any Ideas would be appreciated!




Hi,

I think resources that does not require authentication, like your
output.jsp, should return null from request.getUserPrincipal().

But what kind of JAAS loginmodule you have? Does that login module
work correctly?

- Jukka -

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JAASRealm, Tomcat 5.5 getting HTTP error page 403 Access denied

2005-10-20 Thread Brad O'Hearne
I'm presently waist deep in my own JAASRealm / JAAS login module /  
single signon implementation myself, so I'm sorry I can't answer your  
question directly at the moment. But after I'm through this, I'm  
going to put together a FAQ and examples and put them up on a  
website. JAAS authentication and single signon is too important for  
there to be confusion surrounding it. Hopefully next week I'll be  
able to do this.


Brad


On Oct 20, 2005, at 8:37 AM, Jukka Uusisalo wrote:


Carsten Schiller wrote:


Hello!
We are trying to implement a login/security environment using  
Tomcat 5.5's JAASRealm and Struts as a MVC-Framework.
After Login ,which fails with error HTTP Status 403 - Access to  
the requested ressource has been denied, we can navigate manually  
to our output.jsp and use ...

%= request.getUserPrincipal % , ...
%= request.isUserInRole(administrator) % ...
logic:present role=administrator
Admin present!
/logic:present
These return correct username, (true) for isUserInRole, and the  
logic tag also works... BUT
Our problem is: We protected *.do in our web.xml to be only  
accessible by users in role administrator, which fails as  
described above. Why does the login fail, but we still get a valid  
Subject with Principals, and can access the roles on the output.jsp?
We are stuck now for over a week, reading tutorials, asking  
google, but with no success... Any Ideas would be appreciated!




Hi,

I think resources that does not require authentication, like your
output.jsp, should return null from request.getUserPrincipal().

But what kind of JAAS loginmodule you have? Does that login module
work correctly?

- Jukka -

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL on Tomcat 5.5 9 - non-secure pages

2005-10-20 Thread Greg Brownell

All,

I have set up tomcat 5.5.9 with SSL as follows:

server.xml:


   !-- Define a non-SSL HTTP/1.1 Connector on port (8080 changed to 
9123 --

   Connector port=80 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=443 acceptCount=100
  connectionTimeout=2 disableUploadTimeout=true /

   !-- Define a SSL HTTP/1.1 Connector on port 443 --
   Connector port=443 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 scheme=https secure=true
   keystoreFile=/etc/.keystore
   keystorePass=
  clientAuth=false sslProtocol=TLS /

and web.xml:

security-constraint
 web-resource-collection
   web-resource-namesecure pages/web-resource-name
   url-pattern*.htm/url-pattern
 /web-resource-collection
 web-resource-collection
   web-resource-namesecure pages/web-resource-name
   url-pattern/login.jsp/url-pattern
 /web-resource-collection
 user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
/security-constraint
/web-app

The whole site, all pages, are redirected to port 443 - everything is 
secure.  I only wanted the *.htm and the single file login.jsp to use https.


What am I doing wrong?

Thanks.

Greg.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Accessing resource from another context.. ..

2005-10-20 Thread Archana Mathur
thanks Robert it works with this crossContext = true attribute. 

 [EMAIL PROTECTED] 10/20/05 04:21pm 
Remember that you have to configure your web context app1 to
allow cross-context access. If you have not done so, the method
you call below will always return null.

So your context xml file should look similar to this here:

Context docBase=YOUR_DOC_BASE crossContext=true/

I.e. the parameter crossContext=true must be there, otherwise
all calls to getContext() with whatever cross-context path will
return null.

Robert

 -Original Message-
 From: Archana Mathur [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 20, 2005 5:03 PM
 To: Tomcat Users List
 Subject: Accessing resource from another context.. ..
 
 
 Hi,
 I have got a jsp page a.jsp within tomcat 5.5.9 application 
 (say app1). I need to access some other page a2  which is at 
 different location ( at root context) within a.jsp.
 Example - http://localhost/app1/a.jsp - (a.jsp  wants access 
 to other jsp which is at location (http://localhost/a2.jsp) - 
 root context
  
 tag jsp:include  will only pick up pages from current context (app1)
  
 I added had some code in my jsp page  to make it working -
 ServletContext ctx = pageContext.getServletContext().getContext(/);
 String myUrl = /a2.jsp; 
  RequestDispatcher dispatcher = ctx.getRequestDispatcher(myUrl); 
  dispatcher.include(request, response);
 Somehow getContext(/) returns me null. After reading 
 getContext method ,it mentions -  In security conscious 
 environments, the servlet engine can return null for a given 
 URL.  What do I need to do so that this getContext(/) 
 doen't return null value. 
  
 Please help..
  
 Archana
  
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 




RE: Problems with web.xml generated from RAD and from Ecplise.

2005-10-20 Thread Caldarale, Charles R
 From: Developer Developer [mailto:[EMAIL PROTECTED] 
 Subject: Re: Problems with web.xml generated from RAD and 
 from Ecplise.
 
  As far as my problem is concered, I solved it. Tomcat (5.5) does not
 support 2.4 V of the servlet.

That's simply not true - Tomcat 5.5.x fully supports version 2.4 of the
Servlet spec.  As I recall, your problem was that RAD was generating 2.4
constructs while specifying 2.2 in the XML header - a bug in RAD, not
Tomcat.

 - Chuck


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with web.xml generated from RAD and from Ecplise.

2005-10-20 Thread Hassan Schroeder
Developer Developer wrote:

  As far as my problem is concered, I solved it. Tomcat (5.5) does not
 support 2.4 V of the servlet.

That's simply not true. Whatever your RAD problem involved, that's
not part of it :-)

-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Windows, Runtime.exec() problems

2005-10-20 Thread David Teran

Hi,

i am trying to call a native application from a servlet application  
(specifically an webservice based on axis 1.3) with the following code:


Process p = Runtime.getRuntime().exec(args);
StreamReader isr = new StreamReader(p.getInputStream()); //  
just uses separate thread to read from the process
StreamReader esr = new StreamReader(p.getErrorStream()); //  
just uses separate thread to read from the process

try {
p.waitFor();
} catch (InterruptedException e) {}
Result r = new Result(isr.getResult(), esr.getResult());

the problem is that the application which is called with the exec  
command, a realbasic app which uses OLE to print out documents with  
PowerPoint does not work if this code is called inside the tomcat  
JVM. If i copy paste the code to a simple class, compile the class  
and use the same arguments for the exec, everything works fine.


I am quite new to windows, just have a lot of UNIX experience and i  
am lost here.


regards, David


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Windows, Runtime.exec() problems

2005-10-20 Thread jacob hookom
You might be experiencing the same issues I just had
with FTP sockets-- make sure your windows firewall is
disabled.

--- David Teran [EMAIL PROTECTED] wrote:

 Hi,
 
 i am trying to call a native application from a
 servlet application  
 (specifically an webservice based on axis 1.3) with
 the following code:
 
  Process p =
 Runtime.getRuntime().exec(args);
  StreamReader isr = new
 StreamReader(p.getInputStream()); //  
 just uses separate thread to read from the process
  StreamReader esr = new
 StreamReader(p.getErrorStream()); //  
 just uses separate thread to read from the process
  try {
  p.waitFor();
  } catch (InterruptedException e) {}
  Result r = new Result(isr.getResult(),
 esr.getResult());
 
 the problem is that the application which is called
 with the exec  
 command, a realbasic app which uses OLE to print out
 documents with  
 PowerPoint does not work if this code is called
 inside the tomcat  
 JVM. If i copy paste the code to a simple class,
 compile the class  
 and use the same arguments for the exec, everything
 works fine.
 
 I am quite new to windows, just have a lot of UNIX
 experience and i  
 am lost here.
 
 regards, David
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OffTopic Big Picture Question XForms vs JFS ??

2005-10-20 Thread Bovy, Stephen J
 Can anyone out there give me some opinion or perspective or web links
 that explain how Xforms and JFS fit together in the big picture,

 (I.E.) yes, they are complementary and they do fit together
no, they conflict and are separate competing technologies  

Thanks in advance for any answers (:

Please feel free to reply to me privately, so as not to clutter the
mailing list (:

Stephen Bovy
Computer Associates
6100 Center Drive
Suite 700
Los Angeles, CA 90045
Tel: (310) 957-3930
Fax: (310) 957-3917
Mobile: (818) 352-9917
e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



context.xml file and war

2005-10-20 Thread Alexander Eller

Hello list users,

after searching the documenation and the internet, I finally ask the 
list for help: I want to deploy an application as a war file. As I need 
to configure JNDI Resources (datasources), I want to use a 
context-specific xml file instead of modifying server.xml. But I can't 
get it working.
If I've a WAR-File and a context-specific xml file in the 
webapps-directory, the war file is deployed automatic (i.e. decompressed 
), but the context-specific xml-file is ignored. After searching the 
net, I tried to put my context-specific file as context.xml in META-INF 
of the WAR, but that does not work (it seems, thats an option for TC 5 
and above only).


How can I deploy my App as a WAR file _and_ use a context specific xml file?

I use Tomcat 4.1.30 with JDK 1.4.2_08

thank you for your answers
Alexander

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How do I configure my own certificate realm to tomcat 5.5.9?

2005-10-20 Thread Sara Hugh
Hi all,
Please help. I do not know how to configure user
certificate realm in the tomcat conf/server.xml. I
have been reading and searching around on internet,
but I did not get any. The only information I got is
for basic authentication. I wonder if tomcat accepts
user certificate realm. If anyone know how, could you
please help me?

thank you very much in advance,
Sara



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple SSL Virtual Hosts on Port 443 - Tomcat 5.5.12

2005-10-20 Thread Jay Thompson


I am trying to configure tomcat 5.5.12 for multiple virtual hosts on port 
443. SSL works fine

if I set server.xml to listen for all IPs on port 443...

connection port=443
   blah
   blah/

However, if I try to configure to listen to a specific IP address on port 
443...


connection port=443
   address=111.112.113.114
   blah
   blah/

It doesn't work. Tomcat starts just fine. No errors. A run of netstat shows 
the server listening
on port 443 for the applicable IP address, but when I try to access the 
site with a browser, it
fails (IE reports Page cannot be displayed, Firefox reports Refused 
connection).


By the way...I get the same behavior if I use Apache as the server. When I 
set httpd.conf as...


Listen 443

It works fine, but if I set httpd.conf as...

Listen 111.112.113.114:443

I get the same behavior I got with tomcat.

Any ideas?




---
Jay Thompson
Support Systems Analyst, Sr.
Northern Arizona University
School of Forestry
[EMAIL PROTECTED]
(928) 523-8033


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk tomcat

2005-10-20 Thread Andrew Marcum


We are running mod_jk-1.2.13 and apache-2.0.54-r30 on a Gentoo
box running the 2.6.10 kernel and when Tomcat is restarted,
if a request is made to the Tomcat URL soon after the restart
(within 10 seconds), Apache responds with Service Temporarily
Unavailable and will continue to so for a few minutes.

However, if a request is made 30 - 40 seconds after the
restart, Tomcat responds immediately.

My question is how do I get mod_jk (which I think is the
problem) to check the service quicker? I have changed
worker.maintain to a lower value in the workers.properties
file, but that did not fix the problem.

I am hoping that there is some time out setting that I can
set to force mod_jk to recheck that Tomcat is back up.

Thanks in advance,

Andrew Marcum


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to open Tomcat Manager?

2005-10-20 Thread andy gordon
hi, 
 
If you are intending on using MySQL and a JDBC Realm for access control, then 
the Tomcat-users.xml file is not used. I am wondering if in your role table you 
have two rows for user name admin? if not then this could be your problem as 
there has to be one row for each role a specific user name performs.
 
- andy  

±ç¬±³õ [EMAIL PROTECTED] wrote:
My tomcat-users.xml

 My tomcat-users.xml
 ?xml version='1.0' encoding='utf-8'?
 tomcat-users
 role rolename=tomcat/
 role rolename=role1/
 role rolename=manager/
 role rolename=admin/
 user username=tomcat password=tomcat roles=tomcat/
 user username=role1 password=tomcat roles=role1/
 user username=both password=tomcat roles=tomcat,role1/
 user username=admin password=abc123 roles=admin,manager/
 /tomcat-users



My server.xml
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost:3306/erp
connectionName=root connectionPassword=abc123 digest=MD5
userTable=user_profile userNameCol=usernm userCredCol=passwd
userRoleTable=user_role roleNameCol=role_name /

I have inputted username and user role in tables.

Still receive this message

HTTP Status 403 - Access to the requested resource has been denied

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
 Yahoo! FareChase - Search multiple travel sites in one click.  

Tomcat 5.5.12 -- Roles being lost and causing authorization to fail

2005-10-20 Thread Brad O'Hearne
Hey all,

I just got a JAASRealm working in Tomcat, successfully authenticating against 
my loging module. In my login module, I am successfully storing a role 
principal manager inside the authenticated subject, which Tomcat logging 
confirms. Immediately after authentication, Tomcat then tries to authorize 
the request to forward to  the expected URL, which is protected by container 
managed security (i.e. web.xml) and allowing access to role user manager. 
The problem is that even though I am successfully storing the role principal 
for the manager role in my subject, Tomcat's RealmBase is not finding the 
role, and authorization is failing, hence the request errors out. The log is 
below, can anyone help me out with why this is failing? 

Thanks, 

Brad

20-10 13:59:06,322 DEBUG (JAASRealm.java:authenticate:393)  -JAAS LoginContext 
created for username brado
20-10 13:59:06,324 DEBUG (JAASRealm.java:createPrincipal:476)  -Checking 
Principal Principal: 
name=brado [com.redbarnsoftware.web.security.UserPrincipal]
20-10 13:59:06,325 DEBUG (JAASRealm.java:createPrincipal:482)  -Principal 
brado is a valid user class. We will use this as the user Principal.
20-10 13:59:06,326 DEBUG (JAASRealm.java:createPrincipal:476)  -Checking 
Principal Principal: 
name=manager [com.redbarnsoftware.web.security.RolePrincipal]
20-10 13:59:06,327 DEBUG (JAASRealm.java:createPrincipal:489)  -Adding role 
Principal manager to this user Principal's roles
20-10 13:59:06,341 DEBUG (JAASRealm.java:authenticate:402)  -Username brado 
successfully authenticated as Principal {1} -- Subject was created too
20-10 13:59:06,358 DEBUG (CoyoteAdapter.java:parseSessionCookiesId:410)  - 
Requested cookie session id is 43C9C12A1726C5075DD45209A3967014
20-10 13:59:06,359 DEBUG (SingleSignOn.java:invoke:342)  -Process request for 
'/iocaine/'
20-10 13:59:06,360 DEBUG (SingleSignOn.java:invoke:353)  - Checking for SSO 
cookie
20-10 13:59:06,361 DEBUG (SingleSignOn.java:invoke:373)  - Checking for cached 
principal for 91F06522EDD456D4AD2B0269570839A1
20-10 13:59:06,368 DEBUG (SingleSignOn.java:invoke:388)  - No cached principal 
found, erasing SSO cookie
20-10 13:59:06,369 DEBUG (RealmBase.java:findSecurityConstraints:461)  -  
Checking constraint 'SecurityConstraint[iocaine]' against 
GET //WEB-INF/jsp/index.jsp -- true
20-10 13:59:06,370 DEBUG (RealmBase.java:findSecurityConstraints:505)  -  
Checking constraint 'SecurityConstraint[iocaine]' against 
GET //WEB-INF/jsp/index.jsp -- true
20-10 13:59:06,371 DEBUG (RealmBase.java:findSecurityConstraints:571)  -  
Checking constraint 'SecurityConstraint[iocaine]' against 
GET //WEB-INF/jsp/index.jsp -- true
20-10 13:59:06,372 DEBUG (RealmBase.java:findSecurityConstraints:628)  -  
Checking constraint 'SecurityConstraint[iocaine]' against 
GET //WEB-INF/jsp/index.jsp -- true
20-10 13:59:06,373 DEBUG (RealmBase.java:hasUserDataPermission:847)  -  User 
data constraint has no restrictions
20-10 13:59:06,680 DEBUG (SingleSignOn.java:register:576)  -Registering sso id 
'1F6A37C1E95F8026BB25A6420E6B6B3A' for user 'brado' with auth type 'FORM'
20-10 13:59:06,698 DEBUG (SingleSignOn.java:associate:431)  -Associate sso id 
1F6A37C1E95F8026BB25A6420E6B6B3A with session 
StandardSession[43C9C12A1726C5075DD45209A3967014]
20-10 13:59:06,703 DEBUG (RealmBase.java:hasResourcePermission:737)  -  
Checking roles Principal: name=brado
20-10 13:59:06,704 DEBUG (RealmBase.java:hasResourcePermission:766)  -No role 
found:  manager

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Unable to open Tomcat Manager?

2005-10-20 Thread Caldarale, Charles R
 From: Giorgio Clavelli [mailto:[EMAIL PROTECTED] 
 Subject: Re: Unable to open Tomcat Manager?
 
 I solved it by deleting the all Server files and re-unzip 
 them back in the same location (possibly not required this
 deletion but who knows?).

I seriously doubt that had anything to do with it.  Note that you cannot
manually edit tomcat-users.xml while Tomcat is running, since Tomcat
rewrites it at some point (probably at termination, but I haven't
verified that).  You can update it on the fly with the Admin app; of
course you have to login with a userid that has the admin role to do so.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: jakarta verisign transaction slow?

2005-10-20 Thread Caldarale, Charles R
 From: Tim Tyler [mailto:[EMAIL PROTECTED] 
 Subject: jakarta verisign transaction slow?
 
 We are running Jakarta 5.0 on an AIX 5.1 system.

It's Tomcat, not Jakarta.  (Jakarta is an umbrella project of the Apache
Software Foundation for many Java-based products, such as Tomcat -
although Tomcat was recently promoted out of Jakarta to be a direct
project of ASF.)

 We see posts take 13 seconds and longer.

That seems exceptionally slow.  Do the client requests require
connection to a Verisign server?  If so, do you have any way of
capturing network traffic so you can see the timing for the client
requests coming into your AIX server, the requests to and responses from
Verisign, and the response from AIX back to the client?  That should
tell you where to focus your investigation.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to open Tomcat Manager?

2005-10-20 Thread 梁炳場
Yes, Andy.
I use MySQL and JDBCRealm.
If tomcat-users.xml is ignored, it is fine.

But I have entered records in table of user and user role.
I have tried input the password in both plain text and MD5 encrypted
in user table. Still not okay.



2005/10/21, Caldarale, Charles R [EMAIL PROTECTED]:
  From: Giorgio Clavelli [mailto:[EMAIL PROTECTED]
  Subject: Re: Unable to open Tomcat Manager?
 
  I solved it by deleting the all Server files and re-unzip
  them back in the same location (possibly not required this
  deletion but who knows?).

 I seriously doubt that had anything to do with it.  Note that you cannot
 manually edit tomcat-users.xml while Tomcat is running, since Tomcat
 rewrites it at some point (probably at termination, but I haven't
 verified that).  You can update it on the fly with the Admin app; of
 course you have to login with a userid that has the admin role to do so.

  - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Bug in RealmBase, JAASRealm, and/or Requestt object preventing proper role authorization

2005-10-20 Thread Caldarale, Charles R
 From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
 Subject: Bug in RealmBase, JAASRealm, and/or Requestt object 
 preventing proper role authorization
 
 When this statement executes, principal is not a 
 GenericPrincipal, by merits of the request's 
 getUserPrincipal() method executed prior to calling
 this method -- it is instead a custom user principal.

What happens if you have your custom principal extend GenericPrincipal?
It appears that all the interesting fields are marked as protected, so
you should be able to set them in a subclass.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in RealmBase, JAASRealm, and/or Requestt object preventing proper role authorization

2005-10-20 Thread Brad O'Hearne

Charles,

I addressed this at the bottom of my email. It might be a hack that 
would work, but you would effectively be duplicating what the JAASRealm 
is doing already. The JAASRealm takes the user principal and role 
principal, and shoves them into a GenericPrinicipal. If you wanted to 
try to game the authorization, you'd have to take your role principal, 
shove it into the user principal, then let the realm shove both of those 
again into another GenericPrincpal that wrapped it. Then it would get 
your custom user principal, and the authorization might work. I thought 
about that too, but I don't know enough about the other source code to 
know if it is safe and would affect things elsewhere in code. It is 
clear from these methods that assumptions are being made based on class 
types. Such a hack would almost certainly be broken if any changes were 
made  to this part of the code.


B

Caldarale, Charles R wrote:

From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
Subject: Bug in RealmBase, JAASRealm, and/or Requestt object 
preventing proper role authorization


When this statement executes, principal is not a 
GenericPrincipal, by merits of the request's 
getUserPrincipal() method executed prior to calling

this method -- it is instead a custom user principal.
   



What happens if you have your custom principal extend GenericPrincipal?
It appears that all the interesting fields are marked as protected, so
you should be able to set them in a subclass.

- 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Bug in RealmBase, JAASRealm, and/or Requestt object preventing proper role authorization

2005-10-20 Thread Caldarale, Charles R
 From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
 Subject: Re: Bug in RealmBase, JAASRealm, and/or Requestt 
 object preventing proper role authorization
 
 If you wanted to try to game the authorization, you'd have to 
 take your role principal, shove it into the user principal, 
 then let the realm shove both of those again into another 
 GenericPrincpal that wrapped it.

No, that's wrappering.  What I suggested was declaring your custom
principal as a subclass of GenericPrincipal so the JAASRealm code could
use it directly.

 I thought about that too, but I don't know enough about the 
 other source code to know if it is safe and would affect 
 things elsewhere in code.

The rules of subclassing make this perfectly safe.  The rest of the code
may be using your object, but the other code can only refer to it via
the methods declared in the superclass GenericPrincipal; whatever
customization you've made is invisible to the rest of Tomcat.  You would
also have the freedom of overriding the GenericPrincipal methods to suit
your needs.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Bug in RealmBase, JAASRealm, and/or Requestt object preventing proper role authorization

2005-10-20 Thread Caldarale, Charles R
 From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
 Subject: Re: Bug in RealmBase, JAASRealm, and/or Requestt 
 object preventing proper role authorization
 
 So in the JAAS login module, what you would have to do 
 is instantiate a user principal that is a subclass of 
 GenericPrinicipal for your user principal, then add your
 role principals to that user principal, and then add the 
 user principal and all the role principals to the subject.

No, you don't need to go through those steps yourself, since the
JAASRealm will do it for you.

 What an ugly hack though.

I guess I don't see the ugliness - that's what subclassing is for.
Would be nice if the behavior were actually documented...

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in RealmBase, JAASRealm, and/or Requestt object preventing proper role authorization

2005-10-20 Thread Brad O'Hearne

Chuck,

The JAASRealm takes whatever user principal you have and the role  
principal you have added to the subject, and creates a new  
GenericPrincipal class, containing both your user principal and your  
role principal. I do not think it populates your custom user  
principal with roles. The problem is in the request.getUserPrincipal 
() method, which pulls the user principal out of the wrapper. The  
hasRole wants a GenericPrincipal containing the roles.  So since the  
method is getting your custom user principal, not the wrapper that  
the realm has created, you have to populate your custom user  
principal with the roles.


Btw, it appears that this was already logged as bug:

http://issues.apache.org/bugzilla/show_bug.cgi?id=37044

B

On Oct 20, 2005, at 9:25 PM, Caldarale, Charles R wrote:


From: Brad O'Hearne [mailto:[EMAIL PROTECTED]
Subject: Re: Bug in RealmBase, JAASRealm, and/or Requestt
object preventing proper role authorization

So in the JAAS login module, what you would have to do
is instantiate a user principal that is a subclass of
GenericPrinicipal for your user principal, then add your
role principals to that user principal, and then add the
user principal and all the role principals to the subject.



No, you don't need to go through those steps yourself, since the
JAASRealm will do it for you.



What an ugly hack though.



I guess I don't see the ugliness - that's what subclassing is for.
Would be nice if the behavior were actually documented...

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Bug in RealmBase, JAASRealm, and/or Requestt object preventing proper role authorization

2005-10-20 Thread Caldarale, Charles R
 From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
 Subject: Re: Bug in RealmBase, JAASRealm, and/or Requestt 
 object preventing proper role authorization
 
 The JAASRealm takes whatever user principal you have and the role  
 principal you have added to the subject, and creates a new  
 GenericPrincipal class

That's the part I was missing - that JAASRealm creates a new object, and
does not attempt to use your custom principal, even if it is a subclass
of GenericPrincipal.

 Btw, it appears that this was already logged as bug:
 http://issues.apache.org/bugzilla/show_bug.cgi?id=37044

The resolution is fixed, but it doesn't say what build level the fix
will be in.  Could check the nightlies, I suppose.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



session problem

2005-10-20 Thread David Won
I developed a very simple project, there is a jsp page and a servlet. 

In servlet: session.setAttribute(my,abc);

In jsp: String mystring = (String) session.getAttribute(my);

This project works perfect in one of my PC, but when I deployed it to another 
PC, mystring in jsp always gets a null from the session.

The tomcat version in both PC are exactly same.

Any help would be greatly appreciated! Thank you!

David





-
 Yahoo! FareChase - Search multiple travel sites in one click.