Tomcat clearing conf/Catalina/localhost/ROOT.xml

2007-08-07 Thread Mark Benussi
I am running Tomcat and everytime I restart the web application it keeps on
clearing my ROOT.xml file back to its initial state (Very sparse).
 
So I keep on losing my environment variables and Resources...
 
Any thoughts?
 

With regards,

Mark Benussi, IBT Services

[EMAIL PROTECTED]
Tel +44 870 850 1081
Mob +44 7714 767407
Fax +44 7092 094490

HYPERLINK http://www.ibt.com/;


   _  

This communication and any attachments contain information which is
confidential and may also be privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s) please note
that any form of disclosure, distribution, copying or use of this
communication or the information in it or in any attachments is strictly
prohibited and may be unlawful. If you have received this communication in
error, please return it with the title Received in error to
[EMAIL PROTECTED] then delete the email and destroy any copies of it.

E-mail communications cannot be guaranteed to be secure or error free, as
information could be intercepted, corrupted, amended, lost, destroyed,
arrive late or incomplete, or contain viruses. We do not accept liability
for any such matters or their consequences. Anyone who communicates with us
by e-mail is taken to accept the risks in doing so.

 

HYPERLINK skype:mark_benussi?add 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 06/08/2007
16:53
 


RE: Tomcat clearing conf/Catalina/localhost/ROOT.xml

2007-08-07 Thread Mark Benussi
Still here Leon :) (I used to be on this list years ago)

All sorted. I had a context entry under my host in the server.xml which was
causing the ROOT.xml to be re-written every time.

skype:mark_benussi?add 

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: 07 August 2007 13:26
To: Tomcat Users List
Subject: Re: Tomcat clearing conf/Catalina/localhost/ROOT.xml

put a context.xml (with same content) into the META_INF folder of your ROOT
folder / war instead.

regards
leon

On 8/7/07, Mark Benussi [EMAIL PROTECTED] wrote:
 I am running Tomcat and everytime I restart the web application it 
 keeps on clearing my ROOT.xml file back to its initial state (Very
sparse).

 So I keep on losing my environment variables and Resources...

 Any thoughts?


 With regards,

 Mark Benussi, IBT Services

 [EMAIL PROTECTED]
 Tel +44 870 850 1081
 Mob +44 7714 767407
 Fax +44 7092 094490

 HYPERLINK http://www.ibt.com/;


_

 This communication and any attachments contain information which is 
 confidential and may also be privileged. It is for the exclusive use 
 of the intended recipient(s). If you are not the intended recipient(s) 
 please note that any form of disclosure, distribution, copying or use 
 of this communication or the information in it or in any attachments 
 is strictly prohibited and may be unlawful. If you have received this 
 communication in error, please return it with the title Received in 
 error to [EMAIL PROTECTED] then delete the email and destroy any
copies of it.

 E-mail communications cannot be guaranteed to be secure or error free, 
 as information could be intercepted, corrupted, amended, lost, 
 destroyed, arrive late or incomplete, or contain viruses. We do not 
 accept liability for any such matters or their consequences. Anyone 
 who communicates with us by e-mail is taken to accept the risks in doing
so.



 HYPERLINK skype:mark_benussi?add

 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 
 06/08/2007
 16:53



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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 06/08/2007
16:53
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 06/08/2007
16:53
 


-
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 on Plesk

2007-08-07 Thread Mark Benussi
I've installed Tomcat on port 9080 (SSL 9443) on a box running Plesk.
 
What do I have to do to get requests on the box forwarded from 80 and 443 on
to Tomcat 9080 and 9443.
 
I am normally happy to play but this is a production box and the
administrators have little knowledge outside of Plesk standard features.
 

With regards,

Mark Benussi, IBT Services

[EMAIL PROTECTED]
Tel +44 870 850 1081
Mob +44 7714 767407
Fax +44 7092 094490

HYPERLINK http://www.ibt.com/;


   _  

This communication and any attachments contain information which is
confidential and may also be privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s) please note
that any form of disclosure, distribution, copying or use of this
communication or the information in it or in any attachments is strictly
prohibited and may be unlawful. If you have received this communication in
error, please return it with the title Received in error to
[EMAIL PROTECTED] then delete the email and destroy any copies of it.

E-mail communications cannot be guaranteed to be secure or error free, as
information could be intercepted, corrupted, amended, lost, destroyed,
arrive late or incomplete, or contain viruses. We do not accept liability
for any such matters or their consequences. Anyone who communicates with us
by e-mail is taken to accept the risks in doing so.

 

