Re: changing default ROOT webapp in Tomcat 6.0.18

2009-02-21 Thread Mark Thomas
SpY0o2 wrote:
 hello, I've been trying to deploy an application to Tomcat 6.0.18. I would
 like to make it my default ROOT app (without renaming the app to ROOT), so
 that I can access my app by entering 
 
 http://localhost:8080/ instead of http://localhost:8080/myApps

Renaming the WAR to ROOT.war is the simplest but if you really don't
want to do that then you have the following options:

1. Place your WAR outside of CATALINA_BASE/webapps. It must be outside
to prevent double deployment. Place context file named ROOT.xml in
CATALINA_BASE/conf/engine name/host name that has a docBase element
that points to your WAR.

2. Leave your WAR in CATALINA_BASE/webapps. Turn off autoDeploy *and*
deployOnStartup in your Host element in server.xml. Explicitly define
*all* Contexts in server.xml, specifying both path and docBase. You must
define your Contexts in server.xml as this option disables all the
auto-deploy mechanisms.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: changing default ROOT webapp in Tomcat 6.0.18

2009-02-21 Thread André Warnier

SpY0o2 wrote:

hello, I've been trying to deploy an application to Tomcat 6.0.18. I would
like to make it my default ROOT app (without renaming the app to ROOT), so
that I can access my app by entering 

http://localhost:8080/ instead of http://localhost:8080/myApps 


See http://wiki.apache.org/tomcat/HowTo, number 38.
..and about 50 earlier threads in this same list on the same subject in 
the last 6 months.

But I'm not quite sure what you mean by not naming it ROOT.
Why would it bother you, since it would anyway respond to 
http://localhost:8080/ ?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



MS Windowas Vista can't open WAR files

2009-02-21 Thread Isaac Oren


I have downloaded a WAR file into a Vista machine, but the OS can't open the 
file as it does with normal ZIPed files, also placing the WAR file as is in the 
webapp directory and try to access it doesn't work.. is there something I need 
to do for special for Vista 9Tomca 5.5)Thanks, Isaac

Re: changing default ROOT webapp in Tomcat 6.0.18

2009-02-21 Thread André Warnier

Mark Thomas wrote:

SpY0o2 wrote:

hello, I've been trying to deploy an application to Tomcat 6.0.18. I would
like to make it my default ROOT app (without renaming the app to ROOT), so
that I can access my app by entering 


http://localhost:8080/ instead of http://localhost:8080/myApps


Renaming the WAR to ROOT.war is the simplest but if you really don't
want to do that then you have the following options:

1. Place your WAR outside of CATALINA_BASE/webapps. It must be outside
to prevent double deployment. Place context file named ROOT.xml in
CATALINA_BASE/conf/engine name/host name that has a docBase element
that points to your WAR.

2. Leave your WAR in CATALINA_BASE/webapps. Turn off autoDeploy *and*
deployOnStartup in your Host element in server.xml. Explicitly define
*all* Contexts in server.xml, specifying both path and docBase. You must
define your Contexts in server.xml as this option disables all the
auto-deploy mechanisms.

Should I add #1 and #2 to the FAQ-HowTo #38, or is it better to leave it 
as it is now (only mentioning the simple option 0) ?


It seems to me that option #2 above is looking for trouble, no ?
(at least on this forum)


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: changing default ROOT webapp in Tomcat 6.0.18

2009-02-21 Thread Mark Thomas
André Warnier wrote:
 Mark Thomas wrote:
 SpY0o2 wrote:
 hello, I've been trying to deploy an application to Tomcat 6.0.18. I
 would
 like to make it my default ROOT app (without renaming the app to
 ROOT), so
 that I can access my app by entering
 http://localhost:8080/ instead of http://localhost:8080/myApps

 Renaming the WAR to ROOT.war is the simplest but if you really don't
 want to do that then you have the following options:

 1. Place your WAR outside of CATALINA_BASE/webapps. It must be outside
 to prevent double deployment. Place context file named ROOT.xml in
 CATALINA_BASE/conf/engine name/host name that has a docBase element
 that points to your WAR.

 2. Leave your WAR in CATALINA_BASE/webapps. Turn off autoDeploy *and*
 deployOnStartup in your Host element in server.xml. Explicitly define
 *all* Contexts in server.xml, specifying both path and docBase. You must
 define your Contexts in server.xml as this option disables all the
 auto-deploy mechanisms.

 Should I add #1 and #2 to the FAQ-HowTo #38, or is it better to leave it
 as it is now (only mentioning the simple option 0) ?
