Re: Securing Tomcat: HELP

2008-08-29 Thread Alex Mestiashvili

losintikfos wrote:

Thanks for your reply Mark! unfurtunatly the url sent to me contains only
language reference which i am not familier with. Do you know the original
command and where to put, to enforce the security?

I am using Tomcat 6







markt-2 wrote:
  

losintikfos wrote:


Hi Experts,


I am trying to secure my tomcat manager web console from been seen from
the
internet. For example if i open the browser and type the internet address
of
the server, it displays the console where ever i am in the world and
therefore want to hide it from been displayed to WAN users.


Can someone help me:working:
  

http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

You want the remote address filter.

Mark


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






  

Hi ,

$CATALINA_HOME/conf/Catalina/localhost/manager.xml

cat manager.xml
Context path=/manager debug=0 privileged=true

Valve className=org.apache.catalina.valves.RemoteAddrValve 
allow=127.0.0.1,192.168.1.107/


!-- Link to the user database we will get roles from
ResourceLink name=users global=UserDatabase 
type=org.apache.catalina.UserDatabase/

  --

/Context

Alex


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



Re: Securing Tomcat: HELP

2008-08-29 Thread losintikfos

Hi Alex,

I can't locate directory catalina in conf. I am using tomcat 6.0.18, is it
something i should see?


B





Alex Mestiashvili wrote:
 
 losintikfos wrote:
 Thanks for your reply Mark! unfurtunatly the url sent to me contains only
 language reference which i am not familier with. Do you know the original
 command and where to put, to enforce the security?

 I am using Tomcat 6







 markt-2 wrote:
   
 losintikfos wrote:
 
 Hi Experts,


 I am trying to secure my tomcat manager web console from been seen from
 the
 internet. For example if i open the browser and type the internet
 address
 of
 the server, it displays the console where ever i am in the world and
 therefore want to hide it from been displayed to WAN users.


 Can someone help me:working:
   
 http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

 You want the remote address filter.

 Mark


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



 

   
 Hi ,
 
 $CATALINA_HOME/conf/Catalina/localhost/manager.xml
 
 cat manager.xml
 Context path=/manager debug=0 privileged=true
 
  Valve className=org.apache.catalina.valves.RemoteAddrValve 
 allow=127.0.0.1,192.168.1.107/
 
  !-- Link to the user database we will get roles from
  ResourceLink name=users global=UserDatabase 
 type=org.apache.catalina.UserDatabase/
--
 
 /Context
 
 Alex
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19215712.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Issue in connecting to tomcat via Apache

2008-08-29 Thread Rainer Jung
Without any JkMount nothing will be sent to Tomcat. You need to keep e.g.