HYPERLINK skype:mark_benussi?add 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 06/08/2007
16:53
 


multiple instances of load-on-startup classes

2006-06-27 Thread Mark Benussi

We have a webapp running within Tomcat 5.0.28 on Linux.
The message log indicates that any load-on-startup classes are loaded 
twice. Also, any singleton objects created by these load-on-startup classes 
are created twice. This has been confirmed by stepping through the code via 
a debugger.


From what I have gathered from web search it looks like the webapp is being 
loaded twice - each instance of the webapp uses a seperate class-loader 
which accounts for seeing multiple instances of singleton objects.


Can anyone shed any light on what may is going on here. Is the webapp being 
loaded twice? Is there a problem with Tomcat's server.xml?


I have included the application log, server.xml and web.xml below:

+Application 
Log

+

DEBUG 10:37:29,411 CpmDigester:CpmDigester(...) - Config file name = 
'/usr/local/home/paphdv14/.cpm.xml'

DEBUG 10:37:29,527 CpmDigester:loadResults() - About to parse config file
DEBUG 10:37:29,682 CpmDigester:loadResults() - config file parsed
DEBUG 10:37:30,279 Information on the connection pool 'WEBCP'...
DEBUG 10:37:30,279   Number of active connections = 1
DEBUG 10:37:30,279   Number of idle connections = 0
INFO  10:37:31,369 Loading validation rules file from 
'/WEB-INF/validator-rules.xml'
INFO  10:37:31,375 Loading validation rules file from 
'/WEB-INF/validation-web.xml'

INFO  10:37:31,705 Tiles definition factory loaded for module '/web'.
DEBUG 10:37:31,731 WebLoginInitialiserPlugIn:init() - START
INFO  10:37:31,851 Tiles definition factory loaded for module '/imm'.
INFO  10:37:31,851 Loading validation rules file from 
'/WEB-INF/validator-rules.xml'
INFO  10:37:31,851 Loading validation rules file from 
'/WEB-INF/validation-imm.xml'
INFO  10:37:32,039 WebApplicationInitialisation:init(...) - Web application 
initialisation starting...
INFO  10:37:32,039 WebApplicationInitialisation:init(...) - Initialising 
context parameters.
DEBUG 10:37:32,039 WebApplicationInitialisation:init(...) - param = 
./web/mainPage.do


DEBUG 10:37:33,114 CpmDigester:CpmDigester(...) - Config file name = 
'/usr/local/home/paphdv14/.cpm.xml'

DEBUG 10:37:33,154 CpmDigester:loadResults() - About to parse config file
DEBUG 10:37:33,279 CpmDigester:loadResults() - config file parsed
DEBUG 10:37:33,816 Information on the connection pool 'WEBCP'...
DEBUG 10:37:33,817   Number of active connections = 1
DEBUG 10:37:33,817   Number of idle connections = 0
INFO  10:37:34,473 Loading validation rules file from 
'/WEB-INF/validator-rules.xml'
INFO  10:37:34,475 Loading validation rules file from 
'/WEB-INF/validation-web.xml'

INFO  10:37:34,854 Tiles definition factory loaded for module '/web'.
DEBUG 10:37:34,866 WebLoginInitialiserPlugIn:init() - START
INFO  10:37:34,918 Tiles definition factory loaded for module '/imm'.
INFO  10:37:34,918 Loading validation rules file from 
'/WEB-INF/validator-rules.xml'
INFO  10:37:34,918 Loading validation rules file from 
'/WEB-INF/validation-imm.xml'
INFO  10:37:34,982 WebApplicationInitialisation:init(...) - Web application 
initialisation starting...
INFO  10:37:34,982 WebApplicationInitialisation:init(...) - Initialising 
context parameters.
DEBUG 10:37:34,982 WebApplicationInitialisation:init(...) - param = 
./web/mainPage.do


#65279;?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

version=2.4
description/description
filter
 filter-nameSessionFilter/filter-name
 filter-classuk.co.etc.web.session.filter.SessionFilter/filter-class
/filter
filter-mapping
 filter-nameSessionFilter/filter-name
 url-pattern*.do/url-pattern
/filter-mapping
filter-mapping
 filter-nameSessionFilter/filter-name
 url-pattern*.jsp/url-pattern