Please do.

 It seems to me that option #2 above is looking for trouble, no ?
 (at least on this forum)
It works for some people. It wouldn't be the way I'd do it but it
depends on your requirements. Personally, I'd always choose #1 over #2.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: MS Windowas Vista can't open WAR files

2009-02-21 Thread Youssef Mohammed
a WAR file is a normal zip. Yours is probably corrupted.
Regards, Youssef


On Sat, Feb 21, 2009 at 1:15 PM, Isaac Oren isaaco...@yahoo.com wrote:



 I have downloaded a WAR file into a Vista machine, but the OS can't open
 the file as it does with normal ZIPed files, also placing the WAR file as is
 in the webapp directory and try to access it doesn't work.. is there
 something I need to do for special for Vista 9Tomca 5.5)Thanks, Isaac


Re: changing default ROOT webapp in Tomcat 6.0.18

2009-02-21 Thread André Warnier

Mark Thomas wrote:



Should I add #1 and #2 to the FAQ-HowTo #38, or is it better to leave it
as it is now (only mentioning the simple option 0) ?

Please do.


done.
I haven't tried any of that stuff myself, so could someone make a quick 
accuracy check ?

Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Getting the tomcat server IP

2009-02-21 Thread Natalie Forood
Thanks so much to all who replied; I will try all your suggestions and report 
back with what worked best in our setup.
 Natalie 





From: Yuval Perlov yu...@r-u-on.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, February 20, 2009 11:54:17 PM
Subject: Re: Getting the tomcat server IP

request.getRemoteAddr();

You can only get your actual IP after opening a connection. Of course it can 
change depending on where the connection is coming from.

Alternatively you can open a connection to a known public server, and figure 
out your IP using the resulting socket. If you are going through a NAT this 
might not be your actual IP but the IP on your side of the NAT.

Yuval Perov


On Feb 20, 2009, at 2:21 AM, Natalie Forood wrote:

 Hello,
 
 Can you tell me how I can get the IP address of the interface that is running 
 Tomcat?  I can't use localhost, I need the IP of the physical interface.
 
 Thanks,
 Natalie


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

RE: MS Windowas Vista can't open WAR files

2009-02-21 Thread Caldarale, Charles R
 From: Isaac Oren [mailto:isaaco...@yahoo.com]
 Subject: MS Windowas Vista can't open WAR files

 I have downloaded a WAR file into a Vista machine, but the OS
 can't open the file as it does with normal ZIPed files

Use WinZip or the jar utility from the JDK if you want to look inside the .war 
file.

 placing the WAR file as is in the webapp directory and try to
 access it doesn't work..

There's no error message in Tomcat that says doesn't work; if you really want 
help, be specific about the errors you're seeing.

 is there something I need to do for special for Vista 9Tomca 5.5)

Proofread before hitting the send button?

No, Tomcat 5.5 and 6.0 work fine on Vista.  What JRE/JDK do you have installed? 
 What's in the Tomcat logs?

 - Chuck


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

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: MS Windowas Vista can't open WAR files

2009-02-21 Thread Isaac Oren
 
Chuck thanks..
 
I did multiple trials running drools RBMS directly under Tomcat 5.5 but 
couldn't make happen, at last I downloaded the standalone JBOSS + 
drools-guvnor. This works fine. But when I take the same drools-guvnor war file 
and place in the webapps of Tomact - Tomcat refuses to deply the application 
(although the directory is expended fine). I did copy 3 update jsf jar files to 
the Tomcat lib as directed. Log files are attached. Thanks, Isaac. 
 
 


--- On Sat, 2/21/09, Caldarale, Charles R chuck.caldar...@unisys.com wrote:

From: Caldarale, Charles R chuck.caldar...@unisys.com
Subject: RE: MS Windowas Vista can't open WAR files
To: Tomcat Users List users@tomcat.apache.org
Date: Saturday, February 21, 2009, 7:37 AM

 From: Isaac Oren [mailto:isaaco...@yahoo.com]
 Subject: MS Windowas Vista can't open WAR files

 I have downloaded a WAR file into a Vista machine, but the OS
 can't open the file as it does with normal ZIPed files

Use WinZip or the jar utility from the JDK if you want to look inside the .war
file.

 placing the WAR file as is in the webapp directory and try to
 access it doesn't work..

There's no error message in Tomcat that says doesn't work;
if you really want help, be specific about the errors you're seeing.

 is there something I need to do for special for Vista 9Tomca 5.5)

Proofread before hitting the send button?

No, Tomcat 5.5 and 6.0 work fine on Vista.  What JRE/JDK do you have installed?
 What's in the Tomcat logs?

 - Chuck


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

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: MS Windowas Vista can't open WAR files

2009-02-21 Thread Isaac Oren
 
Thanks Youssef,, nop.. 7-ZIP had no problems open the war file.. Vista 
couldn't.. it odd but that's MS I guess..Vista open itslef other ZIP files with 
no problems..

--- On Sat, 2/21/09, Youssef Mohammed youssef.moham...@gmail.com wrote:

From: Youssef Mohammed youssef.moham...@gmail.com
Subject: Re: MS Windowas Vista can't open WAR files
To: Tomcat Users List users@tomcat.apache.org, isaaco...@yahoo.com
Date: Saturday, February 21, 2009, 4:52 AM

a WAR file is a normal zip. Yours is probably corrupted.
Regards, Youssef


On Sat, Feb 21, 2009 at 1:15 PM, Isaac Oren isaaco...@yahoo.com wrote:



 I have downloaded a WAR file into a Vista machine, but the OS can't
open
 the file as it does with normal ZIPed files, also placing the WAR file as
is
 in the webapp directory and try to access it doesn't work.. is there
 something I need to do for special for Vista 9Tomca 5.5)Thanks, Isaac


Re: changing default ROOT webapp in Tomcat 6.0.18

2009-02-21 Thread Mark Thomas
André Warnier wrote:
 Mark Thomas wrote:

 Should I add #1 and #2 to the FAQ-HowTo #38, or is it better to leave it
 as it is now (only mentioning the simple option 0) ?
 Please do.

 done.
 I haven't tried any of that stuff myself, so could someone make a quick
 accuracy check ?

I made one minor tweak - you should not set path in ROOT.xml. The only
time path should be set is when the Context element is in server.xml

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: MS Windowas Vista can't open WAR files

2009-02-21 Thread Caldarale, Charles R
 From: Isaac Oren [mailto:isaaco...@yahoo.com]
 Subject: RE: MS Windowas Vista can't open WAR files

 Log files are attached.

The mailing list strips most attachments, including yours.  You'll need to post 
the logs directly in the message.

 - Chuck


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

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Fatal error: Cleaner terminated abnormally

2009-02-21 Thread Taylan Develioglu
I wanted to let you know it worked. The system.exit does get trapped.

java.lang.Error: Cleaner terminated abnormally
at sun.misc.Cleaner$1.run(Cleaner.java:130)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.Cleaner.clean(Cleaner.java:127)
at
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:124)
Caused by: java.lang.Error: java.io.IOException: Broken pipe
at sun.nio.ch.Util$SelectorWrapper$Closer.run(Util.java:97)
at sun.misc.Cleaner.clean(Cleaner.java:125)
... 1 more
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.EPollArrayWrapper.interrupt(Native Method)
at
sun.nio.ch.EPollArrayWrapper.interrupt(EPollArrayWrapper.java:242)
at
sun.nio.ch.EPollSelectorImpl.wakeup(EPollSelectorImpl.java:170)
at
sun.nio.ch.SelectorImpl.implCloseSelector(SelectorImpl.java:92)
at
java.nio.channels.spi.AbstractSelector.close(AbstractSelector.java:91)
at sun.nio.ch.Util$SelectorWrapper$Closer.run(Util.java:95)
... 2 more
Exception in thread Reference Handler java.lang.SecurityException:
Can't call System.exit()
at
com.emessenger.web.CustomSecurityManager.checkExit(CustomSecurityManager
.java:22)
at java.lang.Runtime.exit(Runtime.java:88)
at java.lang.System.exit(System.java:906)
at sun.misc.Cleaner$1.run(Cleaner.java:132)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.Cleaner.clean(Cleaner.java:127)
at
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:124)