JkMount  /examples/* worker1

in you configuration. If you are using a virtual host in Apache, the
JkMount must be inside the virtual host.

Your mod_jk log file indicates, that during that test you didn't have
any JkMount active, right? Retry with activa eJkMount and resend the log.

Regards,

Rainer

Vasanth Kumar ravi schrieb:
 Hi,
 I am using the mod_jk to connect the apache webserver and the tomcat server.
 Though I am able to access them individually, when I try to access the
 tomcat via the apache webserver, it fails.
 
 I used the examples given the apache site to configure the
 workers.properties and the httpd.conf files.
 
 Apache :2.2.8
 Tomcat :6.0.16
 jdk :1.5.014 from Sun
 OS : Suse Linux..
 
 -- 
 RegardsThanks,
 Vasanth Kumar Ravi

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



Re: Issue in connecting to tomcat via Apache

2008-08-29 Thread Vasanth Kumar ravi
Rainer,
I was able to resolve the issue...and the root cause was simple...
it was my mistake...
in the conf file I had mentioned /examples/* worker1
I was trying to access the link as http://localhost/examples which is
supposed to be http://localhost/examples/
Cos of the / , I was not able to access the page, now everythin works fine

Thanks for your help guys...though it appears silly...

Thanks Again.

On Fri, Aug 29, 2008 at 4:21 PM, Rainer Jung [EMAIL PROTECTED]wrote:

 Without any JkMount nothing will be sent to Tomcat. You need to keep e.g.

 JkMount  /examples/* worker1

 in you configuration. If you are using a virtual host in Apache, the
 JkMount must be inside the virtual host.

 Your mod_jk log file indicates, that during that test you didn't have
 any JkMount active, right? Retry with activa eJkMount and resend the log.

 Regards,

 Rainer

 Vasanth Kumar ravi schrieb:
  Hi,
  I am using the mod_jk to connect the apache webserver and the tomcat
 server.
  Though I am able to access them individually, when I try to access the
  tomcat via the apache webserver, it fails.
 
  I used the examples given the apache site to configure the
  workers.properties and the httpd.conf files.
 
  Apache :2.2.8
  Tomcat :6.0.16
  jdk :1.5.014 from Sun
  OS : Suse Linux..
 
  --
  RegardsThanks,
  Vasanth Kumar Ravi

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




-- 
RegardsThanks,
Vasanth Kumar Ravi


War re-deployment

2008-08-29 Thread emerson cargnin
Hi, I'm using tomcat 5.5.26 and after having a look at the host
application deployment (
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment
) I still have a doubt:

If tomcat is down and I change a war file in webapps, after restarting
tomcat, is there anyway for tomcat to detect the change in the war and
re-deploy it?

Emerson

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



Re: Issue in connecting to tomcat via Apache

2008-08-29 Thread Rainer Jung
Vasanth Kumar ravi schrieb:
 Rainer,
 I was able to resolve the issue...and the root cause was simple...
 it was my mistake...
 in the conf file I had mentioned /examples/* worker1
 I was trying to access the link as http://localhost/examples which is
 supposed to be http://localhost/examples/
 Cos of the / , I was not able to access the page, now everythin works fine
 
 Thanks for your help guys...though it appears silly...

Fine. There is also a shortcut

JkMount /something|/* myworker

is exactly equivalent to the two rules

JkMount /something/* myworker
JkMount /something myworker

Some /something will be forwarded as well as
/something/and/somthing/else, but not /somethingelse.

Technically JkMount a|b is equivalent to JkMount a and JkMount ab.

Regards,

Rainer


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



Running tomcat as a service - problem with shared drives

2008-08-29 Thread Foley, Tara (Citco)
 Hi
 
 I have written a java application which is deployed on tomcat on a
 windows machine.
 I created a special user account with full read/write access to a
 shared network drive. 
 When tomcat is started from the console under this user account it is
 able to write to the shared drive.  
 When I start tomcat as a service under this account, it cannot access
 the network drive (It says: path not found).
 I am using UNC paths and not mapped drives.
 
 The account under which tomcat is running as a service is the same as
 a regular user account accept that it has admin rights on the shared
 drive.
 I have googled for an answer to this and all information I can find
 indicates that the user account I created should have access  if UNC
 paths are used.
Is there something else I need to do?  Any help appreciated.

 Regards
 Tara
 
 E: [EMAIL PROTECTED] 
 
 


Disclaimer link.  To see it, click the link below, or copy and
paste it into your browser's address line.
http://www.citco.com/emaildisclaimer.htm


Re: War re-deployment

2008-08-29 Thread emerson cargnin
And what's the best/most reliable way to deploy applications on tomcat?
Would be to expand directly inside the webapps? Wouldn't have any
issue of while copying the files tomcat would try to start the
incomplete app? What are your views on deploying applications on
production in tomcat? Or maybe would be to stop tomcat remove the old
app, add the war and re-start tomcat?

regards
emerson

On 29/08/2008, emerson cargnin [EMAIL PROTECTED] wrote:
 Hi, I'm using tomcat 5.5.26 and after having a look at the host
 application deployment (
 http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment
 ) I still have a doubt:

 If tomcat is down and I change a war file in webapps, after restarting
 tomcat, is there anyway for tomcat to detect the change in the war and
 re-deploy it?

 Emerson


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



Re: War re-deployment

2008-08-29 Thread bhooshanpandit

I think the best way is to use manager app to deploy the war file in tomcat. 
See http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html for more details.


 

-Original Message-
From: emerson cargnin [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, 29 Aug 2008 3:52 pm
Subject: Re: War re-deployment










And what's the best/most reliable way to deploy applications on tomcat?
Would be to expand directly inside the webapps? Wouldn't have any
issue of while copying the files tomcat would try to start the
incomplete app? What are your views on deploying applications on
production in tomcat? Or maybe would be to stop tomcat remove the old
app, add the war and re-start tomcat?

regards
emerson

On 29/08/2008, emerson cargnin [EMAIL PROTECTED] wrote:
 Hi, I'm using tomcat 5.5.26 and after having a look at the host
 application deployment (
 http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment
 ) I still have a doubt:

 If tomcat is down and I change a war file in webapps, after restarting
 tomcat, is there anyway for tomcat to detect the change in the war and
 re-deploy it?

 Emerson


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




 



You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


Re: Securing Tomcat: HELP

2008-08-29 Thread bhooshanpandit

 Actually the context xml is present in CATALINA_HOME\webapps\manager\META-INF 
dir. You can edit it and add the valve and it should work:

Context antiResourceLocking=false privileged=true 
Valve className=org.apache.catalina.valves.RemoteAddrValve 
?allow=127.0.0.1/
/Context


 

-Original Message-
From: Alex Mestiashvili [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, 29 Aug 2008 3:29 pm
Subject: Re: Securing Tomcat: HELP









losintikfos wrote:?

 Hi Alex,?

?

 I can't locate directory catalina in conf. I am using tomcat 6.0.18, is it?

 something i should see??

?

?

 B?

?

?

   
Hi , just create this dirs  , and put there manager.xml file?
?

later you can add other files for another applications .?
?

I am not tomcat guru  , but that solution worked for me on tomcat 6.0.16?
?

?


-?

To start a new topic, e-mail: [EMAIL PROTECTED]

To unsubscribe, e-mail: [EMAIL PROTECTED]

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



 



You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


Jsessionid as path embed or query parameter.

2008-08-29 Thread Vinuth Madinur
Hi,

There have been lots of questions related to jsessionid in the forum,
but I couldn't find information about this.

Currently tomcat adds jsessionid as a path parameter. But there are
some http clients that do not understand such URLs. The VXML
interpreter that is used in our company does not.

So, is there a way to manage jsessionid url rewrite to have something
like below?

As a path embed:

http://domain/context/servlet/AEGH12SEWF33RFFSF?queryparam1=v1

Or as a query parameter:

http://domain/context/servlet?jsessionid=AEGH12SEWF33RFFSFqueryparam1=v1


Is it possible to pass around sessionid in this way?


Thanks in advance,
Vinuth.

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



Re: Jsessionid as path embed or query parameter.

2008-08-29 Thread Mikolaj Rydzewski

Vinuth Madinur wrote:

So, is there a way to manage jsessionid url rewrite to have something
like below?

As a path embed:

http://domain/context/servlet/AEGH12SEWF33RFFSF?queryparam1=v1

Or as a query parameter:

http://domain/context/servlet?jsessionid=AEGH12SEWF33RFFSFqueryparam1=v1


Is it possible to pass around sessionid in this way?
  
I believe one can implement its own version of 
HttpServletResponse#encodeURL and wrap original response in a filter.



--
Mikolaj Rydzewski [EMAIL PROTECTED]


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



Re: War re-deployment

2008-08-29 Thread emerson cargnin
I'm actually using anthill (http://www.anthillpro.com) to do the
deployment, which works basically copying the files to the server
using an agent.

emerson

On 29/08/2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I think the best way is to use manager app to deploy the war file in tomcat. 
 See http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html for more 
 details.




 -Original Message-
 From: emerson cargnin [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Fri, 29 Aug 2008 3:52 pm
 Subject: Re: War re-deployment










 And what's the best/most reliable way to deploy applications on tomcat?
 Would be to expand directly inside the webapps? Wouldn't have any
 issue of while copying the files tomcat would try to start the
 incomplete app? What are your views on deploying applications on
 production in tomcat? Or maybe would be to stop tomcat remove the old
 app, add the war and re-start tomcat?

 regards
 emerson

 On 29/08/2008, emerson cargnin [EMAIL PROTECTED] wrote:
  Hi, I'm using tomcat 5.5.26 and after having a look at the host
  application deployment (
  http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment
  ) I still have a doubt:
 
  If tomcat is down and I change a war file in webapps, after restarting
  tomcat, is there anyway for tomcat to detect the change in the war and
  re-deploy it?
 
  Emerson
 

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







 
 You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


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



Re: Securing Tomcat: HELP

2008-08-29 Thread losintikfos

I have done as said and restarted the server but still wont work for me!
:-((.




Alex Mestiashvili wrote:
 
 losintikfos wrote:
 Hi Alex,

 I can't locate directory catalina in conf. I am using tomcat 6.0.18, is
 it
 something i should see?


 B


   
 Hi , just create this dirs  , and put there manager.xml file
 
 later you can add other files for another applications .
 
 I am not tomcat guru  , but that solution worked for me on tomcat 6.0.16
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19218318.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Securing Tomcat: HELP

2008-08-29 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
  Actually the context xml is present in 
 CATALINA_HOME\webapps\manager\META-INF dir. You can edit it and add the valve 
 and it should work:
 
 Context antiResourceLocking=false privileged=true 
 Valve className=org.apache.catalina.valves.RemoteAddrValve 
 ?allow=127.0.0.1/

Those periods need to be escaped.

Mark



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



Re: Securing Tomcat: HELP

2008-08-29 Thread losintikfos

Hi bhooshanpandit,

I have tried the editing the context.xml in META-INF directory as specified
and still wont work. mmm bit confused.:-(

Do you knw whay this is the case? i suppose Operating system isn't the issue
is it? i am running tomcat on RedHat.



bhooshanpandit wrote:
 
 
  Actually the context xml is present in
 CATALINA_HOME\webapps\manager\META-INF dir. You can edit it and add the
 valve and it should work:
 
 Context antiResourceLocking=false privileged=true 
 Valve className=org.apache.catalina.valves.RemoteAddrValve 
 ?allow=127.0.0.1/
 /Context
 
 
  
 
 -Original Message-
 From: Alex Mestiashvili [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Fri, 29 Aug 2008 3:29 pm
 Subject: Re: Securing Tomcat: HELP
 
 
 
 
 
 
 
 
 
 losintikfos wrote:?
 
 Hi Alex,?
 
?
 
 I can't locate directory catalina in conf. I am using tomcat 6.0.18, is
 it?
 
 something i should see??
 
?
 
?
 
 B?
 
?
 
?
 
   
 Hi , just create this dirs  , and put there manager.xml file?
 ?
 
 later you can add other files for another applications .?
 ?
 
 I am not tomcat guru  , but that solution worked for me on tomcat 6.0.16?
 ?
 
 ?
 
 
 -?
 
 To start a new topic, e-mail: [EMAIL PROTECTED]
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 
 For additional commands, e-mail: [EMAIL PROTECTED]
 ?
 
 
 
  
 
 
 
 You are invited to Get a Free AOL Email ID. - http://webmail.aol.in
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19218602.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Securing Tomcat: HELP

2008-08-29 Thread losintikfos

Mark! i have tried this and still wont work. Was wondering if RedHat is goot
something to do with ths configuration.

Bit confused:-(



markt-2 wrote:
 
 [EMAIL PROTECTED] wrote:
  Actually the context xml is present in
 CATALINA_HOME\webapps\manager\META-INF dir. You can edit it and add the
 valve and it should work:
 
 Context antiResourceLocking=false privileged=true 
 Valve className=org.apache.catalina.valves.RemoteAddrValve 
 ?allow=127.0.0.1/
 
 Those periods need to be escaped.
 
 Mark
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19218642.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Monitor contanier

2008-08-29 Thread sam wun
Hi there,



What can I use to monitor tomcat container?



Thanks




Re: Monitor contanier

2008-08-29 Thread losintikfos

Create another thread with this question. This is a seperate question out of
the blue.

Use this to monitor the container if you running tomcat on linux.
$CATALINA_HOME/logs/tail -f catalina.out




sam wun-3 wrote:
 
 Hi there,
 
 
 
 What can I use to monitor tomcat container?
 
 
 
 Thanks
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19218734.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Monitor contanier

2008-08-29 Thread Mark Thomas
sam wun wrote:
 Hi there,
 
 
 
 What can I use to monitor tomcat container?

Please do not hijack threads.

Mark

 
 
 
 Thanks
 
 
 



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



Re: Balancing solution which allows graceful partial node migrations

2008-08-29 Thread Brantley Hobbs

Rainer Jung wrote:

Nikola Milutinovic wrote:

So, what are your thoughts on the subject? Ever seen something like
that in the wild? Or at least in the lab? A balancer that can be
reconfigured (almost) online and one that allows for requests to the
node being evicted to finish, first.
Both actions are possible via the status worker GUI. What's missing is 
making the change persistent from the GUI. If you change a workers 
state only via the GUI and restart Apache, the change will be 
overwritten by the configuration on disk. So in order to make those 
changes persist over the next httpd restart, you'll also need to enter 
it into the config file. Chaning the status in mod_jk does not need 
you to restart (even gracefully) Apache though. The change applied via 
the status GUI will immediately become active for all Apache children.



At the risk of thread-jacking, I have a couple of questions:

1.  Does anyone have a CSS for the status worker output page that they'd 
like to share?  The existing HTML is pretty hard to read.
2.  Common sense says that the status worker URL should be secured.  The 
documentation says that we are urged to use the builtin features of our 
webserver to secure the status worker.  With apache this is trivial 
because apache can deal with the request before handing it off to 
mod_jk.  With IIS, JK is implemented as an ISAPI filter.  Because of 
this, JK traps any requests bound for a URI that it knows how to handle 
long before IIS can get a chance to secure it.  Does anyone have a 
suggestion as to how to secure this thing using IIS?


Thanks,
Brantley Hobbs

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



Re: Securing Tomcat: HELP

2008-08-29 Thread losintikfos

Sorry mark did miss up something here! what did you mean by Those characters
needs to be escaped?

Are you saying i should do something like this: allow=127.\0.\0.\1 ?





markt-2 wrote:
 
 [EMAIL PROTECTED] wrote:
  Actually the context xml is present in
 CATALINA_HOME\webapps\manager\META-INF dir. You can edit it and add the
 valve and it should work:
 
 Context antiResourceLocking=false privileged=true 
 Valve className=org.apache.catalina.valves.RemoteAddrValve 
 ?allow=127.0.0.1/
 
 Those periods need to be escaped.
 
 Mark
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19219162.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Securing Tomcat: HELP

2008-08-29 Thread Mark Thomas
losintikfos wrote:
 Sorry mark did miss up something here! what did you mean by Those characters
 needs to be escaped?
 
 Are you saying i should do something like this: allow=127.\0.\0.\1 ?

Yes. But it should be allow=127\.0\.0\.1

Mark

 
 
 
 
 
 markt-2 wrote:
 [EMAIL PROTECTED] wrote:
  Actually the context xml is present in
 CATALINA_HOME\webapps\manager\META-INF dir. You can edit it and add the
 valve and it should work:

 Context antiResourceLocking=false privileged=true 
 Valve className=org.apache.catalina.valves.RemoteAddrValve 
 ?allow=127.0.0.1/
 Those periods need to be escaped.

 Mark



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



 



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



RE: Default application or HTML redirect

2008-08-29 Thread Mostafa Mossaad
Dear Sirs,

I need to make my application the default application,
how can I do that?

 

I have an application (MyApp) deployed using a MyApp.war
file inside the /webapp folder. So, the address is
http://localhost/MyApp. I need that to be accessible via
http://localhost/ from the Internet.

 

I've tried a lot of things, like modifying the
server.xml and web.xml file, and playing with the Welcome-File tags,
I've also renamed/removed the ROOT folder and renaming my .war file to
ROOT, however, all my trails only seemed to make the application
accessible via http://localhost only, not from the Internet.

 

I'm using ISA 2006 standard to publish my MyApp
application/site, however, whenever I go to the URL, without the /MyApp
extension, I'm directed to the default Apache installation page.

 

Can you please help me with this as I'm under a very
strict dead line?

 

Sincerely,

Mostafa Mossaad - IT team member,
senior.

Aramex International, Cairo - Egypt. 



secure parts of a web application with https

2008-08-29 Thread wmueller

Hello Everybody,

I have a small web application. Some pages are free to visit for everyone
but some other are only available after login (username/password). I try to
make the login page and all other pages after the login to use https.

you can think of a application structure like this:

/public/page.xhtml
/private/login.xhtml
/private/morepage.xhtml

while all pages under /public use http and all pages under private should
only accessible with https

But I have no Idea how to achieve this. 

By the way I use JSF and Tomcat 6
-- 
View this message in context: 
http://www.nabble.com/secure-parts-of-a-web-application-with-https-tp19219602p19219602.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: secure parts of a web application with https

2008-08-29 Thread Mikolaj Rydzewski

wmueller wrote:

Hello Everybody,

I have a small web application. Some pages are free to visit for everyone
but some other are only available after login (username/password). I try to
make the login page and all other pages after the login to use https.
  

http://edocs.bea.com/wls/docs61/webapp/web_xml.html#1021230

--
Mikolaj Rydzewski [EMAIL PROTECTED]


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



RE: ERROR Starting 2nd instance of Tomcat

2008-08-29 Thread Eduardo Ponce de León
I'vedone that to start my second instance! Don’t I need a script to start it
up?

Eduardo Ponce de León
Desarrollador
 
Latino Mobile 
---
Moliere 450A-101, México D.F.
(T) +5255 -   52 50 65 52
(M)+5255 -   55 06 37 16
(E)[EMAIL PROTECTED]
---
www.latinomobile.com.mx
El Mejor Contenido Latino para Móviles

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2008 11:38 PM
To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

Ok ... taking a second look at this, why on earth are you using the 
command 'tomcat5-test start In the config file' to start tomcat?  In 
particular, 'In the config file' phrase has no place on the command line.

--David

Eduardo Ponce de León wrote:
  

 I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
 tomcat folder and modified the server.xml files with different ports. I've
 also created a startup script, but when I run the script I am getting this
 error... Can anyone help please!!

 [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
 Starting tomcat5-test: [ FAILED ] 

 This is what i get in my catalina.out 

 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied
 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied

 This is my startup script... #!/bin/bash # # tomcat5 This shell script
takes
 care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN
INIT
 INFO
 # Provides: tomcat5
 # Required-Start: $network $syslog
 # Required-Stop: $network $syslog
 # Default-Start:
 # Default-Stop:
 # Description: Release implementation for Servlet 2.4 and JSP 2.0
 # Short-Description: start and stop tomcat
 ### END INIT INFO
 # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
 # - heavily rewritten by Deepak Bhole and Jason Corley
 # # commented out until the RHEL and FC daemon functions converge
 # Source the function library
 #if [ -r /etc/rc.d/init.d/functions ]; then
 #. /etc/rc.d/init.d/functions
 #fi
 NAME=$(basename $0)
 unset ISBOOT
 if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
 NAME=${NAME:3}
 ISBOOT=1
 fi
 # For SELinux we need to use 'runuser' not 'su'
 if [ -x /sbin/runuser ]; then
 SU=/sbin/runuser
 else
 SU=su
 fi
 # Get the tomcat config (use this for environment specific settings)
 TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
 if [ -r $TOMCAT_CFG ]; then
 . ${TOMCAT_CFG}
 fi
 # Get instance specific config file
 if [ -r /etc/sysconfig/${NAME} ]; then
 . /etc/sysconfig/${NAME}
 fi
 # Define which connector port to use
 CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
 # Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
 # Path to the script that will refresh jar symlinks on startup
 TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
 # Tomcat program name
 TOMCAT_PROG=$NAME
 # Define the tomcat username
 TOMCAT_USER=${TOMCAT_USER:-tomcat}
 # Define the tomcat log file
 TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
 RETVAL=0
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function checkpid() {
 local i
 for i in $* ; do
 if [ -d /proc/${i} ]; then
 return 0
 fi
 done
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_failure() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $FAILED
 echo -n  ]
 echo -ne \r
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_success() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $OK
 echo -n  ]
 echo -ne \r
 return 0
 }
 # Look for open ports, as the function name might imply
 function findFreePorts() {
 local isSet1=false
 local isSet2=false
 local isSet3=false
 local lower=8000
 randomPort1=0
 randomPort2=0
 randomPort3=0
 local -a listeners=( $(
 netstat -ntl | \
 awk '/^tcp/ {gsub((.)*:, , $4); print $4}') )
 while [ $isSet1 = false ] || \
 [ $isSet2 = false ] || \
 [ $isSet3 = false ]; do
 let port=${lower}+${RANDOM:0:4}
 if [ -z `expr  ${listeners[*]}  : .*\( $port \).*` ]; then
 if [ $isSet1 = false ]; then
 export randomPort1=$port
 isSet1=true
 elif [ $isSet2 = false ]; then
 export randomPort2=$port
 isSet2=true
 elif [ $isSet3 = false ]; then
 export randomPort3=$port
 isSet3=true
 fi
 fi
 done
 }
 function makeHomeDir() {
 if [ ! -d $CATALINA_HOME ]; then
 echo $CATALINA_HOME does not exist, creating
 if [ ! -d /var/lib/${NAME} ]; then
 mkdir -p /var/lib/${NAME}
 cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME}
 fi
 mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf
 /var/cache/${NAME}/temp \
 /var/cache/${NAME}/work /var/log/${NAME}
 for i in temp work; do
 ln -fs /var/cache/${NAME}/${i} 
 

RE: ERROR Starting 2nd instance of Tomcat

2008-08-29 Thread Eduardo Ponce de León
It is not a tomcat script.. I've clearly stated that I've created that script 
to startup the 2nd instance!!

Eduardo Ponce de León
Desarrollador
 
Latino Mobile 
---
Moliere 450A-101, México D.F.
(T) +5255 -   52 50 65 52
(M)+5255 -   55 06 37 16
(E) [EMAIL PROTECTED]
---
www.latinomobile.com.mx
El Mejor Contenido Latino para Móviles


-Original Message-
From: Len Popp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2008 10:49 PM
To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

Where does that In the config file come from? It's not in a Tomcat
script, is it?
-- 
Len

On Thu, Aug 28, 2008 at 18:54, Eduardo Ponce de León
[EMAIL PROTECTED] wrote:


 I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
 tomcat folder and modified the server.xml files with different ports. I've
 also created a startup script, but when I run the script I am getting this
 error... Can anyone help please!!

 [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
 Starting tomcat5-test: [ FAILED ]

 This is what i get in my catalina.out

 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied
 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied

 This is my startup script... #!/bin/bash # # tomcat5 This shell script takes
 care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT
 INFO
 # Provides: tomcat5
 # Required-Start: $network $syslog
 # Required-Stop: $network $syslog
 # Default-Start:
 # Default-Stop:
 # Description: Release implementation for Servlet 2.4 and JSP 2.0
 # Short-Description: start and stop tomcat
 ### END INIT INFO
 # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
 # - heavily rewritten by Deepak Bhole and Jason Corley
 # # commented out until the RHEL and FC daemon functions converge
 # Source the function library
 #if [ -r /etc/rc.d/init.d/functions ]; then
 #. /etc/rc.d/init.d/functions
 #fi
 NAME=$(basename $0)
 unset ISBOOT
 if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
 NAME=${NAME:3}
 ISBOOT=1
 fi
 # For SELinux we need to use 'runuser' not 'su'
 if [ -x /sbin/runuser ]; then
 SU=/sbin/runuser
 else
 SU=su
 fi
 # Get the tomcat config (use this for environment specific settings)
 TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
 if [ -r $TOMCAT_CFG ]; then
 . ${TOMCAT_CFG}
 fi
 # Get instance specific config file
 if [ -r /etc/sysconfig/${NAME} ]; then
 . /etc/sysconfig/${NAME}
 fi
 # Define which connector port to use
 CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
 # Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
 # Path to the script that will refresh jar symlinks on startup
 TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
 # Tomcat program name
 TOMCAT_PROG=$NAME
 # Define the tomcat username
 TOMCAT_USER=${TOMCAT_USER:-tomcat}
 # Define the tomcat log file
 TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
 RETVAL=0
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function checkpid() {
 local i
 for i in $* ; do
 if [ -d /proc/${i} ]; then
 return 0
 fi
 done
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_failure() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $FAILED
 echo -n  ]
 echo -ne \r
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_success() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $OK
 echo -n  ]
 echo -ne \r
 return 0
 }
 # Look for open ports, as the function name might imply
 function findFreePorts() {
 local isSet1=false
 local isSet2=false
 local isSet3=false
 local lower=8000
 randomPort1=0
 randomPort2=0
 randomPort3=0
 local -a listeners=( $(
 netstat -ntl | \
 awk '/^tcp/ {gsub((.)*:, , $4); print $4}') )
 while [ $isSet1 = false ] || \
 [ $isSet2 = false ] || \
 [ $isSet3 = false ]; do
 let port=${lower}+${RANDOM:0:4}
 if [ -z `expr  ${listeners[*]}  : .*\( $port \).*` ]; then
 if [ $isSet1 = false ]; then
 export randomPort1=$port
 isSet1=true
 elif [ $isSet2 = false ]; then
 export randomPort2=$port
 isSet2=true
 elif [ $isSet3 = false ]; then
 export randomPort3=$port
 isSet3=true
 fi
 fi
 done
 }
 function makeHomeDir() {
 if [ ! -d $CATALINA_HOME ]; then
 echo $CATALINA_HOME does not exist, creating
 if [ ! -d /var/lib/${NAME} ]; then
 mkdir -p /var/lib/${NAME}
 cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME}
 fi
 mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf
 /var/cache/${NAME}/temp \
 /var/cache/${NAME}/work /var/log/${NAME}
 for i in temp work; do
 ln -fs /var/cache/${NAME}/${i}
 ${CATALINA_HOME}/${i}
 done
 for i in common server shared webapps; do
 ln 

Re: secure parts of a web application with https

2008-08-29 Thread Juha Laiho
wmueller wrote:
 I have a small web application. Some pages are free to visit for everyone
 but some other are only available after login (username/password). I try to
 make the login page and all other pages after the login to use https.
 
 you can think of a application structure like this:
 
 /public/page.xhtml
 /private/login.xhtml
 /private/morepage.xhtml
 
 while all pages under /public use http and all pages under private should
 only accessible with https

You should create a security constraint for the /private branch of the pages
in the web.xml file of your application. The following frangment should be
rather close to what you're looking for (/private/* require that user is
authenticated and are only available through a protected connection).

security-constraint
  web-resource-collection
url-pattern/private/*/url-pattern
  /web-resource-collection
  auth-constraint