/filter-mapping
filter-mapping
 filter-nameSessionFilter/filter-name
 url-pattern/servlet/*/url-pattern
/filter-mapping
servlet
 servlet-nameweb-app-init/servlet-name
 
servlet-classuk.co.etc.web.session.init.WebApplicationInitialisation/servlet-class

 init-param
  param-namemainPageUri/param-name
  param-value/web/mainPage.do/param-value
 /init-param
...
 load-on-startup0/load-on-startup
/servlet
servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config-main.xml/param-value
 /init-param
 init-param
  param-nameconfig/web/param-name
  param-value/WEB-INF/struts-config-web.xml/param-value
 /init-param
 init-param
  param-namedebug/param-name
  param-value3/param-value
 /init-param
 init-param
  param-namedetail/param-name
  param-value2/param-value
 /init-param
 load-on-startup2/load-on-startup
/servlet
servlet-mapping
 servlet-nameaction/servlet-name
 

RE: Integration with MQSeries

2005-11-28 Thread Mark Benussi
If you want to run Web Services on Tomcat look at Apache AXIS.

From AXIS services you are going to post messages to an MQ manager, probably
via JMS.

Then you will need to monitor the queue at the other end to call your
backend application.

I don't wish to be rude here but how have you come to these decisions? Has
the system been designed in the way by an architect?

-Original Message-
From: Mukherjee, Maharshi [mailto:[EMAIL PROTECTED] 
Sent: 28 November 2005 22:31
To: 'users@tomcat.apache.org'
Subject: Integration with MQSeries

 Hi,
 
 We are planning to use Tomcat for MQSeries integration.
 
 We need to create Web services that will run on a webserver. These web
 services will get the data from MQ, transform the data and call a backend
 application.
 
 Can we do this using Tomcat? Can anyone give me some sort of overview of
 how to do that? Any pointer related to this will be most welcome.
 
 Thanks,
 Maharshi
 
 

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



RE: JAAS implementation with URL callback

2005-11-08 Thread Mark Benussi
Write your own CallbackHandler and LoginModule.

-Original Message-
From: Pat Young [mailto:[EMAIL PROTECTED] 
Sent: 07 November 2005 20:01
To: 'Tomcat Users List'
Subject: JAAS implementation with URL callback

Does anyone know of an available JAAS implementation
that comes with a URL callback?  The Catalina
implementation only comes with a name and password
callback, but there is no way to get to the URL.

Thanks,
Pat Young




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
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: JAAS implementation with URL callback RANT!

2005-11-08 Thread Mark Benussi
I am going to have one of the most stupid rants in the world considering I
am on an open source distribution list but when did developers stop wanting
to learn stuff? I appreciate that there is time pressure on most projects,
and that frameworks like Struts make life very easy but come on, I have the
code here for doing my own Callback handler and it's about 5 LOC with a
class constructor. because it will have been tested, verified, etc... --
This says a lot to me.

-Original Message-
From: Pat Young [mailto:[EMAIL PROTECTED] 
Sent: 08 November 2005 18:30
To: Tomcat Users List
Subject: RE: JAAS implementation with URL callback

Yes, but an existing one in the open source domain
would be nice, because it will have been tested,
verified, etc...

I would think that a component such as this would be
used my many.


--- Mark Benussi [EMAIL PROTECTED] wrote:

 Write your own CallbackHandler and LoginModule.
 
 -Original Message-
 From: Pat Young [mailto:[EMAIL PROTECTED] 
 Sent: 07 November 2005 20:01
 To: 'Tomcat Users List'
 Subject: JAAS implementation with URL callback
 
 Does anyone know of an available JAAS implementation
 that comes with a URL callback?  The Catalina
 implementation only comes with a name and password
 callback, but there is no way to get to the URL.
 
 Thanks,
 Pat Young
 
 
   
   
 __ 
 Yahoo! Mail - PC Magazine Editors' Choice 2005 
 http://mail.yahoo.com
 

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





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
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: How to access URL in JAAS LoginModule

2005-11-01 Thread Mark Benussi
Pat.

 

I think you hijacked another thread. If you want to create a new thread do
so.

 

In answer to your question just implement your own CallbackHandler and pass
it to the LoginModule. You can then construct the CB with the url as well
the user name and password.

 

 

I need to access the URL from within a JAAS LoginModule.  Does anyone know
how to do this?  In the documentation, it says that only Name and Password
callbacks are provided by Tomcat security realms.  I think I need a URL
callback to make this work.  Any ideas?

 

Thanks,

Pat Young

 

 

 



RE: Is it even possible to retrieve a custom user principal? (Was: Tomcat user principal)

2005-10-18 Thread Mark Benussi
Oh dear. Now you're asking my friend.

You are now going to have highlighted to you my ignorance in running my own
businesses and learning as I go along.

I 'think' you mean with the Container Managed Security stuff like defining
roles and paths that are locked down in your web.xml? I can't say for sure
but I think it might not work.

The reason I don't know is because I use Struts which has a little bit of an
extended/improved method (IMHO!) which allows you to tie the roles required
down to actions. Then the Struts RequestProcessor effectively calls
request.isUserInRole() under the scenes (More J2EE [IMHO!]).

In answer to some of your other questions:

I am following that you are performing your own authentication as the
result of a post from your login form.

Yes that's what the JAAS LoginModule does/should do.

I also see that you are putting the subject into the session. I presume
this is so you can retrieve not only your user principal, but role
principals as well for authorization.

Yup you effectively get returned the Principal that JAAS should put in the
session.

-Original Message-
From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
Sent: 18 October 2005 19:15
To: Tomcat Users List; Mark Benussi
Subject: Re: Is it even possible to retrieve a custom user principal? (Was:
Tomcat user principal)

Mark,

Thanks so much for your help. That is very enlightening, and I'll 
consider doing the same, depending on whether I get a response about 
this from my post on the Tomcat dev mailing list. One complication of 
mine is that I've implemented single-signon, and need that behavior as 
well. I have a couple of responses (and one important question) below.

Mark Benussi wrote:

Brad,

From my understanding of j_security_check (Which I used to use) it
integrated seamlessly with JAAS. However:

1) You will not be able to get at the Principal to place in the session if
you let Tomcat do the work. It will still fail in the way it is doing at
the
moment i.e. JAAS works but the request.getUserPrincipal() is not your class
and its associated Roles.
  

Ok, this is consistent with the behavior I am seeing. JAAS is working on 
my end, but I can't get at my user principal at all. This seems very 
bizarre to me. It defeats a major purpose of implementing (and then 
being required to specify in the server.xml's realm configuration) a 
custom user principal. More than that, it would be weird to have lack of 
complete support of JAAS, which is *the* authentication/authorization 
API for the Java platform, be a security deal-killer for using Tomcat.

2) The j_security_check is a very basic validation. It doesn't really help
if you want to let them know that the user name was ok but the password was
wrong or that the user_name doesn't exists, which is why I write a custom
call to JAAS via the LoginContext. See

snip
  

if (le instanceof UnknownUserNameException) {
throw (UnknownUserNameException) le;
} else if (le instanceof UserPasswordException) {
throw (UserPasswordException) le;
} else {
throw new SystemException(le);
}


/snip

I am following that you are performing your own authentication as the result
of a post from your login form. I also see that you are putting the subject
into the session. I presume this is so you can retrieve not only your user
principal, but role principals as well for authorization. Correct me if I am
wrong, but doesn't going this route prevent you from using *any*
container-managed security? 

Thanks again for your help. If you could answer this one last question, that
would be great!

Brad

I get a bit scared of making these sweeping statements as there are people
on this list that know infinitely more than me but myself and people like
Wendy Smoak went through this a while back and when I published my thoughts
I didn't get any grumbles.

Hell maybe Apache have reworked this.


-Original Message-
From: Brad O'Hearne [mailto:[EMAIL PROTECTED] 
Sent: 18 October 2005 15:31
To: Tomcat Users List
Subject: Re: Is it even possible to retrieve a custom user principal? (Was:
Tomcat user principal)

Mark,

Thanks for the response. In the code below, are you manually calling  
JAAS, rather than via the j_security_check mechanism? The proper way  
to access the authentication mechanism in Tomcat is to post to  
j_security_check from a login form -- I wasn't sure from your post  
below whether you were referring to this or to executing the below  
code within a servlet.

In my case, I'm JAAS is being invoked as a result of posting to  
j_security_check. This is why I'm confused as to the place the JAAS  
subject in the session part of it. I could just be missing the boat,  
but I do not see that I have access to the session in my JAAS login  
module. If you know of a way to access the session from within a JAAS  
login module, that is the code I need to see. I should have been more  
clear about this before.

Thanks for your help Mark.

Brad