- What we see is, GC breaks and class unloading starts after the first
full GC:

[Unloading class sun.reflect.GeneratedMethodAccessor100]
[Unloading class sun.reflect.GeneratedConstructorAccessor76]
[Unloading class sun.reflect.GeneratedConstructorAccessor80]
[Unloading class sun.reflect.GeneratedConstructorAccessor77]
[Unloading class sun.reflect.GeneratedMethodAccessor95]
[Unloading class sun.reflect.GeneratedMethodAccessor98]
[Unloading class sun.reflect.GeneratedConstructorAccessor78]
[Unloading class sun.reflect.GeneratedMethodAccessor106]
[Unloading class sun.reflect.GeneratedMethodAccessor91]
[Unloading class sun.reflect.GeneratedMethodAccessor105]
[Unloading class sun.reflect.GeneratedMethodAccessor85]

- And then Full GC madness begins:

[GC 4080947K(4177280K), 0.0603370 secs]
[GC 4090738K(4177280K), 0.0683390 secs]
[Full GC 4177280K-4081390K(4177280K), 16.2954960 secs]
[GC 4081673K(4177280K), 0.0607990 secs]
[GC 4097803K(4177280K), 0.0739870 secs]
[Full GC 4177279K-4081951K(4177280K), 16.2857450 secs]
[GC 4082100K(4177280K), 0.0614000 secs]
[GC 4101581K(4177280K), 0.0814330 secs]
[Full GC 4177279K-4082845K(4177280K), 16.2079870 secs]
[GC 4084452K(4177280K), 0.0628080 secs]
[GC 4106928K(4177280K), 0.0835720 secs]
[Full GC 4177279K-4083187K(4177280K), 16.3403530 secs]
[GC 4084203K(4177280K), 0.0627750 secs]
[GC 4101856K(4177280K), 0.0737540 secs]
[Full GC 4177278K-4083998K(4177280K), 16.2605530 secs]
[GC 4084493K(4177280K), 0.0632620 secs]
[GC 4107486K(4177280K), 0.0804700 secs]
[Full GC 4177278K-4084298K(4177280K), 16.3931240 secs]
[GC 4084500K(4177280K), 0.0633480 secs]
[Full GC 4177279K-4085842K(4177280K), 16.4017970 secs]
[GC 409K(4177280K), 0.0702090 secs]
[GC 4127816K(4177280K), 0.1089220 secs]

- But it's still better then an instant shutdown.


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: donderdag 19 februari 2009 16:22
To: Tomcat Users List
Subject: RE: Fatal error: Cleaner terminated abnormally


 From: Taylan Develioglu [mailto:tdevelio...@ebuddy.com]
 Subject: Re: Fatal error: Cleaner terminated abnormally

 By trapping the exit call using security manager we hope to prevent
 Tomcat from closing down on a cleaner termination.

This is not likely to work, since the Cleaner is running this code as a
privileged operation; if regular applications could trap those, I think
there would be some serious security holes.

 Not sure what the side  effects would be to keep running
 after a cleaner terminates (any idea).

The thread doing the System.exit() call is the reference handler; the
JVM will not function properly if it's not running.  The exception
should have been logged and ignored, not result in JVM termination, but
I suspect it will be difficult to convince Sun of that at this point.

 I forgot to say thanks for the response guys. Especially
 yours Chris, it was very helpful.

Odd, because Chris didn't participate in this thread...

 - Chuck


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

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, 

Re: Getting the tomcat server IP

2009-02-21 Thread Rusty Wright

Yuval, wouldn't that give you the client's address?  I thought she wanted the 
server's ip address, with the added wrinkle that her server has multiple 
network interfaces.


Yuval Perlov wrote:

request.getRemoteAddr();

You can only get your actual IP after opening a connection. Of course it 
can change depending on where the connection is coming from.


Alternatively you can open a connection to a known public server, and 
figure out your IP using the resulting socket. If you are going through 
a NAT this might not be your actual IP but the IP on your side of the NAT.


