Detect tomcat problems with a custom java reporting apps?

2006-06-12 Thread Peter Neu
Hello,

I want to build a small custom reporting tool for our tomcat production
server.

First of all is this the right place to ask about this kind of things or is
this more a question for the dev list?

The basic idea is, I want to send queries to tomcat and if one fails three
times send out alert messages to the admins. 
My first idea was, to just use the http common client and use the http
status codes. But this is too easy as I suspect because
an out of memory exception wouldn't be considered as an error because it
sends back a html page. So what can I do?

Is JMX the magic word here? I saw some ant tasks in the docs but no way of
detecting a java.lang.outOfMemory Exception.


Cheers,
Pete






-
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: a compromised tomcat server

2006-06-12 Thread Martin Gainty
In the meanhile I would strongly suggest you run locally so you can control 
the environment-


Martin --
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Leon Rosenberg [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, June 11, 2006 3:56 AM
Subject: Re: a compromised tomcat server



On 6/10/06, hv @ Fashion Content [EMAIL PROTECTED] wrote:
I had an incident on my server the other day where someone had 
succesfully

broken into the server to execute a port scanner.


do you have any kind of logs?



The port scanner was running under the tomcat process so I assume the
breakin was done by getting through the Tomcat manager app.


When you say under the tomcat process, what do you mean:
same process id as java org.apache.catalina.startup.Bootstrap start ?
or same a child process of the tomcat process, or just the same userid?

regards
Leon



At first I feared that I had made a blunder and left the standard tomcat
user as manager, but that wasn't the case. Actually while the 
UserDatabase

is defined in the setup it isn't used as I use a JNDIReam pointing to
OpenLDAP where only one manager account is defined.

So did they just use brute force, or might there be another way they 
could

have gotten in?

Henrik
http://www.blingon.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]




-
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: Detect tomcat problems with a custom java reporting apps?

2006-06-12 Thread Leon Rosenberg

maybe you should look at existing tools first?

http://www.lambdaprobe.org/d/index.htm

regards
leon

On 6/12/06, Peter Neu [EMAIL PROTECTED] wrote:

Hello,

I want to build a small custom reporting tool for our tomcat production
server.

First of all is this the right place to ask about this kind of things or is
this more a question for the dev list?

The basic idea is, I want to send queries to tomcat and if one fails three
times send out alert messages to the admins.
My first idea was, to just use the http common client and use the http
status codes. But this is too easy as I suspect because
an out of memory exception wouldn't be considered as an error because it
sends back a html page. So what can I do?

Is JMX the magic word here? I saw some ant tasks in the docs but no way of
detecting a java.lang.outOfMemory Exception.


Cheers,
Pete






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



AW: Detect tomcat problems with a custom java reporting apps?

2006-06-12 Thread Peter Neu
Yes, I am using this already. But there is some vital functionality missing.

When an java.lang.outOf.MemoryException happens I won't get an alert unless
I happen to be using lambda at the moment. So what we have at hand is a
'Schrödinger Cat' situation. 

I need to monitor the jmx control layer and have my program send out alerts
when something bad happens.

So far I have 2 problems:

1. How do I find an error? I played around with the JMX Proxy Servlet. There
is this Mbean: MemoryPool. When I query this I get the following result: 

Name: java.lang:type=MemoryPool,name=Perm Gen [shared-rw]
modelerType: sun.management.MemoryPoolImpl
Type: NON_HEAP
CollectionUsageThreshold: 0
CollectionUsageThresholdExceeded: true
MemoryManagerNames: [Ljava.lang.String;@943129
CollectionUsageThresholdSupported: true
.

If I see this I can't tell if anything is wrong. So what to do?

2. How do I access the jmxproxy servlet from a java app? It requires
authentication. :o( 

Cheers,
Pete






-
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: Detect tomcat problems with a custom java reporting apps?

2006-06-12 Thread Leon Rosenberg

I'm not sure that after something bad happens you can access the
server at all. An OutOfMemory or an AllThreadsBusy Exception normally
lead to a non-responding tomcat. The best thing you could do is
monitoring the logs with a separate script on the same machine and
send mails on failure imho.

regards
leon

p.s. for the application monitoring of your production server you
should try moskito :-)

On 6/12/06, Peter Neu [EMAIL PROTECTED] wrote:

Yes, I am using this already. But there is some vital functionality missing.

When an java.lang.outOf.MemoryException happens I won't get an alert unless
I happen to be using lambda at the moment. So what we have at hand is a
'Schrödinger Cat' situation.

I need to monitor the jmx control layer and have my program send out alerts
when something bad happens.

So far I have 2 problems:

1. How do I find an error? I played around with the JMX Proxy Servlet. There
is this Mbean: MemoryPool. When I query this I get the following result:

Name: java.lang:type=MemoryPool,name=Perm Gen [shared-rw]
modelerType: sun.management.MemoryPoolImpl
Type: NON_HEAP
CollectionUsageThreshold: 0
CollectionUsageThresholdExceeded: true
MemoryManagerNames: [Ljava.lang.String;@943129
CollectionUsageThresholdSupported: true
.

If I see this I can't tell if anything is wrong. So what to do?

2. How do I access the jmxproxy servlet from a java app? It requires
authentication. :o(

Cheers,
Pete






-
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: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Mark Claassen
Thanks for all your help and I have gotten it to work.  It seems to be,
however, dependant on the name it is being access by.  I was hoping that I
could just put 127.0.0.1 in there and then it would only accept connections
from the local machine.  It turns out that doing this only accepts
connections that come in with this name.  

To clarify what I mean, here is an example:
Say Tomcat is on a machine called TestMachine.
If I put 127.0.0.1 in the address field, it accepts connections of the
form http: //127.0.0.1/... only
It does not accept connections from http: //TestMachine/..., even though
the server is this same machine.
I was hoping that it would accept all connections from the local machine,
regardless of what the connection was called.

Is there a way to do this?  Is this be design?  Can IP spoofing get around
this protection?

Mark
 
-Original Message-
From: Leo Donahue - PLANDEVX [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 2:13 PM
To: Tomcat Users List
Subject: RE: [SPAM:] - RE: Restricting access to localhost for an HTTP
connector - Email has different SMTP TO: and MIME TO: fields in the email
addresses

In your server.xml you will add an address element and specify it as:
127.0.0.1
 
!-- Define a non-SSL Coyote HTTP/1.1 Connector on the port specified
 during installation  --
Connector 
   address=127.0.0.1
   port=8080 maxThreads=150 minSpareThreads=25
maxSpareThreads=75
   enableLookups=false redirectPort=8443
acceptCount=100
   debug=0 connectionTimeout=2 
   disableUploadTimeout=true /
 
 
Leo



From: Mark Claassen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 10:51 AM
To: 'Tomcat Users List'
Subject: [SPAM:] - RE: Restricting access to localhost for an HTTP connector
- Email has different SMTP TO: and MIME TO: fields in the email addresses


Thanks.  I thought I heard that it was possible though the address, but
was not sure.  I read this in the docs, but I guess I didn't / don't
understand the short explanation of address.
 



From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 08, 2006 1:24 PM
To: Tomcat Users List
Subject: Re: Restricting access to localhost for an HTTP connector


yes, you can bind the connector the 127.0.0.1, meaning it will only
listen on that address
use the address attribute in the connector 
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


Mark Claassen wrote: 

Is there to configure an HTTP Connector to only allow
connections from
localhost?  We have a server that has an HTTPS port that handles
all public
access.  However, we would like to leave a non SSL port open for
a
monitoring program we have running on the same machine.  We
would like to
not allow anyone else to be able to access the non-SSL port.  

I know that the apache webserver has mechanism to do this, but I
was
wondering if a standalone tomcat could also do what we need.

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


  



-- 


Filip Hanik
 


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



AW: Detect tomcat problems with a custom java reporting apps?

2006-06-12 Thread Peter Neu
You are right Leon. I just did a field test on our test server. The perm gen
space is relatively small on that machine. So opened a lot sessions and
did a lot of XSLT/FOP/Excel generation.

Thus the perm gen space was spent very fast. I monitored this with lambda.
In the end the server did not respond anymore. And here comes the
frightening news. There is no trace in the log files for that problem. 

So it is safe to say when the server does not respond in say 2 minutes the
game is over. 

One question remains after all. Doesn't it pay off to simply look ater the 
Memory space in frequent intervalls to see it bottle neck is ahead? I mean
it's possible to define certain ranges. 

Any ideas?


Cheers,
Swen

  

-Ursprüngliche Nachricht-
Von: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 12. Juni 2006 14:22
An: Tomcat Users List
Betreff: Re: Detect tomcat problems with a custom java reporting apps?

I'm not sure that after something bad happens you can access the
server at all. An OutOfMemory or an AllThreadsBusy Exception normally
lead to a non-responding tomcat. The best thing you could do is
monitoring the logs with a separate script on the same machine and
send mails on failure imho.

regards
leon

p.s. for the application monitoring of your production server you
should try moskito :-)

On 6/12/06, Peter Neu [EMAIL PROTECTED] wrote:
 Yes, I am using this already. But there is some vital functionality
missing.

 When an java.lang.outOf.MemoryException happens I won't get an alert
unless
 I happen to be using lambda at the moment. So what we have at hand is a
 'Schrödinger Cat' situation.

 I need to monitor the jmx control layer and have my program send out
alerts
 when something bad happens.

 So far I have 2 problems:

 1. How do I find an error? I played around with the JMX Proxy Servlet.
There
 is this Mbean: MemoryPool. When I query this I get the following result:

 Name: java.lang:type=MemoryPool,name=Perm Gen [shared-rw]
 modelerType: sun.management.MemoryPoolImpl
 Type: NON_HEAP
 CollectionUsageThreshold: 0
 CollectionUsageThresholdExceeded: true
 MemoryManagerNames: [Ljava.lang.String;@943129
 CollectionUsageThresholdSupported: true
 .

 If I see this I can't tell if anything is wrong. So what to do?

 2. How do I access the jmxproxy servlet from a java app? It requires
 authentication. :o(

 Cheers,
 Pete






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



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




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



Re: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Marc Farrow

I think the address tag will accept a regular expression.  So you could put
a negative 127.0.01 address entry in there.  I am not good at regular
expressions so google them.

On 6/12/06, Mark Claassen [EMAIL PROTECTED] wrote:


Thanks for all your help and I have gotten it to work.  It seems to be,
however, dependant on the name it is being access by.  I was hoping that I
could just put 127.0.0.1 in there and then it would only accept
connections
from the local machine.  It turns out that doing this only accepts
connections that come in with this name.

To clarify what I mean, here is an example:
Say Tomcat is on a machine called TestMachine.
If I put 127.0.0.1 in the address field, it accepts connections of the
form http: //127.0.0.1/... only
It does not accept connections from http: //TestMachine/..., even though
the server is this same machine.
I was hoping that it would accept all connections from the local machine,
regardless of what the connection was called.

Is there a way to do this?  Is this be design?  Can IP spoofing get around
this protection?

Mark

-Original Message-
From: Leo Donahue - PLANDEVX [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 2:13 PM
To: Tomcat Users List
Subject: RE: [SPAM:] - RE: Restricting access to localhost for an HTTP
connector - Email has different SMTP TO: and MIME TO: fields in the email
addresses

In your server.xml you will add an address element and specify it as:
127.0.0.1

   !-- Define a non-SSL Coyote HTTP/1.1 Connector on the port specified
during installation  --
   Connector
  address=127.0.0.1
  port=8080 maxThreads=150 minSpareThreads=25
maxSpareThreads=75
  enableLookups=false redirectPort=8443
acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true /


Leo



From: Mark Claassen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 10:51 AM
To: 'Tomcat Users List'
Subject: [SPAM:] - RE: Restricting access to localhost for an HTTP
connector
- Email has different SMTP TO: and MIME TO: fields in the email addresses


Thanks.  I thought I heard that it was possible though the address, but
was not sure.  I read this in the docs, but I guess I didn't / don't
understand the short explanation of address.




From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 1:24 PM
To: Tomcat Users List
Subject: Re: Restricting access to localhost for an HTTP connector


yes, you can bind the connector the 127.0.0.1, meaning it will only
listen on that address
use the address attribute in the connector
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


Mark Claassen wrote:

   Is there to configure an HTTP Connector to only allow
connections from
   localhost?  We have a server that has an HTTPS port that handles
all public
   access.  However, we would like to leave a non SSL port open for
a
   monitoring program we have running on the same machine.  We
would like to
   not allow anyone else to be able to access the non-SSL port.

   I know that the apache webserver has mechanism to do this, but I
was
   wondering if a standalone tomcat could also do what we need.

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






--


Filip Hanik



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





--
Marc Farrow


RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Peter Crowther
 From: Mark Claassen [mailto:[EMAIL PROTECTED] 
 Say Tomcat is on a machine called TestMachine.
 If I put 127.0.0.1 in the address field, it accepts 
 connections of the
 form http: //127.0.0.1/... only
 It does not accept connections from http: 
 //TestMachine/..., even though
 the server is this same machine.
 I was hoping that it would accept all connections from the 
 local machine,
 regardless of what the connection was called.
 
 Is there a way to do this?

Yes.  Add '127.0.0.1 TestMachine' into testmachine's /etc/hosts file.

 Is this be design?

Yes - IP design.  If you make a connection to an IP address, the
receiving socket must be bound to that IP address.  If the name
TestMachine maps to (say) 10.0.0.1, the IP stack will make the outbound
connection to 10.0.0.1:80.  But here you've elected not to bind the
socket to 10.0.0.1:80, so the inbound connection will fail.

 Can IP spoofing get around this protection?

Not trivially, as you have to spoof the destination IP address, not the
source.  I wouldn't like to spoof it over the Internet - you'd have to
compromise each router by some means.  Yes on the same subnet, by
obtaining the MAC address for one of TestMachine's network adapters and
crafting an IP datagram with a forged destination address.  This could
be protected against by the input policy on the adapter blocking
datagrams with a 127.0.0.1 destination address - or, in fact, any
address other than one of the legitimate IP addresses bound to that
adapter (plus any multicasts you use).

- Peter

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



Re: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Andrew Miehs

@Mark,

as Peter wrote, have a look in /etc/hosts.

It probably looks like

127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine

You should change this to

127.0.0.1   localhost testmachine
192.168.0.2 testmachine.domain.com

Just be careful if you are using Solaris - you may end up configuring  
your ethernet
to 127.0.0.1 if you have not used a fully qualified domain name in / 
etc/hostname.interfacename


Regards

Andrew


On 12/06/2006, at 3:08 PM, Peter Crowther wrote:


From: Mark Claassen [mailto:[EMAIL PROTECTED]
Say Tomcat is on a machine called TestMachine.
If I put 127.0.0.1 in the address field, it accepts
connections of the
form http: //127.0.0.1/... only
It does not accept connections from http:
//TestMachine/..., even though
the server is this same machine.
I was hoping that it would accept all connections from the
local machine,
regardless of what the connection was called.

Is there a way to do this?


Yes.  Add '127.0.0.1 TestMachine' into testmachine's /etc/hosts file.



-
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: Detect tomcat problems with a custom java reporting apps?

2006-06-12 Thread Leon Rosenberg

I think you need a multilayer system :-)

1) a http-client app which simply calls the same simple servlet
(simply writing available in the response or something like this)
each 10 seconds and check if the server replies at all.

2) monitor cpu load on the machine. If the idle time is 100% the
tomcat is probably dead (This of course expects some continious load
on the server)

3) monitor the logs

4) your simple servlet from 1) could deliver current free memory and
the monitoring application could raise alerts if the amount decreases
(still, would be harder to get PermGenSpace)

Leon

P.S.
btw, an outofmemory in the permgenspace doesn't necessary mean an
OutOfMemory in the logs. The AllThreadsBusy message also happens
because an OutOfMemory. Or any other strange log messages. We had
this situation (running of permspace) some time ago, and the errors
were everything but logical: response already commited exceptions or
bean xyz not found for example.

regards
Leon



On 6/12/06, Peter Neu [EMAIL PROTECTED] wrote:

You are right Leon. I just did a field test on our test server. The perm gen
space is relatively small on that machine. So opened a lot sessions and
did a lot of XSLT/FOP/Excel generation.

Thus the perm gen space was spent very fast. I monitored this with lambda.
In the end the server did not respond anymore. And here comes the
frightening news. There is no trace in the log files for that problem.

So it is safe to say when the server does not respond in say 2 minutes the
game is over.

One question remains after all. Doesn't it pay off to simply look ater the
Memory space in frequent intervalls to see it bottle neck is ahead? I mean
it's possible to define certain ranges.

Any ideas?


Cheers,
Swen



-Ursprüngliche Nachricht-
Von: Leon Rosenberg [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 12. Juni 2006 14:22
An: Tomcat Users List
Betreff: Re: Detect tomcat problems with a custom java reporting apps?

I'm not sure that after something bad happens you can access the
server at all. An OutOfMemory or an AllThreadsBusy Exception normally
lead to a non-responding tomcat. The best thing you could do is
monitoring the logs with a separate script on the same machine and
send mails on failure imho.

regards
leon

p.s. for the application monitoring of your production server you
should try moskito :-)

On 6/12/06, Peter Neu [EMAIL PROTECTED] wrote:
 Yes, I am using this already. But there is some vital functionality
missing.

 When an java.lang.outOf.MemoryException happens I won't get an alert
unless
 I happen to be using lambda at the moment. So what we have at hand is a
 'Schrödinger Cat' situation.

 I need to monitor the jmx control layer and have my program send out
alerts
 when something bad happens.

 So far I have 2 problems:

 1. How do I find an error? I played around with the JMX Proxy Servlet.
There
 is this Mbean: MemoryPool. When I query this I get the following result:

 Name: java.lang:type=MemoryPool,name=Perm Gen [shared-rw]
 modelerType: sun.management.MemoryPoolImpl
 Type: NON_HEAP
 CollectionUsageThreshold: 0
 CollectionUsageThresholdExceeded: true
 MemoryManagerNames: [Ljava.lang.String;@943129
 CollectionUsageThresholdSupported: true
 .

 If I see this I can't tell if anything is wrong. So what to do?

 2. How do I access the jmxproxy servlet from a java app? It requires
 authentication. :o(

 Cheers,
 Pete






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



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




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




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



RE: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Mark Claassen
We do have something similar to your first example.

 127.0.0.1 localhost
 192.168.0.2   testmachine.domain.com  testmachine

So we can probably move testmachine like you did.  But does this mean that
accesses by testmachine.domain.com will not comply?

I was just hoping that the restriction would be based on some intrinsic
information and not just on the name that was used.

Providing I don't let anyone hack into my /etc/hosts file, can this be
spoofed?

Mark

 
-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 12, 2006 9:17 AM
To: Tomcat Users List
Subject: Re: Restricting access to localhost for an HTTP connector - Email
has different SMTP TO: and MIME TO: fields in the email addresses

@Mark,

as Peter wrote, have a look in /etc/hosts.

It probably looks like

127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine

You should change this to

127.0.0.1   localhost testmachine
192.168.0.2 testmachine.domain.com

Just be careful if you are using Solaris - you may end up configuring your
ethernet to 127.0.0.1 if you have not used a fully qualified domain name in
/ etc/hostname.interfacename

Regards

Andrew


On 12/06/2006, at 3:08 PM, Peter Crowther wrote:

 From: Mark Claassen [mailto:[EMAIL PROTECTED] Say Tomcat is on a 
 machine called TestMachine.
 If I put 127.0.0.1 in the address field, it accepts connections of 
 the form http: //127.0.0.1/... only It does not accept connections 
 from http:
 //TestMachine/..., even though
 the server is this same machine.
 I was hoping that it would accept all connections from the local 
 machine, regardless of what the connection was called.

 Is there a way to do this?

 Yes.  Add '127.0.0.1 TestMachine' into testmachine's /etc/hosts file.


-
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: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Mark Claassen
Thanks, I think this answers my questions
 
-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 12, 2006 9:08 AM
To: Tomcat Users List
Subject: RE: Restricting access to localhost for an HTTP connector - Email
has different SMTP TO: and MIME TO: fields in the email addresses

 From: Mark Claassen [mailto:[EMAIL PROTECTED] Say Tomcat is on a 
 machine called TestMachine.
 If I put 127.0.0.1 in the address field, it accepts connections of 
 the form http: //127.0.0.1/... only It does not accept connections 
 from http:
 //TestMachine/..., even though
 the server is this same machine.
 I was hoping that it would accept all connections from the local 
 machine, regardless of what the connection was called.
 
 Is there a way to do this?

Yes.  Add '127.0.0.1 TestMachine' into testmachine's /etc/hosts file.

 Is this be design?

Yes - IP design.  If you make a connection to an IP address, the receiving
socket must be bound to that IP address.  If the name TestMachine maps to
(say) 10.0.0.1, the IP stack will make the outbound connection to
10.0.0.1:80.  But here you've elected not to bind the socket to 10.0.0.1:80,
so the inbound connection will fail.

 Can IP spoofing get around this protection?

Not trivially, as you have to spoof the destination IP address, not the
source.  I wouldn't like to spoof it over the Internet - you'd have to
compromise each router by some means.  Yes on the same subnet, by obtaining
the MAC address for one of TestMachine's network adapters and crafting an IP
datagram with a forged destination address.  This could be protected against
by the input policy on the adapter blocking datagrams with a 127.0.0.1
destination address - or, in fact, any address other than one of the
legitimate IP addresses bound to that adapter (plus any multicasts you use).

- Peter

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


-
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: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Peter Crowther
 From: Mark Claassen [mailto:[EMAIL PROTECTED] 
 I was just hoping that the restriction would be based on some 
 intrinsic information and not just on the name that was used.

It *is* based on the intrinsic information: the IP address to which the
socket is bound.

Repeat after me: A Hostname Is Just An Alias For An IP Address.
You're working with IP here, and limiting the socket to only accept
connections to 127.0.0.1.  So, you'll have to move over whatever
hostname(s) you want to use as alias(es) for 127.0.0.1.

 Providing I don't let anyone hack into my /etc/hosts file, can this be
 spoofed?

See my previous email: Yes, but not trivially and you can configure your
firewall to prevent it.

- Peter

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



Re: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread Andrew Miehs
The configuration in the connector is so that java know on which  
interface to 'BIND' to on the machine.


Do a
netstat -anp |grep LISTEN

on your machine. This shows which interface which processes are bound  
to.


The only process (generally speaking) that can connect to 127.0.0.1  
is one that is running on the

machine itself.

/etc/hosts just stores a list of aliases for mapping names to  
addresses - this does not suddenly

allow me to connect to anything but just entering the correct details.

If your process is NOT listening to 192.168.0.2 - no-one can connect  
to it...


Andrew






On 12/06/2006, at 3:32 PM, Mark Claassen wrote:


We do have something similar to your first example.


127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine


So we can probably move testmachine like you did.  But does this  
mean that

accesses by testmachine.domain.com will not comply?

I was just hoping that the restriction would be based on some  
intrinsic

information and not just on the name that was used.

Providing I don't let anyone hack into my /etc/hosts file, can this be
spoofed?



-
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 Multiple Jboss Instance on a single Windows Box

2006-06-12 Thread Sanjeev Kumar Bhat, Noida
---BeginMessage---
Hi, 

Is it possible to run multiple instances of Jboss Server on a single win2k box?

Thanks

Sanjeev

winmail.dat---End Message---
DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---
-
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: Restricting access to localhost for an HTTP connector - Email has different SMTP TO: and MIME TO: fields in the email addresses

2006-06-12 Thread David Smith
It is restricted based on IP, not name.  The name you give in the 
browser is resolved to an IP address via host file and/or DNS before 
making the request.


What you really seem to be looking for is the remote address valve which 
allows/denies access based on the client's IP address.  See 
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html for more 
information.  Using it you could allow 127.0.0.1 and whatever your local 
IP address is.


Another option is to simply block your tomcat ports via a firewall so 
only the local system can access them.


--David

Mark Claassen wrote:


We do have something similar to your first example.

 


127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine
   



So we can probably move testmachine like you did.  But does this mean that
accesses by testmachine.domain.com will not comply?

I was just hoping that the restriction would be based on some intrinsic
information and not just on the name that was used.

Providing I don't let anyone hack into my /etc/hosts file, can this be
spoofed?

Mark


-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 12, 2006 9:17 AM

To: Tomcat Users List
Subject: Re: Restricting access to localhost for an HTTP connector - Email
has different SMTP TO: and MIME TO: fields in the email addresses

@Mark,

as Peter wrote, have a look in /etc/hosts.

It probably looks like

127.0.0.1   localhost
192.168.0.2 testmachine.domain.com  testmachine

You should change this to

127.0.0.1   localhost testmachine
192.168.0.2 testmachine.domain.com

Just be careful if you are using Solaris - you may end up configuring your
ethernet to 127.0.0.1 if you have not used a fully qualified domain name in
/ etc/hostname.interfacename

Regards

Andrew


On 12/06/2006, at 3:08 PM, Peter Crowther wrote:

 

From: Mark Claassen [mailto:[EMAIL PROTECTED] Say Tomcat is on a 
machine called TestMachine.
If I put 127.0.0.1 in the address field, it accepts connections of 
the form http: //127.0.0.1/... only It does not accept connections 
from http:

//TestMachine/..., even though
the server is this same machine.
I was hoping that it would accept all connections from the local 
machine, regardless of what the connection was called.


Is there a way to do this?
 


Yes.  Add '127.0.0.1 TestMachine' into testmachine's /etc/hosts file.

   



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


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

 




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



Re: Tomcat 5.0.28 can't init TLS after restart

2006-06-12 Thread Glenn Holliday
Glenn Holliday wrote on May 30

 Tomcat 5.0.28 on Solaris 9 has been correctly serving Web apps
 using both http and https.  Then, after the Sun computer was
 shut down and restarted, Tomcat failed to serve https requests.
 It appears it could not initialize the https connector.
 It continues to serve http requests normally.

I eventually read enough of the Tomcat source code to recognize
what was happening.  Here's the explanation.

We had a Connector for https that defined both protocol=TLS and
sslProtocol=TLS.  That was an error.  Tomcat was trying to create an
instance of CoyoteConnector for protocol TLS, but that class only 
recognizes
protocols HTTP/1.1 and AJP/1.3.  So Tomcat created a null protocol handler
for the connector.  Once I removed the protocol attribute, which made it
use the default protocols HTTP/1.1, all was well.

All of our backup copies of the configuration files contain the incorrect 
attribute, so it
seems like it should never have worked.  I don't understand why it once
did, but I'm happy to have it working again.

--
Glenn Holliday
Computer Sciences Corporation
[EMAIL PROTECTED] 540-644-6636



This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.



-
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: Database Persistance And Session Replication

2006-06-12 Thread Filip Hanik - Dev Lists




unfortunately you can't do both, its either or

Filip


David Ron wrote:
Hey
everybody,
  
 I would like to configure Tomcat for both session replication
across
  
 3 servers and database session persistence. The database
persistence
  
lags several seconds which is why I don't think that I can simply
  
replicate sessions over many servers using the database.
  
  
I can get the sessions to persist to the database using
  
org.apache.catalina.session.PersistentManager, and I can get session to
  
replicate in memory using
  
org.apache.catalina.cluster.session.DeltaManager, but how to I use both
  
at the same time?
  
  
  
Here is server.xml with the in-memory replication that works:
  
  

  
Server port="8005" shutdown="SHUTDOWN"
  
  
 Service name="Catalina"
  
 Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
  
 port="80" minProcessors="5" maxProcessors="75"
  
 enableLookups="true" address="192.168.0.250"
redirectPort="443"/
  
  
 Engine name="Catalina" defaultHost="tomcat"
  
 Host name="tomcat" appBase="webapps"
  
  
 Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
  
  
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
  
 expireSessionsOnShutdown="false" debug="true"
  
 useDirtyFlag="false"
  
  
 Membership
  

className="org.apache.catalina.cluster.mcast.McastService"
  
 mcastAddr="228.0.0.4"
  
 mcastPort="45564"
  
 mcastFrequency="500"
  
 mcastDropTime="3000"/
  
  
 Receiver
  
  
className="org.apache.catalina.cluster.tcp.ReplicationListener"
  
 tcpListenAddress="192.168.0.250"
  
 tcpListenPort="4001"
  
 tcpSelectorTimeout="100"
  
 tcpThreadCount="6"/
  
  
 Sender
  
  
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
  
 replicationMode="pooled"/
  
  
 Valve
  
className="org.apache.catalina.cluster.tcp.ReplicationValve"
  
  
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/
  
  
 Deployer
  
className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
  
 tempDir="/tmp/war-temp/"
  
 deployDir="/tmp/war-deploy/"
  
 watchDir="/tmp/war-listen/"
  
 watchEnabled="false"/
  
  
 Context path="" docBase="."
  
!--
  
 Manager
className="org.apache.catalina.session.PersistentManager"
  
 distributable="true"
  
 debug="10"
  
 checkInterval="1"
  
 saveOnRestart="true"
  
 maxActiveSessions="-1"
  
 minIdleSwap="-1"
  
 maxIdleSwap="1"
  
 maxIdleBackup="1"
  
  
 Store
className="org.apache.catalina.session.JDBCStore"
  
 debug="100"
  
  
  
connectionURL="jdbc:mysql://192.168.0.253/tomcat?user=abcamp;password=efg"
  
 driverName="com.mysql.jdbc.Driver"
  
 sessionDataCol="session_data"
  
 sessionAppCol="app_name"
  
 sessionIdCol="session_id"
  
 sessionLastAccessedCol="last_access"
  
 sessionMaxInactiveCol="max_inactive"
  
 sessionTable="tomcat_sessions"
  
 sessionValidCol="valid_session"
  
 /Store
  
 /Manager
  
--
  
 /Context
  
  
 /Cluster
  
 /Host
  
 /Engine
  
 /Service
  
/Server
  

  
  
  

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

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.3/359 - Release Date: 6/8/2006
  



-- 


Filip Hanik






how to save a context---save and commit changes not enough.

2006-06-12 Thread Jay G. Scott

greetings,

i go into the web-based admin tool, click localhost, create a new context,
type in the stuff, and save it.  it says save successful.  the context appears
under the localhost.  i click commit changes.  the context is still there.

if i stop/start tomcat, the context is gone.

is that normal?  how do i make it permanent?

i looked at the manager-howto.html, but if it's there i didn't see it.

tomcat-apache-5.5.17
apache-1.3.29
solaris 9

j.

-- 
Jay Scott   512-835-3553[EMAIL PROTECTED]
Head of Sun Support, Sr. Operating Systems Specialist
Applied Research Labs, Computer Science Div.   S224
University of Texas at Austin

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



Memory Profiling Strategy???

2006-06-12 Thread John McClain
I am trying to find a memory leak in our web application.
I have set JProfiler up to take a heap snapshot upon every entry and exit of
a screen in our web application; This is because upon entry of a screen, we
write data to the user session, and upon exit we remove data from the user
session. The only time we store or remove data is to a user session - other
than an initial lifecycle listener load of application context which remains
static. JProfiler consistently shows that overall, memory usage has a net
increasing trend, yet when I analyze our user sessions over time, the
sessions do not increase in net memory usage. What is the best strategy to
find this memory leak??? If it is not in user session memory, then can I
assume it is a Tomcat memory leak???

John McClain
Senior Software Engineer
TCS Healthcare
[EMAIL PROTECTED]
(530)886-1700x235
Skepticism is the first step toward truth


-
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: Memory Profiling Strategy???

2006-06-12 Thread Peter Crowther
 From: John McClain [mailto:[EMAIL PROTECTED] 
 If it is not in user session memory, then can I
 assume it is a Tomcat memory leak???

No.  Consider, for example, retained memory in third-party libraries
that you use and singletons you may instantiate.

- Peter

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



Re: Memory Profiling Strategy???

2006-06-12 Thread David Smith
Also look at the memory useage of your servlet code, jsps, etc., ...  
Take a look at the objects you create and see if they are being 
dereferenced as you'd expect.  Tomcat recycles certain instance objects 
(like servlets) instead of creating/destroying them per requests for 
performance reasons.  The side effect is that any objects they reference 
will also be held over for the next request unless you purposely clean 
them up.


--David

John McClain wrote:


I am trying to find a memory leak in our web application.
I have set JProfiler up to take a heap snapshot upon every entry and exit of
a screen in our web application; This is because upon entry of a screen, we
write data to the user session, and upon exit we remove data from the user
session. The only time we store or remove data is to a user session - other
than an initial lifecycle listener load of application context which remains
static. JProfiler consistently shows that overall, memory usage has a net
increasing trend, yet when I analyze our user sessions over time, the
sessions do not increase in net memory usage. What is the best strategy to
find this memory leak??? If it is not in user session memory, then can I
assume it is a Tomcat memory leak???

John McClain
Senior Software Engineer
TCS Healthcare
[EMAIL PROTECTED]
(530)886-1700x235
Skepticism is the first step toward truth


-
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: Running Multiple Jboss Instance on a single Windows Box

2006-06-12 Thread Bob Hall
--- Sanjeev Kumar Bhat, Noida [EMAIL PROTECTED] wrote:

 Is it possible to run multiple instances of Jboss
 Server on a single win2k box?
 
 Thanks
 
 Sanjeev
 

Yes.

You should use server/service-bindings.xml to
orchestrate
port # assignment.

-Bob

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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]



AJP vs. JNI

2006-06-12 Thread Mann, Bradley
Hello,

I am trying to discover the differences between these two protocols (AJP
and JNI) when using the Jakarta Connector with Apache HTTPD and Tomcat.
Any information on the difference between these two and what scenarios
work best with each is greatly appreciated.

Thanks,

Brad Mann
Software Engineer - Information Access Services
HARRIS Corporation / GCSD
(321) 984-6292



Re: a compromised tomcat server

2006-06-12 Thread David Rees

On 6/10/06, hv @ Fashion Content [EMAIL PROTECTED] wrote:

I had an incident on my server the other day where someone had succesfully
broken into the server to execute a port scanner.

The port scanner was running under the tomcat process so I assume the
breakin was done by getting through the Tomcat manager app.


Out of curiosity, what version of Tomcat?

-Dave

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



Problem with tag library calling

2006-06-12 Thread Alex Turner

I have the following lines in my source file:

%@ taglib prefix=mp uri=com.mintpixels.web.helper %
[snip]
mp:dynselect values=Selling,Refininancing name=selling_refinancing/

When I run the jsp, I get the following errors:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error on token [, delete this token

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error on token ;, delete this token

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error, insert ) to complete Expression

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error on token ;, delete this token

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error, insert ] to complete Expression

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error on token ), delete this token



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

If I comment the line out (jsp comment %--) the code runs fine.

Anyone come across anything like this, cos I'm fresh out of ideas? (I have
deleted the work directory, restarted the server, re-copied all the
application code into the webapps directory to ensure that there can't be
any old code lying around).

Alex.


Re: Problem with tag library calling

2006-06-12 Thread Alex Turner

It looks like it's generating the following function:

 private boolean _jspx_meth_mp_dynselect_0(PageContext _jspx_page_context)
 throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  mp:dynselect
   com.mintpixels.web.helper.Dynselect _jspx_th_mp_dynselect_0 = new
com.mintpixels.web.helper.Dynselect();
   _jspx_th_mp_dynselect_0.setJspContext(_jspx_page_context);
   _jspx_th_mp_dynselect_0.setFoo(([Ljava.lang.String
;)org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager([
Ljava.lang.String;.class, foo, Selling,Refinancing));
   _jspx_th_mp_dynselect_0.setName(selling_refinancing);
   _jspx_th_mp_dynselect_0.doTag();
   return false;
 }


Is it just me, or does the line: _jspx_th_mp_dynselect_0.setFoo(([
Ljava.lang.String
;)org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager([
Ljava.lang.String;.class, foo, Selling,Refinancing));

got a couple of syntax errors?

Alex

On 6/12/06, Alex Turner [EMAIL PROTECTED] wrote:


I have the following lines in my source file:

%@ taglib prefix=mp uri=com.mintpixels.web.helper %
[snip]
mp:dynselect values=Selling,Refininancing name=selling_refinancing/

When I run the jsp, I get the following errors:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:

Syntax error on token [, delete this token

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error on token ;, delete this token


An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error, insert ) to complete Expression

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp

Generated servlet error:
Syntax error on token ;, delete this token

An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error, insert ] to complete Expression


An error occurred at line: 69 in the jsp file: /free_home_valuation.jsp
Generated servlet error:
Syntax error on token ), delete this token


org.apache.jasper.compiler.DefaultErrorHandler.javacError
(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
org.apache.jasper.compiler.Compiler.compile
(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
:563)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java
:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

If I comment the line out (jsp comment %--) the code runs fine.

Anyone come across anything like this, cos I'm fresh out of ideas? (I have
deleted the work directory, restarted the server, re-copied all the
application code into the webapps directory to ensure that there can't be
any old code lying around).

Alex.




Re: AJP vs. JNI

2006-06-12 Thread Darryl Miles

Mann, Bradley wrote:

Hello,

I am trying to discover the differences between these two protocols (AJP
and JNI) when using the Jakarta Connector with Apache HTTPD and Tomcat.
Any information on the difference between these two and what scenarios
work best with each is greatly appreciated.


Chalk and Cheese.


JNI = Java Native Interface, a programming API to allows native code 
(assembler code conforming to C/C++ ABIs of the host) to be loaded into 
the JVM for execution. 
http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html



AJP = Apache JServ Protocol, a network protocol for proxying HTTP 
request/response cycles.  ApacheJServ evolved into the jakarta 
connectors.  http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html



HTH

Darryl

-
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: Running Multiple Jboss Instance on a single Windows Box

2006-06-12 Thread Mark Thomas
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner


-
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 Installation Trouble

2006-06-12 Thread omkar tilak
Hi, 
   I'm trying to install Tomcat on one our department servers. I've 
already un-tared the tomcat distribution into folder 
/opt/research/apache-tomcat-5.5.17. Accordingly, my CATALINA_HOME 
variable is set to /opt/research/apache-tomcat-5.5.17 and JAVA_HOME 
variable is set to /usr/local/java/jdk1.5.0_03. But even after starting 
up tomcat using startup.sh, http://magellan.cs.iupui.edu:8080/ URL 
gives me Error: 404 
Location: / File Not Found / . Any suggestions to get tomcat working 
properly? Thanks 




Duncan is in his grave;
After life's fitful fever he sleeps well;
Treason has done his worst: nor steel, nor poison,
Malice domestic, foreign levy, nothing,
Can touch him further.

Macbeth: Act 3: Scene 2
The palace.
=
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Tomcat Installation Trouble

2006-06-12 Thread David Smith

omkar tilak wrote:
Take a look at /opt/research/apache-tomcat-5.5.17/logs/catalina.out for 
errors.


--David

Hi, 
  I'm trying to install Tomcat on one our department servers. I've 
already un-tared the tomcat distribution into folder 
/opt/research/apache-tomcat-5.5.17. Accordingly, my CATALINA_HOME 
variable is set to /opt/research/apache-tomcat-5.5.17 and JAVA_HOME 
variable is set to /usr/local/java/jdk1.5.0_03. But even after starting 
up tomcat using startup.sh, http://magellan.cs.iupui.edu:8080/ URL 
gives me Error: 404 
Location: / File Not Found / . Any suggestions to get tomcat working 
properly? Thanks 





Duncan is in his grave;
After life's fitful fever he sleeps well;
Treason has done his worst: nor steel, nor poison,
Malice domestic, foreign levy, nothing,
Can touch him further.

Macbeth: Act 3: Scene 2
The palace.
=
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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: Tomcat Installation Trouble

2006-06-12 Thread Larry Meadors

When I click on that link, I get an error that looks nothing like a
tomcat error - something else is running on port 8080, so you have 2
options:

1) Edit $CATALINA_HOME/conf/server.xml to run on another port

-or-

2) Kill (or reconfigure) the other app listening on port 8080

Larry


On 6/12/06, omkar tilak [EMAIL PROTECTED] wrote:

Hi,
   I'm trying to install Tomcat on one our department servers. I've
already un-tared the tomcat distribution into folder
/opt/research/apache-tomcat-5.5.17. Accordingly, my CATALINA_HOME
variable is set to /opt/research/apache-tomcat-5.5.17 and JAVA_HOME
variable is set to /usr/local/java/jdk1.5.0_03. But even after starting
up tomcat using startup.sh, http://magellan.cs.iupui.edu:8080/ URL
gives me Error: 404
Location: / File Not Found / . Any suggestions to get tomcat working
properly? Thanks




Duncan is in his grave;
After life's fitful fever he sleeps well;
Treason has done his worst: nor steel, nor poison,
Malice domestic, foreign levy, nothing,
Can touch him further.

Macbeth: Act 3: Scene 2
The palace.
=
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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: Tomcat Installation Trouble

2006-06-12 Thread omkar tilak
Thanks a lot David  it works now !!

David Smith [EMAIL PROTECTED] wrote:  omkar tilak wrote:
Take a look at /opt/research/apache-tomcat-5.5.17/logs/catalina.out for 
errors.

--David

Hi, 
 I'm trying to install Tomcat on one our department servers. I've 
already un-tared the tomcat distribution into folder 
/opt/research/apache-tomcat-5.5.17. Accordingly, my CATALINA_HOME 
variable is set to /opt/research/apache-tomcat-5.5.17 and JAVA_HOME 
variable is set to /usr/local/java/jdk1.5.0_03. But even after starting 
up tomcat using startup.sh, http://magellan.cs.iupui.edu:8080/ URL 
gives me Error: 404 
Location: / File Not Found / . Any suggestions to get tomcat working 
properly? Thanks 




Duncan is in his grave;
After life's fitful fever he sleeps well;
Treason has done his worst: nor steel, nor poison,
Malice domestic, foreign levy, nothing,
Can touch him further.

Macbeth: Act 3: Scene 2
The palace.
=
 __
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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]





Duncan is in his grave;
After life's fitful fever he sleeps well;
Treason has done his worst: nor steel, nor poison,
Malice domestic, foreign levy, nothing,
Can touch him further.

Macbeth: Act 3: Scene 2
The palace.
=
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com