role-name*/role-name
  user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
  /user-data-constraint
/security-constraint

On top of that, you'll naturally need to set up Tomcat so that it also
accepts https connections.
-- 
..Juha

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



ERROR Starting 2nd instance of tomcat

2008-08-29 Thread Eduardo Ponce de Leon
I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
tomcat folder and modified the server.xml files with different ports. I've
also created a startup script, but when I run the script I am getting this
error... Can anyone help please!!

[EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
Starting tomcat5-test: [ FAILED ] 

This is what i get in my catalina.out 

-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied
-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied

This is my startup script... #!/bin/bash # # tomcat5 This shell script takes
care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT
INFO
# Provides: tomcat5
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Description: Release implementation for Servlet 2.4 and JSP 2.0
# Short-Description: start and stop tomcat
### END INIT INFO
# # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
# - heavily rewritten by Deepak Bhole and Jason Corley
# # commented out until the RHEL and FC daemon functions converge
# Source the function library
#if [ -r /etc/rc.d/init.d/functions ]; then
#. /etc/rc.d/init.d/functions
#fi
NAME=$(basename $0)
unset ISBOOT
if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
NAME=${NAME:3}
ISBOOT=1
fi
# For SELinux we need to use 'runuser' not 'su'
if [ -x /sbin/runuser ]; then
SU=/sbin/runuser
else
SU=su
fi
# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
if [ -r $TOMCAT_CFG ]; then
. ${TOMCAT_CFG}
fi
# Get instance specific config file
if [ -r /etc/sysconfig/${NAME} ]; then
. /etc/sysconfig/${NAME}
fi
# Define which connector port to use
CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
# Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
# Path to the script that will refresh jar symlinks on startup
TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
# Tomcat program name
TOMCAT_PROG=$NAME
# Define the tomcat username
TOMCAT_USER=${TOMCAT_USER:-tomcat}
# Define the tomcat log file
TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
RETVAL=0
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function checkpid() {
local i
for i in $* ; do
if [ -d /proc/${i} ]; then
return 0
fi
done
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_failure() {
echo -en \\033[60G file:///\\033[60G 
echo -n [ 
echo -n $FAILED
echo -n  ]
echo -ne \r
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_success() {
echo -en \\033[60G file:///\\033[60G 
echo -n [ 
echo -n $OK
echo -n  ]
echo -ne \r
return 0
}
# Look for open ports, as the function name might imply
function findFreePorts() {
local isSet1=false
local isSet2=false
local isSet3=false
local lower=8000
randomPort1=0
randomPort2=0
randomPort3=0
local -a listeners=( $(
netstat -ntl | \
awk '/^tcp/ {gsub((.)*:, , $4); print $4}') )
while [ $isSet1 = false ] || \
[ $isSet2 = false ] || \
[ $isSet3 = false ]; do
let port=${lower}+${RANDOM:0:4}
if [ -z `expr  ${listeners[*]}  : .*\( $port \).*` ]; then
if [ $isSet1 = false ]; then
export randomPort1=$port
isSet1=true
elif [ $isSet2 = false ]; then
export randomPort2=$port
isSet2=true
elif [ $isSet3 = false ]; then
export randomPort3=$port
isSet3=true
fi
fi
done
}
function makeHomeDir() {
if [ ! -d $CATALINA_HOME ]; then
echo $CATALINA_HOME does not exist, creating
if [ ! -d /var/lib/${NAME} ]; then
mkdir -p /var/lib/${NAME}
cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME}
fi
mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf
/var/cache/${NAME}/temp \
/var/cache/${NAME}/work /var/log/${NAME}
for i in temp work; do
ln -fs /var/cache/${NAME}/${i} 
${CATALINA_HOME}/${i}
done
for i in common server shared webapps; do
ln -fs /var/lib/${NAME}/${i} 
${CATALINA_HOME}/${i}
done
ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs
cp -pLR /usr/share/tomcat5-test/* 
${CATALINA_HOME}/conf/
cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME
cp -pLR /usr/share/tomcat5-test/* 
${CATALINA_HOME}/work/
chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi
}
function parseOptions() {
options=
options=$options $(
awk '!/^#/  !/^$/ { ORS= ; print 
export , $0, ; }' \
$TOMCAT_CFG
)
if [ -r /etc/sysconfig/${NAME} ]; then
options=$options $(
awk '!/^#/  !/^$/ { ORS= ;
print export , $0, ; }' \
/etc/sysconfig/${NAME}
)
fi
TOMCAT_SCRIPT=$options $TOMCAT_SCRIPT
}
# See how we were called.
function start() {
echo -n Starting ${TOMCAT_PROG}: 
if [ -f /var/lock/subsys/${NAME} ] ; then if [ -f /var/run/${NAME}.pid
]; then
read kpid  /var/run/${NAME}.pid
if checkpid $kpid 21; then
echo $NAME process already running
return -1
else
echo lock file found but no 

Re: Securing Tomcat: HELP

2008-08-29 Thread Alex Mestiashvili

losintikfos wrote:

I have done as said and restarted the server but still wont work for me!
:-((.


  


and what do you have in logs/catalina.out ?

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



RE: Why GlassFish

2008-08-29 Thread Martin Gainty

In the present TC implementation i've seen integration of modules into axis
an intelligent and articulate response
without necessarily going line item by line item is/are there specific JSRs or 
modularity the developer
can benefit from 

?
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Why GlassFish
 Date: Thu, 28 Aug 2008 22:35:44 -0700
 
 Disclaimer: I am a Glassfish developer, working for Sun.  So you can  
 ignore whatever I say. :)
 
 I run Tomcat for my server (diglloyd.com), for specific reasons.   
 Glassfish is a terrific product and so is Tomcat.  Which is better  
 depends on the goal, as with any product.
 
 Glassfish URL:  https://glassfish.dev.java.net/
 
 Glassfish V2 has a number of differences with Tomcat, here are just a  
 few:
 
 - it's a full Java EE compliant server (eg, servlet, ejb, etc)
 - it offers a fantastic web-based management interface, along with an  
 extensive command-line interface
 - it offers an extensive MBean interface for management and monitoring
 - support for MySQL and Java DB built in
 - commercial support from Sun at a variety of levels
 
 It does indeed incorporate Tomcat, though there are some differences  
 with Valves and configuration and deployment.
 
 Glassfish V3 moves to a powerful OSGi-based modular system.  With V3,  
 you'll essentially be able to pare a system down to any form you like,  
 one that could run (for example), just Tomcat.
 
 Tomcat is a great technology.  Glassfish is too, but has a much wider  
 range of features. Sometimes simple is better, sometimes more features  
 are better.
 
 Lloyd Chambers
 http://diglloyd.com
 
 [Mac OS X 10.5.2 Intel, Tomcat 6.0.16]
 
 
 On Aug 28, 2008, at 6:31 AM, sam wun wrote:
 
  Hi,
 
 
 
  Just a quick question, I found that Tomcat is quite capable with  
  servlet
  application, but lack of EJB support.
 
  Is GlassFish designed to fill the gaps to support EJB application  
  only?
 
 
 
  Thanks
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

Re: Securing Tomcat: HELP

2008-08-29 Thread losintikfos

It works perfect now!:jumping:


Thanks Guys you deserve a :drunk:


Alex Mestiashvili wrote:
 
 losintikfos wrote:
 I have done as said and restarted the server but still wont work for me!
 :-((.


   
 
 and what do you have in logs/catalina.out ?
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Securing-Tomcat%3A-HELP-tp19197181p19220805.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: ERROR Starting 2nd instance of tomcat

2008-08-29 Thread David Smith
Please stop reposting this.  It's already in the archives for anyone who 
cares to go back and take a look at your original post.


--David

Eduardo Ponce de Leon wrote:

I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
tomcat folder and modified the server.xml files with different ports. I've
also created a startup script, but when I run the script I am getting this
error... Can anyone help please!!

[EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
Starting tomcat5-test: [ FAILED ] 

This is what i get in my catalina.out 


-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied
-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied

This is my startup script... #!/bin/bash # # tomcat5 This shell script takes
care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN INIT
INFO
# Provides: tomcat5
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Description: Release implementation for Servlet 2.4 and JSP 2.0
# Short-Description: start and stop tomcat
### END INIT INFO
# # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
# - heavily rewritten by Deepak Bhole and Jason Corley
# # commented out until the RHEL and FC daemon functions converge
# Source the function library
#if [ -r /etc/rc.d/init.d/functions ]; then
#. /etc/rc.d/init.d/functions
#fi
NAME=$(basename $0)
unset ISBOOT
if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
NAME=${NAME:3}
ISBOOT=1
fi
# For SELinux we need to use 'runuser' not 'su'
if [ -x /sbin/runuser ]; then
SU=/sbin/runuser
else
SU=su
fi
# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
if [ -r $TOMCAT_CFG ]; then
. ${TOMCAT_CFG}
fi
# Get instance specific config file
if [ -r /etc/sysconfig/${NAME} ]; then
. /etc/sysconfig/${NAME}
fi
# Define which connector port to use
CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
# Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
# Path to the script that will refresh jar symlinks on startup
TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
# Tomcat program name
TOMCAT_PROG=$NAME
# Define the tomcat username
TOMCAT_USER=${TOMCAT_USER:-tomcat}
# Define the tomcat log file
TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
RETVAL=0
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function checkpid() {
local i
for i in $* ; do
if [ -d /proc/${i} ]; then
return 0
fi
done
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_failure() {
echo -en \\033[60G file:///\\033[60G 
echo -n [ 
echo -n $FAILED
echo -n  ]
echo -ne \r
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_success() {
echo -en \\033[60G file:///\\033[60G 
echo -n [ 
echo -n $OK
echo -n  ]
echo -ne \r
return 0
}
# Look for open ports, as the function name might imply
function findFreePorts() {
local isSet1=false
local isSet2=false
local isSet3=false
local lower=8000
randomPort1=0
randomPort2=0
randomPort3=0
local -a listeners=( $(
netstat -ntl | \
awk '/^tcp/ {gsub((.)*:, , $4); print $4}') )
while [ $isSet1 = false ] || \
[ $isSet2 = false ] || \
[ $isSet3 = false ]; do
let port=${lower}+${RANDOM:0:4}
if [ -z `expr  ${listeners[*]}  : .*\( $port \).*` ]; then
if [ $isSet1 = false ]; then
export randomPort1=$port
isSet1=true
elif [ $isSet2 = false ]; then
export randomPort2=$port
isSet2=true
elif [ $isSet3 = false ]; then
export randomPort3=$port
isSet3=true
fi
fi
done
}
function makeHomeDir() {
if [ ! -d $CATALINA_HOME ]; then
echo $CATALINA_HOME does not exist, creating
if [ ! -d /var/lib/${NAME} ]; then
mkdir -p /var/lib/${NAME}
cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME}
fi
mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf
/var/cache/${NAME}/temp \
/var/cache/${NAME}/work /var/log/${NAME}
for i in temp work; do
ln -fs /var/cache/${NAME}/${i} 
${CATALINA_HOME}/${i}

done
for i in common server shared webapps; do
ln -fs /var/lib/${NAME}/${i} 
${CATALINA_HOME}/${i}

done
ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs
cp -pLR /usr/share/tomcat5-test/* 
${CATALINA_HOME}/conf/

cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME
cp -pLR /usr/share/tomcat5-test/* 
${CATALINA_HOME}/work/

chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi
}
function parseOptions() {
options=
options=$options $(
awk '!/^#/  !/^$/ { ORS= ; print 
export , $0, ; }' \

$TOMCAT_CFG
)
if [ -r /etc/sysconfig/${NAME} ]; then
options=$options $(
awk '!/^#/  !/^$/ { ORS= ;
print export , $0, ; }' \
/etc/sysconfig/${NAME}
)
fi
TOMCAT_SCRIPT=$options $TOMCAT_SCRIPT
}
# See how we were called.
function start() {
echo -n Starting ${TOMCAT_PROG}: 
if [ -f /var/lock/subsys/${NAME} ] ; then 

Re: ERROR Starting 2nd instance of Tomcat

2008-08-29 Thread David Smith
I mean your command line for starting the second tomcat includes the 
phrase 'In the config file'. Why is that there? I doubt it's coincidence 
your error message contains the exact same phrase that you have on the 
command line. It's most likely the source of your problem. 'tomcat5-test 
start' should be more than enough to get the second instance going.


--David

Eduardo Ponce de León wrote:

I'vedone that to start my second instance! Don’t I need a script to start it
up?

Eduardo Ponce de León
Desarrollador
 
Latino Mobile 
---

Moliere 450A-101, México D.F.
(T) +5255 -   52 50 65 52
(M)+5255 -   55 06 37 16
(E) [EMAIL PROTECTED]
---
www.latinomobile.com.mx
El Mejor Contenido Latino para Móviles

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2008 11:38 PM

To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

Ok ... taking a second look at this, why on earth are you using the 
command 'tomcat5-test start In the config file' to start tomcat?  In 
particular, 'In the config file' phrase has no place on the command line.


--David

Eduardo Ponce de León wrote:
  
 


I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
tomcat folder and modified the server.xml files with different ports. I've
also created a startup script, but when I run the script I am getting this
error... Can anyone help please!!

[EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
Starting tomcat5-test: [ FAILED ] 

This is what i get in my catalina.out 


-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied
-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied

This is my startup script... #!/bin/bash # # tomcat5 This shell script


takes
  

care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN


INIT
  

INFO
# Provides: tomcat5
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Description: Release implementation for Servlet 2.4 and JSP 2.0
# Short-Description: start and stop tomcat
### END INIT INFO
# # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
# - heavily rewritten by Deepak Bhole and Jason Corley
# # commented out until the RHEL and FC daemon functions converge
# Source the function library
#if [ -r /etc/rc.d/init.d/functions ]; then
#. /etc/rc.d/init.d/functions
#fi
NAME=$(basename $0)
unset ISBOOT
if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
NAME=${NAME:3}
ISBOOT=1
fi
# For SELinux we need to use 'runuser' not 'su'
if [ -x /sbin/runuser ]; then
SU=/sbin/runuser
else
SU=su
fi
# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
if [ -r $TOMCAT_CFG ]; then
. ${TOMCAT_CFG}
fi
# Get instance specific config file
if [ -r /etc/sysconfig/${NAME} ]; then
. /etc/sysconfig/${NAME}
fi
# Define which connector port to use
CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
# Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
# Path to the script that will refresh jar symlinks on startup
TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
# Tomcat program name
TOMCAT_PROG=$NAME
# Define the tomcat username
TOMCAT_USER=${TOMCAT_USER:-tomcat}
# Define the tomcat log file
TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
RETVAL=0
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function checkpid() {
local i
for i in $* ; do
if [ -d /proc/${i} ]; then
return 0
fi
done
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_failure() {
echo -en \\033[60G file:///\\033[60G 
echo -n [ 
echo -n $FAILED
echo -n  ]
echo -ne \r
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_success() {
echo -en \\033[60G file:///\\033[60G 
echo -n [ 
echo -n $OK
echo -n  ]
echo -ne \r
return 0
}
# Look for open ports, as the function name might imply
function findFreePorts() {
local isSet1=false
local isSet2=false
local isSet3=false
local lower=8000
randomPort1=0
randomPort2=0
randomPort3=0
local -a listeners=( $(
netstat -ntl | \
awk '/^tcp/ {gsub((.)*:, , $4); print $4}') )
while [ $isSet1 = false ] || \
[ $isSet2 = false ] || \
[ $isSet3 = false ]; do
let port=${lower}+${RANDOM:0:4}
if [ -z `expr  ${listeners[*]}  : .*\( $port \).*` ]; then
if [ $isSet1 = false ]; then
export randomPort1=$port
isSet1=true
elif [ $isSet2 = false ]; then
export randomPort2=$port
isSet2=true
elif [ $isSet3 = false ]; then
export randomPort3=$port
isSet3=true
fi
fi
done
}
function makeHomeDir() {
if [ ! -d $CATALINA_HOME ]; then
echo $CATALINA_HOME does not exist, creating
if [ 

RE: ERROR Starting 2nd instance of tomcat

2008-08-29 Thread Eduardo Ponce de Leon
I reposted because I unsubscribe from my other email, only because of
that!!!

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 10:04 AM
To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of tomcat

Please stop reposting this.  It's already in the archives for anyone who 
cares to go back and take a look at your original post.

--David

Eduardo Ponce de Leon wrote:
 I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
 tomcat folder and modified the server.xml files with different ports. I've
 also created a startup script, but when I run the script I am getting this
 error... Can anyone help please!!

 [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
 Starting tomcat5-test: [ FAILED ] 

 This is what i get in my catalina.out 

 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied
 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied

 This is my startup script... #!/bin/bash # # tomcat5 This shell script
takes
 care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN
INIT
 INFO
 # Provides: tomcat5
 # Required-Start: $network $syslog
 # Required-Stop: $network $syslog
 # Default-Start:
 # Default-Stop:
 # Description: Release implementation for Servlet 2.4 and JSP 2.0
 # Short-Description: start and stop tomcat
 ### END INIT INFO
 # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
 # - heavily rewritten by Deepak Bhole and Jason Corley
 # # commented out until the RHEL and FC daemon functions converge
 # Source the function library
 #if [ -r /etc/rc.d/init.d/functions ]; then
 #. /etc/rc.d/init.d/functions
 #fi
 NAME=$(basename $0)
 unset ISBOOT
 if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
 NAME=${NAME:3}
 ISBOOT=1
 fi
 # For SELinux we need to use 'runuser' not 'su'
 if [ -x /sbin/runuser ]; then
 SU=/sbin/runuser
 else
 SU=su
 fi
 # Get the tomcat config (use this for environment specific settings)
 TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
 if [ -r $TOMCAT_CFG ]; then
 . ${TOMCAT_CFG}
 fi
 # Get instance specific config file
 if [ -r /etc/sysconfig/${NAME} ]; then
 . /etc/sysconfig/${NAME}
 fi
 # Define which connector port to use
 CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
 # Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
 # Path to the script that will refresh jar symlinks on startup
 TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
 # Tomcat program name
 TOMCAT_PROG=$NAME
 # Define the tomcat username
 TOMCAT_USER=${TOMCAT_USER:-tomcat}
 # Define the tomcat log file
 TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
 RETVAL=0
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function checkpid() {
 local i
 for i in $* ; do
 if [ -d /proc/${i} ]; then
 return 0
 fi
 done
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_failure() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $FAILED
 echo -n  ]
 echo -ne \r
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_success() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $OK
 echo -n  ]
 echo -ne \r
 return 0
 }
 # Look for open ports, as the function name might imply
 function findFreePorts() {
 local isSet1=false
 local isSet2=false
 local isSet3=false
 local lower=8000
 randomPort1=0
 randomPort2=0
 randomPort3=0
 local -a listeners=( $(
 netstat -ntl | \
 awk '/^tcp/ {gsub((.)*:, , $4); print $4}') )
 while [ $isSet1 = false ] || \
 [ $isSet2 = false ] || \
 [ $isSet3 = false ]; do
 let port=${lower}+${RANDOM:0:4}
 if [ -z `expr  ${listeners[*]}  : .*\( $port \).*` ]; then
 if [ $isSet1 = false ]; then
 export randomPort1=$port
 isSet1=true
 elif [ $isSet2 = false ]; then
 export randomPort2=$port
 isSet2=true
 elif [ $isSet3 = false ]; then
 export randomPort3=$port
 isSet3=true
 fi
 fi
 done
 }
 function makeHomeDir() {
 if [ ! -d $CATALINA_HOME ]; then
 echo $CATALINA_HOME does not exist, creating
 if [ ! -d /var/lib/${NAME} ]; then
 mkdir -p /var/lib/${NAME}
 cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME}
 fi
 mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf
 /var/cache/${NAME}/temp \
 /var/cache/${NAME}/work /var/log/${NAME}
 for i in temp work; do
 ln -fs /var/cache/${NAME}/${i} 
 ${CATALINA_HOME}/${i}
 done
 for i in common server shared webapps; do
 ln -fs /var/lib/${NAME}/${i} 
 ${CATALINA_HOME}/${i}
 done
 ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs
 cp -pLR /usr/share/tomcat5-test/* 
 ${CATALINA_HOME}/conf/
 cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME
 cp -pLR /usr/share/tomcat5-test/* 
 ${CATALINA_HOME}/work/
 chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi
 }
 function 

APR SSL not working

2008-08-29 Thread Gregor Schneider
Hi there,

I'm about to give it up.

One final question though:

Anybody out there who has the following combination up  running:

- Linux (Debian preferred, other distributions also welcome)
- Tomcat 5.5
- APR
- SSL

?

I'm sucessful getting Tomcat running together with the APR, however,
when I'm inserting the connector

Connector port=8443 maxHttpHeaderSize=8192
   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
   enableLookups=false disableUploadTimeout=true
   acceptCount=100 scheme=https secure=true
   SSLEngine=on
   SSLCertificateFile=/home/tomcat/www/certs/dom.dekold4711.crt
   SSLCertificateKeyFile=/home/tomcat/www/certs/dom.dekold4711.key
/

into server.xml, Tomcat-startup hangs when initializing Coyote HTTP/1.1:

2008-08-29 17:15:31,722 INFO[main]: An older
version 1.1.3 of the Apache Tomcat Native library is installed, while
Tomcat recommends versi
on greater than 1.1.4
2008-08-29 17:15:32,142 INFO[main]: Initializing
Coyote HTTP/1.1 on http-8080

However, netstat shows me that Tomcat is listening on port 8443

So, if anybody has the configuration Tomcat  APR  SSL up  running,
I'd be happy about any confirmation, otherwise I'll consider Tomcat 
APR  SSL as simply not functional.

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



RE: ERROR Starting 2nd instance of Tomcat

2008-08-29 Thread Eduardo Ponce de Leon
I dunno why it is there...this is in my script which calls that config file!

# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG=/etc/tomcat5-test/tomcat5.conf
if [ -r $TOMCAT_CFG ]; then
. ${TOMCAT_CFG}
fi

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 10:08 AM
To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

I mean your command line for starting the second tomcat includes the 
phrase 'In the config file'. Why is that there? I doubt it's coincidence 
your error message contains the exact same phrase that you have on the 
command line. It's most likely the source of your problem. 'tomcat5-test 
start' should be more than enough to get the second instance going.

--David

Eduardo Ponce de León wrote:
 I'vedone that to start my second instance! Don’t I need a script to start
it
 up?

 Eduardo Ponce de León
 Desarrollador
  
 Latino Mobile 
 ---
 Moliere 450A-101, México D.F.
 (T) +5255 -   52 50 65 52
 (M)+5255 -   55 06 37 16
 (E) [EMAIL PROTECTED]
 ---
 www.latinomobile.com.mx
 El Mejor Contenido Latino para Móviles

 -Original Message-
 From: David Smith [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 28, 2008 11:38 PM
 To: Tomcat Users List
 Subject: Re: ERROR Starting 2nd instance of Tomcat

 Ok ... taking a second look at this, why on earth are you using the 
 command 'tomcat5-test start In the config file' to start tomcat?  In 
 particular, 'In the config file' phrase has no place on the command line.

 --David

 Eduardo Ponce de León wrote:
   
  

 I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
 tomcat folder and modified the server.xml files with different ports.
I've
 also created a startup script, but when I run the script I am getting
this
 error... Can anyone help please!!

 [EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
 Starting tomcat5-test: [ FAILED ] 

 This is what i get in my catalina.out 

 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied
 -sh: line 0: export: `In the config file': not a valid identifier
 /bin/bash: /usr/bin/tomcat5-test: Permission denied

 This is my startup script... #!/bin/bash # # tomcat5 This shell script
 
 takes
   
 care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN
 
 INIT
   
 INFO
 # Provides: tomcat5
 # Required-Start: $network $syslog
 # Required-Stop: $network $syslog
 # Default-Start:
 # Default-Stop:
 # Description: Release implementation for Servlet 2.4 and JSP 2.0
 # Short-Description: start and stop tomcat
 ### END INIT INFO
 # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
 # - heavily rewritten by Deepak Bhole and Jason Corley
 # # commented out until the RHEL and FC daemon functions converge
 # Source the function library
 #if [ -r /etc/rc.d/init.d/functions ]; then
 #. /etc/rc.d/init.d/functions
 #fi
 NAME=$(basename $0)
 unset ISBOOT
 if [ ${NAME:0:1} = S -o ${NAME:0:1} = K ]; then
 NAME=${NAME:3}
 ISBOOT=1
 fi
 # For SELinux we need to use 'runuser' not 'su'
 if [ -x /sbin/runuser ]; then
 SU=/sbin/runuser
 else
 SU=su
 fi
 # Get the tomcat config (use this for environment specific settings)
 TOMCAT_CFG=/etc/tomcat5/tomcat5.conf
 if [ -r $TOMCAT_CFG ]; then
 . ${TOMCAT_CFG}
 fi
 # Get instance specific config file
 if [ -r /etc/sysconfig/${NAME} ]; then
 . /etc/sysconfig/${NAME}
 fi
 # Define which connector port to use
 CONNECTOR_PORT=${CONNECTOR_PORT:-8080}
 # Path to the tomcat launch script TOMCAT_SCRIPT=/usr/bin/tomcat5-test
 # Path to the script that will refresh jar symlinks on startup
 TOMCAT_RELINK_SCRIPT=${CATALINA_HOME}/bin/relink
 # Tomcat program name
 TOMCAT_PROG=$NAME
 # Define the tomcat username
 TOMCAT_USER=${TOMCAT_USER:-tomcat}
 # Define the tomcat log file
 TOMCAT_LOG=${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}
 RETVAL=0
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function checkpid() {
 local i
 for i in $* ; do
 if [ -d /proc/${i} ]; then
 return 0
 fi
 done
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_failure() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $FAILED
 echo -n  ]
 echo -ne \r
 return 1
 }
 # remove when the RHEL and FC daemon functions converge
 # (pulled from /etc/rc.d/init.d/functions)
 function echo_success() {
 echo -en \\033[60G file:///\\033[60G 
 echo -n [ 
 echo -n $OK
 echo -n  ]
 echo -ne \r
 return 0
 }
 # Look for open ports, as the function name might imply
 function findFreePorts() {
 local isSet1=false
 local isSet2=false
 local isSet3=false
 local lower=8000
 randomPort1=0
 randomPort2=0
 randomPort3=0
 local -a listeners=( $(
 

Re: Tomcat 5.5.26 OutOfMemoryError -Xms -Xmx Set

2008-08-29 Thread Kees Jan Koster

Dear Tom,

I'd like to confirm that I am trying the right things in fixing a  
memory

error and discover what else I can do to resolve my problem. I realise
this is a common problem as I have Googled, read the Tomcat memory FAQ
and searched the mailing lists. I have tried looking at catalina.out
however I am not a java programmer.


Here is a quick-start memory tuning guide I wrote earlier.

http://java-monitor.com/forum/showthread.php?t=30

Basically, you have to find and tune the right memory pool. Use  
jconsole to see what memory pool fills up.


Hope this helps.
--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett



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



RE: APR SSL not working

2008-08-29 Thread Martin Gainty

gregor-
i assume your implementation includes configuring AprLifecycleListener listener 
in server.xml
Listener className=org.apache.catalina.core.AprLifecycleListener /
?
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 29 Aug 2008 17:16:55 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: APR  SSL not working
 
 Hi there,
 
 I'm about to give it up.
 
 One final question though:
 
 Anybody out there who has the following combination up  running:
 
 - Linux (Debian preferred, other distributions also welcome)
 - Tomcat 5.5
 - APR
 - SSL
 
 ?
 
 I'm sucessful getting Tomcat running together with the APR, however,
 when I'm inserting the connector
 
 Connector port=8443 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false disableUploadTimeout=true
acceptCount=100 scheme=https secure=true
SSLEngine=on
SSLCertificateFile=/home/tomcat/www/certs/dom.dekold4711.crt

 SSLCertificateKeyFile=/home/tomcat/www/certs/dom.dekold4711.key
 /
 
 into server.xml, Tomcat-startup hangs when initializing Coyote HTTP/1.1:
 
 2008-08-29 17:15:31,722 INFO[main]: An older
 version 1.1.3 of the Apache Tomcat Native library is installed, while
 Tomcat recommends versi
 on greater than 1.1.4
 2008-08-29 17:15:32,142 INFO[main]: Initializing
 Coyote HTTP/1.1 on http-8080
 
 However, netstat shows me that Tomcat is listening on port 8443
 
 So, if anybody has the configuration Tomcat  APR  SSL up  running,
 I'd be happy about any confirmation, otherwise I'll consider Tomcat 
 APR  SSL as simply not functional.
 
 Gregor
 -- 
 what's puzzlin' you, is the nature of my game
 gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/

Re: APR SSL not working

2008-08-29 Thread Markus Schönhaber

Gregor Schneider schrieb:


Anybody out there who has the following combination up  running:

- Linux (Debian preferred, other distributions also welcome)
- Tomcat 5.5
- APR
- SSL


Yes.


into server.xml, Tomcat-startup hangs when initializing Coyote HTTP/1.1:

2008-08-29 17:15:31,722 INFO[main]: An older
version 1.1.3 of the Apache Tomcat Native library is installed, while
Tomcat recommends versi
on greater than 1.1.4
2008-08-29 17:15:32,142 INFO[main]: Initializing
Coyote HTTP/1.1 on http-8080

However, netstat shows me that Tomcat is listening on port 8443


If these are the last lines of your log, that's to be expected. 
Otherwise the log would contain info about http-8443.
How long did you wait? Chances are, APR is using /dev/random and the 
system  has run out of entropy.
Search the list archives. There has more than once been discussion about 
this topic. For example

http://marc.info/?l=tomcat-userm=118190563608389w=2
Maybe this helps.

Regards
  mks


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



Re: ClassNotFoundException when moving from Java 1.5 to 1.6

2008-08-29 Thread Jeff
On Thu, Aug 28, 2008 at 3:21 PM, Jeff [EMAIL PROTECTED] wrote:
 I have an app currently running on Tomcat 5.5.26/CentOS
 4.6/jre1.5.0_16. This configuration is working just fine. But if I run
 Tomcat with jre1.6.0_07, my application gets a ClassNotFoundException
 when I try to use it. The application starts up OK, but throws the
 exception upon first use. If I restart Tomcat under Java 5, all is
 well again. I am changing nothing but the symlink /usr/java/default
 when I switch Java versions.

 The class in question is packaged in WEB-INF/lib/mylib.jar.

 No doubt of great importance is that the instance of the class is used
 as a field in an object being returned from a call to a JBoss 4.2.2
 EJB session bean on a remote server. JBoss is running under
 jre1.5.0_14. So is this simply a serialization compatibility problem?
 Then why am I getting ClassNotFound instead of an unmarshalling error?
 The class files on both Tomcat and JBoss are the same (compiled once,
 packaged twice).

 Leaving no stone unturned, I installed Java 6 on the development JBoss
 system and configured JBoss to use it, but Tomcat (under Java 6) still
 gives me ClassNotFoundException. The JBoss server reports no errors.

 The classes are actually compiled with 1.4 so there should not be any
 code compatibility problems.

 So why is Tomcat not finding my classes in WEB-INF/lib when running
 under Java 6?

snip

I repackaged the war file putting the troublesome class package under
WEB-INF/classes instead of in a jar file under WEB-INF/lib. Same
problem. Again, it works fine when Tomcat is running with jre 1.5, but
I get the embedded ClassNotFoundException under jre 1.6.

-- 
Jeff

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



Re: Servlet Memory Leak

2008-08-29 Thread Nathan Thatcher
On Thu, Aug 28, 2008 at 10:37 PM, Juha Laiho [EMAIL PROTECTED] wrote:

 Nathan Thatcher wrote:
  I have a fairly small memory leak in a servlet (Tomcat 6.0) running on a
  Windows 2003 server. I have been looking into memory profiling to help me
  find the leak but nothing seems to be or do what I need. Simply put I
 want a
  list of all of the objects/primitives (and if possible their values) that
  are in memory. It would be really nice if I didn't have to bring Tomcat
 down
  at all to do this analysis as the servlet is running in a production
  environment. Does anyone know of a decent free tool that does such a
 thing?

 I've used YourKit (http://www.yourkit.com/) in cases exactly like the one
 you describe. It's not free, but I find it well worth the price (and a free
 evaluation version is available).

 I wouldn't be surprised to see free tools emerging with similar
 functionality, but as I've been content with YourKit, I haven't been
 looking.
 --
 ..Juha


Thanks for the link. Does anyone else know of one that is similar but free
for commercial use?


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




Re: War re-deployment

2008-08-29 Thread Johnny Kewl


- Original Message - 
From: emerson cargnin [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, August 29, 2008 12:10 PM
Subject: War re-deployment



Hi, I'm using tomcat 5.5.26 and after having a look at the host
application deployment (
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Automatic%20Application%20Deployment
) I still have a doubt:

If tomcat is down and I change a war file in webapps, after restarting
tomcat, is there anyway for tomcat to detect the change in the war and
re-deploy it?


Tomcat standard out of the box... ie no one has played with the settings... 
is smart, you dont have to help it...

Use manager/html to deploy remotely...

But the way every one understands is... drop the war into webapps... thats 
it.

Its smart... if the war has changed TC will fix things...
If you drop a war into a dead tomact and then start it... its still smart ;)

Only thing is... when you done developing in you IDE... ask you IDE to 
undeploy it... otherwise TC may still be thinking you want the project in 
the IDE to run.


easy...
---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



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



Re: Servlet Memory Leak

2008-08-29 Thread Richard S. Huntrods


I have a fairly small memory leak in a servlet (Tomcat 6.0) running on a
Windows 2003 server. I have been looking into memory profiling to help me
find the leak but nothing seems to be or do what I need. Simply put I want a
list of all of the objects/primitives (and if possible their values) that
are in memory. It would be really nice if I didn't have to bring Tomcat down
at all to do this analysis as the servlet is running in a production
environment. Does anyone know of a decent free tool that does such a thing?
If not, what would be a good route to take to find this leak?

Thanks a ton.
  
I just finished debugging a major memory leak in my servlet application. 
Try running the tool jmap that comes with java. It works great with 
Tomcat - just find the PID of the Tomcat (java) instance and run it on that.


For example, fire up Windows Task Manager, go to Applications and find 
Tomcat. Right-click and choose go to process. This will move you to 
the Process pane highlighting the Tomcat (java) process ID.


Now open a command (console) window and (assuming you have Java paths 
set correctly), type:


jmap -histo PID output.txt

(or  output.txt - although I used sequentially numbered output files)

This will capture the stack info into a file for analysis. The PID is 
the process ID you noted from the Task Manager. If you run this just 
after you start Tomcat, then a few times after doing the things that you 
suspect trigger the memory leak, you should see objects in the map that 
you can identify as not getting released and thus zero in on the leak.


Cheers,

-Richard

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



RE: ClassNotFoundException when moving from Java 1.5 to 1.6

2008-08-29 Thread Martin Gainty

Hi Jeff-
from my experience ClassNot FoundException can happen when
1)the class is not found by any of the CL's on any CLASSPATH *not physically 
there*
2)You've come upon the dreaded class signature change
e.g. 
void fu(bar)
becomes
bar fu(bar)
OR
void fu(void)
becomes
void fu(bar)

from my experience there is no easy way to remedy this without rebuilding..I 
would suggest on a fresh disk
install and config the target JDK/JVM/JRE
re-install JBOSS (to use the new JDK/JVM/JRE)
recompile and or rebuild all dependent projects (using target JDK/JVM/JRE)
re-deploy the newly built dependent jars to JBOSS
logging/commond-digester/XML-parses using target JDK/JVM/JRE..(leave no stone 
unturned)
recompile/rebuild your webapp using target JDK/JVM/JRE
re-deploy the newly built war/ear webapp to JBOSS 

In DI (dependecy injection) scenarios
I've seen this happen when a factory builds new (bean) classes but the Factory 
doesnt have the correct template (usually XSL template) for the target 
JDK/JVM/JRE

maybe the TC developers want to weigh in
Martin 

__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 29 Aug 2008 10:57:36 -0500
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: ClassNotFoundException when moving from Java 1.5 to 1.6
 
 On Thu, Aug 28, 2008 at 3:21 PM, Jeff [EMAIL PROTECTED] wrote:
  I have an app currently running on Tomcat 5.5.26/CentOS
  4.6/jre1.5.0_16. This configuration is working just fine. But if I run
  Tomcat with jre1.6.0_07, my application gets a ClassNotFoundException
  when I try to use it. The application starts up OK, but throws the
  exception upon first use. If I restart Tomcat under Java 5, all is
  well again. I am changing nothing but the symlink /usr/java/default
  when I switch Java versions.
 
  The class in question is packaged in WEB-INF/lib/mylib.jar.
 
  No doubt of great importance is that the instance of the class is used
  as a field in an object being returned from a call to a JBoss 4.2.2
  EJB session bean on a remote server. JBoss is running under
  jre1.5.0_14. So is this simply a serialization compatibility problem?
  Then why am I getting ClassNotFound instead of an unmarshalling error?
  The class files on both Tomcat and JBoss are the same (compiled once,
  packaged twice).
 
  Leaving no stone unturned, I installed Java 6 on the development JBoss
  system and configured JBoss to use it, but Tomcat (under Java 6) still
  gives me ClassNotFoundException. The JBoss server reports no errors.
 
  The classes are actually compiled with 1.4 so there should not be any
  code compatibility problems.
 
  So why is Tomcat not finding my classes in WEB-INF/lib when running
  under Java 6?
 
 snip
 
 I repackaged the war file putting the troublesome class package under
 WEB-INF/classes instead of in a jar file under WEB-INF/lib. Same
 problem. Again, it works fine when Tomcat is running with jre 1.5, but
 I get the embedded ClassNotFoundException under jre 1.6.
 
 -- 
 Jeff
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Talk to your Yahoo! Friends via Windows Live Messenger.  Find out how.
http://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008

RE: Servlet Memory Leak

2008-08-29 Thread Martin Gainty

FYI
you'll need to run JDK 6 for jmap

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 29 Aug 2008 09:44:41 -0700
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Servlet Memory Leak
 
 
  I have a fairly small memory leak in a servlet (Tomcat 6.0) running on a
  Windows 2003 server. I have been looking into memory profiling to help me
  find the leak but nothing seems to be or do what I need. Simply put I want a
  list of all of the objects/primitives (and if possible their values) that
  are in memory. It would be really nice if I didn't have to bring Tomcat down
  at all to do this analysis as the servlet is running in a production
  environment. Does anyone know of a decent free tool that does such a thing?
  If not, what would be a good route to take to find this leak?
 
  Thanks a ton.

 I just finished debugging a major memory leak in my servlet application. 
 Try running the tool jmap that comes with java. It works great with 
 Tomcat - just find the PID of the Tomcat (java) instance and run it on that.
 
 For example, fire up Windows Task Manager, go to Applications and find 
 Tomcat. Right-click and choose go to process. This will move you to 
 the Process pane highlighting the Tomcat (java) process ID.
 
 Now open a command (console) window and (assuming you have Java paths 
 set correctly), type:
 
 jmap -histo PID output.txt
 
 (or  output.txt - although I used sequentially numbered output files)
 
 This will capture the stack info into a file for analysis. The PID is 
 the process ID you noted from the Task Manager. If you run this just 
 after you start Tomcat, then a few times after doing the things that you 
 suspect trigger the memory leak, you should see objects in the map that 
 you can identify as not getting released and thus zero in on the leak.
 
 Cheers,
 
 -Richard
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

Re: Servlet Memory Leak

2008-08-29 Thread Pierre Goupil
Hello,

Interesting thread, indeed. But I've googled around and can't find JMap
homepage, I'm afraid.  It seems like some other programs has the same name.
Even with the profiler keyword, it doesn't give the page I'm looking for.

A clue, anyone, please ?

Cheers,

Pierre


On Fri, Aug 29, 2008 at 7:38 PM, Martin Gainty [EMAIL PROTECTED] wrote:


 FYI
 you'll need to run JDK 6 for jmap

 Martin
 __
 Disclaimer and confidentiality note
 Everything in this e-mail and any attachments relates to the official
 business of Sender. This transmission is of a confidential nature and Sender
 does not endorse distribution to any party other than intended recipient.
 Sender does not necessarily endorse content contained within this
 transmission.


  Date: Fri, 29 Aug 2008 09:44:41 -0700
  From: [EMAIL PROTECTED]
  To: users@tomcat.apache.org
  Subject: Re: Servlet Memory Leak
 
  
   I have a fairly small memory leak in a servlet (Tomcat 6.0) running on
 a
   Windows 2003 server. I have been looking into memory profiling to help
 me
   find the leak but nothing seems to be or do what I need. Simply put I
 want a
   list of all of the objects/primitives (and if possible their values)
 that
   are in memory. It would be really nice if I didn't have to bring Tomcat
 down
   at all to do this analysis as the servlet is running in a production
   environment. Does anyone know of a decent free tool that does such a
 thing?
   If not, what would be a good route to take to find this leak?
  
   Thanks a ton.
  
  I just finished debugging a major memory leak in my servlet application.
  Try running the tool jmap that comes with java. It works great with
  Tomcat - just find the PID of the Tomcat (java) instance and run it on
 that.
 
  For example, fire up Windows Task Manager, go to Applications and find
  Tomcat. Right-click and choose go to process. This will move you to
  the Process pane highlighting the Tomcat (java) process ID.
 
  Now open a command (console) window and (assuming you have Java paths
  set correctly), type:
 
  jmap -histo PID output.txt
 
  (or  output.txt - although I used sequentially numbered output files)
 
  This will capture the stack info into a file for analysis. The PID is
  the process ID you noted from the Task Manager. If you run this just
  after you start Tomcat, then a few times after doing the things that you
  suspect trigger the memory leak, you should see objects in the map that
  you can identify as not getting released and thus zero in on the leak.
 
  Cheers,
 
  -Richard
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 _
 Be the filmmaker you always wanted to be—learn how to burn a DVD with
 Windows(R).
 http://clk.atdmt.com/MRT/go/108588797/direct/01/


Tomcat JNDI

2008-08-29 Thread felix l
First time posting on a mailing list, hope I am doing this right.

I just need to register JNDI datasource to Tomcat 6 and I followed
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html. I just
couldn't make it work if I put the Resource tag with my oracle connection
info in conf/server.xml b/w the GlobalNamingResources tag. BUT it works if
I put the Resource tag in webapp/META-INF/context.xml b/w the Context
tag.

What am I missing? I need the datasource be available for all web app, not
just for the current web app.

Thanks in advance.

Felix


Re: Servlet Memory Leak

2008-08-29 Thread Ravi Sharma
try this
http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html


On Fri, Aug 29, 2008 at 6:56 PM, Pierre Goupil [EMAIL PROTECTED]wrote:

 Hello,

 Interesting thread, indeed. But I've googled around and can't find JMap
 homepage, I'm afraid.  It seems like some other programs has the same name.
 Even with the profiler keyword, it doesn't give the page I'm looking for.

 A clue, anyone, please ?

 Cheers,

 Pierre


 On Fri, Aug 29, 2008 at 7:38 PM, Martin Gainty [EMAIL PROTECTED]
 wrote:

 
  FYI
  you'll need to run JDK 6 for jmap
 
  Martin
  __
  Disclaimer and confidentiality note
  Everything in this e-mail and any attachments relates to the official
  business of Sender. This transmission is of a confidential nature and
 Sender
  does not endorse distribution to any party other than intended recipient.
  Sender does not necessarily endorse content contained within this
  transmission.
 
 
   Date: Fri, 29 Aug 2008 09:44:41 -0700
   From: [EMAIL PROTECTED]
   To: users@tomcat.apache.org
   Subject: Re: Servlet Memory Leak
  
   
I have a fairly small memory leak in a servlet (Tomcat 6.0) running
 on
  a
Windows 2003 server. I have been looking into memory profiling to
 help
  me
find the leak but nothing seems to be or do what I need. Simply put I
  want a
list of all of the objects/primitives (and if possible their values)
  that
are in memory. It would be really nice if I didn't have to bring
 Tomcat
  down
at all to do this analysis as the servlet is running in a production
environment. Does anyone know of a decent free tool that does such a
  thing?
If not, what would be a good route to take to find this leak?
   
Thanks a ton.
   
   I just finished debugging a major memory leak in my servlet
 application.
   Try running the tool jmap that comes with java. It works great with
   Tomcat - just find the PID of the Tomcat (java) instance and run it on
  that.
  
   For example, fire up Windows Task Manager, go to Applications and find
   Tomcat. Right-click and choose go to process. This will move you to
   the Process pane highlighting the Tomcat (java) process ID.
  
   Now open a command (console) window and (assuming you have Java paths
   set correctly), type:
  
   jmap -histo PID output.txt
  
   (or  output.txt - although I used sequentially numbered output files)
  
   This will capture the stack info into a file for analysis. The PID is
   the process ID you noted from the Task Manager. If you run this just
   after you start Tomcat, then a few times after doing the things that
 you
   suspect trigger the memory leak, you should see objects in the map that
   you can identify as not getting released and thus zero in on the leak.
  
   Cheers,
  
   -Richard
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
  _
  Be the filmmaker you always wanted to be—learn how to burn a DVD with
  Windows(R).
  http://clk.atdmt.com/MRT/go/108588797/direct/01/



Re: Running tomcat as a service - problem with shared drives

2008-08-29 Thread Johnny Kewl


- Original Message - 
From: Foley, Tara (Citco) [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Friday, August 29, 2008 12:20 PM
Subject: Running tomcat as a service - problem with shared drives



Hi

I have written a java application which is deployed on tomcat on a
windows machine.
I created a special user account with full read/write access to a
shared network drive.
When tomcat is started from the console under this user account it is
able to write to the shared drive.
When I start tomcat as a service under this account, it cannot access
the network drive (It says: path not found).
I am using UNC paths and not mapped drives.

The account under which tomcat is running as a service is the same as
a regular user account accept that it has admin rights on the shared
drive.
I have googled for an answer to this and all information I can find
indicates that the user account I created should have access  if UNC
paths are used.

Is there something else I need to do?  Any help appreciated.

Foley, you seem to be doing it right...
If the exact same user works from login and test, then it should work from 
the

.\user service also

I think its a subtle bug in the code... perhaps print the path to a log...
and run in the service... maybe you'll see it... probably a silly thing...

If its two similar user names... not the actual same user... then its 
probably something like

System.getProperty(user.home) catching you...
ie that moves everytime a username changes... even if they do have the same 
permissions...


If the path was right... I'd expect permission denied... but you getting 
path not found... I think the code is not doing what you think its doing... 
maybe


... good luck
---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



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



Re: Why GlassFish

2008-08-29 Thread Johnny Kewl


- Original Message - 
From: DIGLLOYD INC [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, August 29, 2008 7:35 AM
Subject: Re: Why GlassFish


Disclaimer: I am a Glassfish developer, working for Sun.  So you can 
ignore whatever I say. :)


I run Tomcat for my server (diglloyd.com), for specific reasons. 
Glassfish is a terrific product and so is Tomcat.  Which is better 
depends on the goal, as with any product.


Glassfish URL:  https://glassfish.dev.java.net/

Glassfish V2 has a number of differences with Tomcat, here are just a 
few:


- it's a full Java EE compliant server (eg, servlet, ejb, etc)
- it offers a fantastic web-based management interface, along with an 
extensive command-line interface

- it offers an extensive MBean interface for management and monitoring
- support for MySQL and Java DB built in
- commercial support from Sun at a variety of levels

It does indeed incorporate Tomcat, though there are some differences  with 
Valves and configuration and deployment.


Glassfish V3 moves to a powerful OSGi-based modular system.  With V3, 
you'll essentially be able to pare a system down to any form you like, 
one that could run (for example), just Tomcat.


Tomcat is a great technology.  Glassfish is too, but has a much wider 
range of features. Sometimes simple is better, sometimes more features 
are better.


Lloyd Chambers
http://diglloyd.com


Yes... I was being somewhat flippant... what can I say, I'm a tomcat fan and 
not too fond of EJB...
 but Sam, if you trying to understand when you may use EJB... heres a 
scenario for you...


You got a massive company... there are guys writing code for stock control, 
book keeping, customer registers... yada yada.


Now within the company... say a bank... this code is being used by tellers, 
and managers and suppliers and everyone...
So the big idea is that instead of writing the code a million times... its 
written as modules and placed on a central EJB server..


Then when *any program* whether that be a servlet in tomcat, or a desktop 
app, or a autoteller... say needs Mr X's balance..


They all ask the same bean... getMeTheBalanceOf(Mr X)... in the same 
server...


This EJB box is sitting there with the IT people... and if they change the 
biz logic centrally... it changes everywhere..


The idea is to keep the code tidy and in one place and its never 
duplicated... even if you have 10 Tomcats running and 620 desktop apps...


Thats the idea of the EJB server...

It does get some competition because of other application technologies like 
SOAP (Axis) that can also allow apps to work against TC...
So there is overlap... but its not uncommon for large co's with big budgets 
to go the EJB way...


Learning EJB is a much steeper learning curve than little old tomcat... and 
it tends to need a maintenance contract between

the big co and the EJB vendor...

There are many EJB servers out there...
Glassfish
Jboss
Spring... actually no I think they just dumped the EJB spec in favor of OSGI
Geronimo
openejb... I think that is a plugin for tomcat..
Resin... has an EJB module...

There is only one Pojo Application Server
Its like EJB, just more powerful and runs normal Java code... it runs on 
Tomcat


and there are probably many more out there that I'm forgetting
WebSphere
etc...

Thats the idea behind EJB... writing the code once and having it centrally 
administered...


And heres the really interesting thing... they all use Tomcat ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



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



Re: Servlet Memory Leak

2008-08-29 Thread Felix Schumacher
Am Freitag, den 29.08.2008, 19:56 +0200 schrieb Pierre Goupil:
 Hello,
 
 Interesting thread, indeed. But I've googled around and can't find JMap
 homepage, I'm afraid.  It seems like some other programs has the same name.
 Even with the profiler keyword, it doesn't give the page I'm looking for.
I found these two links interesting
 http://blogs.sun.com/sundararajan/entry/querying_java_heap_with_oql

http://blogs.sun.com/sundararajan/entry/permanent_generation_analysis_with_oql
Bye
 Felix
 
 A clue, anyone, please ?
 
 Cheers,
 
 Pierre
 
 
 On Fri, Aug 29, 2008 at 7:38 PM, Martin Gainty [EMAIL PROTECTED] wrote:
 
 
  FYI
  you'll need to run JDK 6 for jmap
 
  Martin
  __
  Disclaimer and confidentiality note
  Everything in this e-mail and any attachments relates to the official
  business of Sender. This transmission is of a confidential nature and Sender
  does not endorse distribution to any party other than intended recipient.
  Sender does not necessarily endorse content contained within this
  transmission.
 
 
   Date: Fri, 29 Aug 2008 09:44:41 -0700
   From: [EMAIL PROTECTED]
   To: users@tomcat.apache.org
   Subject: Re: Servlet Memory Leak
  
   
I have a fairly small memory leak in a servlet (Tomcat 6.0) running on
  a
Windows 2003 server. I have been looking into memory profiling to help
  me
find the leak but nothing seems to be or do what I need. Simply put I
  want a
list of all of the objects/primitives (and if possible their values)
  that
are in memory. It would be really nice if I didn't have to bring Tomcat
  down
at all to do this analysis as the servlet is running in a production
environment. Does anyone know of a decent free tool that does such a
  thing?
If not, what would be a good route to take to find this leak?
   
Thanks a ton.
   
   I just finished debugging a major memory leak in my servlet application.
   Try running the tool jmap that comes with java. It works great with
   Tomcat - just find the PID of the Tomcat (java) instance and run it on
  that.
  
   For example, fire up Windows Task Manager, go to Applications and find
   Tomcat. Right-click and choose go to process. This will move you to
   the Process pane highlighting the Tomcat (java) process ID.
  
   Now open a command (console) window and (assuming you have Java paths
   set correctly), type:
  
   jmap -histo PID output.txt
  
   (or  output.txt - although I used sequentially numbered output files)
  
   This will capture the stack info into a file for analysis. The PID is
   the process ID you noted from the Task Manager. If you run this just
   after you start Tomcat, then a few times after doing the things that you
   suspect trigger the memory leak, you should see objects in the map that
   you can identify as not getting released and thus zero in on the leak.
  
   Cheers,
  
   -Richard
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
  _
  Be the filmmaker you always wanted to be—learn how to burn a DVD with
  Windows(R).
  http://clk.atdmt.com/MRT/go/108588797/direct/01/


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



version 5.5 vs 6.0

2008-08-29 Thread Alex Howansky


Hello group,

I'm wondering if you might be able to share a bit of your expertise with 
me. Is there any reason to choose 5.5 over 6.0 if you have no specific 
requirement to do so? I.e., if you were tasked with developing a 
completely new application from the ground up, and none of the 
subordinate packages/libraries that you've chosen specifically require 
5.5, is there any reason not to choose 6.0? I've been so far unable to 
find any compelling arguments for either case.


Thanks for your time,

--
Alex Howansky
Director of IT
Birdview Technologies


smime.p7s
Description: S/MIME Cryptographic Signature


Re: version 5.5 vs 6.0

2008-08-29 Thread Mark Thomas
Alex Howansky wrote:
 
 Hello group,
 
 I'm wondering if you might be able to share a bit of your expertise with
 me. Is there any reason to choose 5.5 over 6.0 if you have no specific
 requirement to do so? I.e., if you were tasked with developing a
 completely new application from the ground up, and none of the
 subordinate packages/libraries that you've chosen specifically require
 5.5, is there any reason not to choose 6.0? I've been so far unable to
 find any compelling arguments for either case.

6.0.x tends to get releases with security fixes before the
vulnerabilities are announced whereas 5.5.x and 4.1.x tend to see
releases after the vulnerability announcement.

6.0.x is easier to build if you need a custom patch.

6.0.x is more actively developed.

Given a free choice, I'd pick 6.0.x every time.

Mark



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



apparent problem with work/ directory

2008-08-29 Thread Jonathan Mast
I refactored the POJO side of a webapp I have.  I basically moved some
objects referenced by the JSPs into a new package.  I updated the jsps
accordingly, by importing the new package with the PAGE directive at the
top.  I deleted the old version of the webapp, rebuilt it, and restarted
tomcat.

It then started spewing errors, generated from the jsp's, about not being
able to find the old classes.  I am convinced that the errors lies in the
work/ directly, specifically the derived java sources of the jsp were not
updated when I restarted Tomcat.

I know the problem is not in the webapp itself because i tested it out on my
Windoze box before deploying to Linux where the problem occured.  My
question is: how do I force Tomcat to delete the work directory upon
restarting or when I'm building from Ant?

Thanks,

Tomcat 5.5.17
Java 1.4.2


Re: version 5.5 vs 6.0

2008-08-29 Thread Leon Rosenberg
Keep in mind tomcat 6 has passed the magic version number of 16, so
from now on, no need to use 5.x branch :-)

Leon

On Fri, Aug 29, 2008 at 11:43 PM, Alex Howansky [EMAIL PROTECTED] wrote:

 Hello group,

 I'm wondering if you might be able to share a bit of your expertise with me.
 Is there any reason to choose 5.5 over 6.0 if you have no specific
 requirement to do so? I.e., if you were tasked with developing a completely
 new application from the ground up, and none of the subordinate
 packages/libraries that you've chosen specifically require 5.5, is there any
 reason not to choose 6.0? I've been so far unable to find any compelling
 arguments for either case.

 Thanks for your time,

 --
 Alex Howansky
 Director of IT
 Birdview Technologies


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



RE: version 5.5 vs 6.0

2008-08-29 Thread Mostafa Mossaad
I think most support articles/FAQs/Online documents on the Internet are
more related to the 4.X and 5.X versions

I'm totally new to the Apache community, and I'm trying to achieve a
relatively simple task of changing the default application for my
Tomcat, and all the articles I google seem to be talking about version
4.X and 5.X, and I can't get whatever's in them to work on my 6.X
version..

PS: Should anyone be interested to help me, I'd be more than happy

Thank you.

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 30, 2008 12:17 AM
To: Tomcat Users List
Subject: Re: version 5.5 vs 6.0

Keep in mind tomcat 6 has passed the magic version number of 16, so
from now on, no need to use 5.x branch :-)

Leon

On Fri, Aug 29, 2008 at 11:43 PM, Alex Howansky [EMAIL PROTECTED] wrote:

 Hello group,

 I'm wondering if you might be able to share a bit of your expertise
with me.
 Is there any reason to choose 5.5 over 6.0 if you have no specific
 requirement to do so? I.e., if you were tasked with developing a
completely
 new application from the ground up, and none of the subordinate
 packages/libraries that you've chosen specifically require 5.5, is
there any
 reason not to choose 6.0? I've been so far unable to find any
compelling
 arguments for either case.

 Thanks for your time,

 --
 Alex Howansky
 Director of IT
 Birdview Technologies


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




__ Information from ESET NOD32 Antivirus, version of virus
signature database 3400 (20080829) __

The message was checked by ESET NOD32 Antivirus.

  Email message - is OK

http://www.eset.com

 

__ Information from ESET NOD32 Antivirus, version of virus
signature database 3400 (20080829) __

The message was checked by ESET NOD32 Antivirus.

  Email message - is OK
  Email message - is OK

http://www.eset.com
 



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



Tomcat connector receives 404, IIS logs 200

2008-08-29 Thread Karim Zaki
Hi all,

I'm running a Windows Server 2003 machine with IIS 6 and version 1.2.26.0 of 
the connector. The back-end server is running Tomcat 5.0.28. When making a 
request to a URL that doesn't exist on the back-end, I see the following 
behavior:

1. The Tomcat access log shows a 404 response (expected)
2. The Tomcat connector log shows it received a 404 from Tomcat (expected)
3. The IIS log shows a 200 (unexpected)

Any ideas on how this might happen? I have logs from all three to provide when 
needed. Just thought to check if anyone's seen this before.

Thanks,
Karim

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



Re: Default application or HTML redirect

2008-08-29 Thread Mark Thomas
Mostafa Mossaad wrote:
 I have an application (MyApp) deployed using a MyApp.war
 file inside the /webapp folder.


 I've tried a lot of things, like modifying the
 server.xml
Bad idea.

and web.xml file, and playing with the Welcome-File tags,
Nope, not these either.

 I've also renamed/removed the ROOT folder and renaming my .war file to
 ROOT,
Bingo. That is the right way to do it.

 however, all my trails only seemed to make the application
 accessible via http://localhost only, not from the Internet.

Then you have a proxy / dns / routing issue, not a Tomcat one.

 I'm using ISA 2006 standard to publish my MyApp
 application/site, however, whenever I go to the URL, without the /MyApp
 extension, I'm directed to the default Apache installation page.

If you have removed the default ROOT app, this isn't possible. Unless
you mean Apache httpd in which case, why are you using that?

Mark



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



Re: apparent problem with work/ directory

2008-08-29 Thread Johnny Kewl


- Original Message - 
From: Jonathan Mast [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, August 29, 2008 11:00 PM
Subject: apparent problem with work/ directory



I refactored the POJO side of a webapp I have.  I basically moved some
objects referenced by the JSPs into a new package.  I updated the jsps
accordingly, by importing the new package with the PAGE directive at the
top.  I deleted the old version of the webapp, rebuilt it, and restarted
tomcat.

It then started spewing errors, generated from the jsp's, about not being
able to find the old classes.  I am convinced that the errors lies in the
work/ directly, specifically the derived java sources of the jsp were not
updated when I restarted Tomcat.

I know the problem is not in the webapp itself because i tested it out on 
my

Windoze box before deploying to Linux where the problem occured.  My
question is: how do I force Tomcat to delete the work directory upon
restarting or when I'm building from Ant?

Thanks,

Tomcat 5.5.17
Java 1.4.2


Jonathan it doesnt sound right... I dont believe TC is rememberting old 
classes
TC is running and you drop a webapp into it... it will do its thing and 
redeploy...


If its looking for old classes... possibly in the dev enviroment the test 
missed it because JSP's a late compiled
Or in the refactor... I know nebeans does it... if you drag the classes to 
another old stuff folder... it actually points the app at it.

So they still used but no packed...
Or worse... your delete folder is in the classpath or something weird like 
that...


It just doesnt happen on our systems... why are you stopping TC to 
redeploy... soes the old app not release... thats a bug get rid of it.

Also... in your test enviroment, when you are sure the webapp is working...

Have a look at /conf/catalina/loahost/context file
Is that docbase still pointing at the dev environment... ie you think its 
working with your test war, but its actually running the project in the IDE 
still... so the test is bogus and then shows itself else where... delete the 
context file... start yout test TC and drop the war in... I think you may 
see the errors...


If NB... comile every JSP in your test env... ie the big build doesnt 
compile them so whether they actually working is not proven by a good 
compile...


... something else is catching you (I think).

Have fun...

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---



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



How to make to Apache-Tomcat 6.0.13 to support all of SSLv2/SSLv3 and TLS protocols

2008-08-29 Thread Suresh Kumar J

Hi!

Am running the Apache Tomcat (v6.0.13) on Redhat Linux. Below is the
snippet of the server.xml config:

Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
  maxThreads=150 scheme=https secure=true
  clientAuth=false sslProtocol=TLS keystoreType=PKCS12
  keystoreFile=conf/my-key-store keystorePass=abcd/


The https connection(TLS based) works fine with IE6.0/7.x and FireFox
2.0.x. But am having issues with the FireFox 3.0.1 on Windows XP with
the default settings. When I try to connect(https on 443) to Apache
Tomcat (v6.0.14), I get the following error on the FireFox 3.0.1 window:
---
Secure Connection Failed
An error occurred during a connection to 10.xx.xx.xx
Cannot communicate securely with peer: no common encryption algorithm(s):
(Error code: ssl_error_no_cypher_overlap)
---

Have observed the following error in the Catalina.out file:
--
Aug 29, 2008 2:52:52 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
SEVERE: Socket accept failed
Throwable occurred: java.net.SocketException: SSL handshake error
javax.net.ssl.SSLException: INTERNAL ERROR
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:150)
   at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
   at java.lang.Thread.run(Thread.java:657)
--

In the FireFox 3.0.1, both SSL3.0 and TLS1.0 are enabled(and SSLv2 is
disabled) in the browser security settings. The web-server is correctly
configured for secured http on TLS. Earlier with Firefox2.0.x, it was
working fine. Also checked with Linux version of FireFox3.0.1 and the
TLS connection is working fine.

When I tried to analysis the packets capture of the browser/web-server
communication via WireShark/Ethereal tools, I observed that the
FireFox3.0 on Windows uses SSLv2 Record layer(Client Hello) for SSL
handshake negotiations. As my Tomcat webserver is configured for TLS, it
doesn't seem to understand the SSLv2 record layer format, eventually
errors out with javax.net.ssl.SSLException: INTERNAL ERROR.

Since SSLv2 is generally considered to be a weaker protocol than SSLv3
and TLS, am not sure why FireFox3.0.1 on Windows uses SSLv2 Record
protocol, also SSLv2 is disabled by default. On Redhat Linux, the same
FF3.0.1(firefox-3.0.1-1.el5) uses TLSv1 Record Layer(Client Hello) for
security negotiations. The FireFox v2.0.x on Windows uses SSLv3 Record
Layer(Client Hello) which seems to fine. Am able to launch the https
webpages on IE6.x and IE7.x and also FireFox2.0. The only issue is on
FireFox3.0 which uses SSLv2 Record layer(Client Hello) for SSL
handshake negotiations. Tomcat works well with TLS protocol, but when
the browser uses SSLv2 then it fails.

I tried changing the sslProtocol attribute in the Connector element
in conf/server.xml file and when the Tomcat couldn't start. Observed the
following error in catalina.out:
--
Aug 29, 2008 3:10:18 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
Throwable occurred: java.io.IOException: SSLContext SSL implementation
not found
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:394)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125)
   at
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
   at
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
   at
org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
   at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
   at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
   at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
   at java.lang.reflect.Method.invoke(Method.java:317)
   at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
--

Does Tomcat 6.0.x supports SSL implementation?. Is it possible to make
the Tomcat to understand both SSL and TLS protocols so that all the
browsers are supported. It seems to be critical to make the application
I use the certificate in the format of PKCS12, created via openssl tool.

Did anyone else face similar kind of problem in this regard.

Thanks,
Suresh



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

Re: Migration from 4.1 to 6

2008-08-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jody,

Jody Williams wrote:
 I need to migrate from tomcat 4.1 to 6.  Are there any concerns I need
 to know about before starting?  Are there any suggestions to make the
 transition easier?

Whatever you do, don't try to re-use your server.xml from 4.1. Start
over with the one that ships with TC 6 and add capability as you go.
Also, remember:

1. Context elements don't go into server.xml anymore
   http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

2. Logging is completely different
   http://tomcat.apache.org/tomcat-6.0-doc/logging.html

 In the data center, we are using a RedHat (AS 2.1 I believe) server.
 I don't have the ability to test the application on another server to
 verify compatibility.

That could be a problem. Do you mean that you're going to switch your
production platform with no prior testing? :(

Have you considered VMWare?

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

iEYEARECAAYFAki4yacACgkQ9CaO5/Lv0PAzBACeIwfbcuT3tWTkzEAz30pyjhtw
rCoAn3oV34GVsXHuF6rYZEblPXpezS5D
=9Z1T
-END PGP SIGNATURE-

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



Re: Tomcat JNDI

2008-08-29 Thread bhooshanpandit

 I think you will need to configure realm in your server.xml. Plz refer 
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html.


 

-Original Message-
From: felix l [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Fri, 29 Aug 2008 11:27 pm
Subject: Tomcat JNDI










First time posting on a mailing list, hope I am doing this right.

I just need to register JNDI datasource to Tomcat 6 and I followed
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html. I just
couldn't make it work if I put the Resource tag with my oracle connection
info in conf/server.xml b/w the GlobalNamingResources tag. BUT it works if
I put the Resource tag in webapp/META-INF/context.xml b/w the Context
tag.

What am I missing? I need the datasource be available for all web app, not
just for the current web app.

Thanks in advance.

Felix



 



You are invited to Get a Free AOL Email ID. - http://webmail.aol.in