Yuval Perov


On Feb 20, 2009, at 2:21 AM, Natalie Forood wrote:


Hello,

Can you tell me how I can get the IP address of the interface that is 
running Tomcat?  I can't use localhost, I need the IP of the physical 
interface.


Thanks,
Natalie



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Getting the tomcat server IP

2009-02-21 Thread Yuval Perlov

You are right, should have been: request.getLocalAddr() - my bad.

Also, from the socket object you can always call  
socket.getLocalAddress() on an outgoing connection. This is useful if  
you want to make sure you are getting the IP for a particular network.


Yuval

On Feb 21, 2009, at 7:57 PM, Rusty Wright wrote:

Yuval, wouldn't that give you the client's address?  I thought she  
wanted the server's ip address, with the added wrinkle that her  
server has multiple network interfaces.



Yuval Perlov wrote:

request.getRemoteAddr();
You can only get your actual IP after opening a connection. Of  
course it can change depending on where the connection is coming  
from.
Alternatively you can open a connection to a known public server,  
and figure out your IP using the resulting socket. If you are going  
through a NAT this might not be your actual IP but the IP on your  
side of the NAT.

Yuval Perov
On Feb 20, 2009, at 2:21 AM, Natalie Forood wrote:

Hello,

Can you tell me how I can get the IP address of the interface that  
is running Tomcat?  I can't use localhost, I need the IP of the  
physical interface.


Thanks,
Natalie

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Authenticating Users

2009-02-21 Thread Alan Chaney

Hi

We have a site which has users log in to create/edit account 
information. Nothing unusual there. Currently this is implemented with a 
JDBCRealm and it all works OK.


However, we have a 'marketing requirement' to remove case sensitivity 
(but NOT case preservation) from user names and passwords. I cannot see 
anyway to do this directly with JDBCRealm or DataSourceRealm. Unless I'm 
missing something, the username and password provided to j_securitycheck 
are explicitly matched for case.


Additionally, we will shortly need to offer an alternative login 
mechanism - using either a login name or an email address in the same field.


So far, I can see the following options:

1. Implement a filter that 'sits around' the login form and translates 
case on password and username to lower case and create a lowercase 
'shadow' password table in my database. So, when a request is received 
for the 'secured' pages this would be fed through this filter. However, 
I don't think this will work, because I suspect that the security check 
is run BEFORE any filters that I have configured in web.xml.


2. Implement some java script to convert entered fields to lower case on 
the login form (GHASTLY!) Still doesn't fix the password thing.


3. Implement my own Realm - intercept the requests - identify the 
supplied string in the username field as an email address (or not), look 
up the user by email address in the database (which in my case must be 
unique). As I use PostgreSQL I can then write a 'like' query to case 
insensitively find matching user and password. Upside - it should work. 
Downside - I then have to add the resulting jar to $TOMCAT_HOME/lib on 
all my servers and update the MBean descriptor (which I don't completely 
understand how to do - advice?)


4. Possibly do something similar to 3 but with a JAAS.

Does anyone have any suggestions or comments? I'm perfectly OK with 
using Acegi - my only issue with that after a browse through the docs I 
don't see how I can meet my requirement of username/email and password 
case insensitive but case preserving without additional code for Acegi 
either. Obviously I can take that issue to the acegi/spring forums if 
acegi is the only solution (that is 1, 3, and 4. above won't work - 2. 
is out)


Thanks in advance

Alan Chaney







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Authenticating Users

2009-02-21 Thread Mark Thomas
Alan Chaney wrote:
 We have a site which has users log in to create/edit account
 information. Nothing unusual there. Currently this is implemented with a
 JDBCRealm and it all works OK.

I'd base your solution on the DataSourceRealm. JDBCRealm is very heavily
synchronised .

 So far, I can see the following options:
 
 1. Implement a filter that ...
 
 2. Implement some java script ... 
 
 3. Implement my own Realm ... 

 4. Possibly do something similar to 3 but with a JAAS.

5. Patch DataSourceRealm (should just be a couple of changes to make the
checks case insensitive) and deploy your patched version to each of your
Tomcat instances. To do this you'd put your DataSourceRealm.class file
in CATALINA_HOME/lib/org/apache/catalina/realm

6. Make case sensitivity configurable and contribute your patch back to
the ASF. Providing it is database neutral, there is a good chance it
will be accepted for Tomcat 7 and maybe back-ported to Tomcat 6.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: very slow class loading on initial JSP/servlet request after restart

2009-02-21 Thread André Warnier

A summary so far :
- the problem is : on one certain machine, when deploying any JSP which 
imports a certain self-made library of classes, that JSP takes an 
inordinate amount of time (one minute or more) to compile for a 5-line JSP
- after compilation, the JSP in question responds totally normally to 
requests
- there are no errors in the Tomcat logs.  The logs show only the 
inordinate amount of time needed to load the application, when the 
offending library is included.
- the issue appears only on that particular machine, which is a modern 
and fast machine, dual quad-core Intel Xeon E5310 CPUs, with a 4-disk 
Raid array.  The same JSP and library on any other of 3 machines using 
the same JVM and Tomcat, does not exhibit the same problem
- the disk array was checked for problems using various means, and does 
not exhibit any.  The RAM was similarly checked.
- the issue persists if the JSP is copied under another name on the same 
machine
- the issue persists if the whole webapp containing that JSP is copied 
to a new webapp name on the same machine (and thus occupying a different 
disk and memory area)
- the issue disappears if said self-made library is no longer imported 
in the JSP; it reappears if the library is imported again
- the issue persists if the imported library is moved from 
webapp/WEB-INF/lib to the Tomcat common lib location and vice-versa

- the issue persists despite changing the JVM version and/or Tomcat version
- the issue does not appear when importing the same self-made library in 
a separate stand-alone Java program and compiling/running that program 
on the same machine (?) (was that the whole library, or just a 
File.exists() test ?)
- during the compilation of the bewitched JSP, the machine on which the 
inordinate delay occurs does not exhibit any remarkably high CPU, memory 
 or disk usage
- the bewitching library of which it is question does not make evident 
references to external network resources whose unavailability or slow 
access could explain the compilation delay
- the affected system is not near any known source of Alpha particles, 
nor near a reindeer farm, nor in the proximity of any significant 
quantity of chocolate or other dark matter
- other applications on the striken machine work fine and do not exhibit 
the above symptoms
- the machine in question does not activate Java's security manager (nor 
do the other non-affected machines)



Suggestions of the day :

1.
under the assumption that the library in question does not contain 
hundreds of classes, and that the problem occurs during compilation, so 
that an error during execution of the JSP would not matter..


Start removing (commenting out) the content of each class one by one and 
test, until the specific class causing the issue is found.


2.
turn off 1,2,3,4,5,6,7 of the machine cores and see if it changes the 
symptoms


3.
I have a currently unused machine standing here, which in a spirit of 
camaraderie and assistance I would offer to exchange for the affected 
machine.  It's not a quad-core or anything like that, but to my 
knowledge when it was last powered on a couple of years ago, it did not 
exhibit that kind of problem.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Authenticating Users

2009-02-21 Thread Alan Chaney


Mark Thomas wrote:


5. Patch DataSourceRealm (should just be a couple of changes to make the
checks case insensitive) and deploy your patched version to each of your
Tomcat instances. To do this you'd put your DataSourceRealm.class file
in CATALINA_HOME/lib/org/apache/catalina/realm

6. Make case sensitivity configurable and contribute your patch back to
the ASF. Providing it is database neutral, there is a good chance it
will be accepted for Tomcat 7 and maybe back-ported to Tomcat 6.

Mark

Ok Mark I'll have a go at 5. and 6. I'll report back in a few days.

Regards

Alan Chaney


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Getting the tomcat server IP

2009-02-21 Thread Bill Barker

Natalie Forood nfor...@yahoo.com wrote in message 
news:206003.52131...@web35302.mail.mud.yahoo.com...
 Hello,

 Can you tell me how I can get the IP address of the interface that is 
 running Tomcat?  I can't use localhost, I need the IP of the physical 
 interface.


request.getLocalAddr() returns the IP address that the request was recieved 
on.  Note that if you are using AJP/1.3 than this is the IP address that 
Apache recieved the request on.

 Thanks,
 Natalie 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org