RE: JavaMail, NetBeans and Tomcat 5.5.23

2007-05-08 Thread David Short
I haven't gotten that far yet.  The message is in the NetBeans 5.5 IDE.  It
won't let me register a JavaMail resource with Tomcat 5.5.23 because it says
5.5.23 is not J2EE 1.4 compliant.  I may need to upgrade to NetBeans 6 and
Tomcat 6.x.  However, NetBeans 6 is in Milestone release at this time and
I'm hesitant... 

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 9:45 PM
To: Tomcat Users List
Subject: Re: JavaMail, NetBeans and Tomcat 5.5.23

On 5/8/07, David Short <[EMAIL PROTECTED]> wrote:

> Has anyone setup JavaMail in NetBeans 5.5 with Tomcat 5.5.23?  I'm 
> trying to register the NetBeans Server Resource and it won't let me 
> and tells me to set to Sun's Java System Application Server.
>
> Any ideas, suggestions, steps or tutorial available?

It's hard to say without the exact error message, but if you're trying to
send mail with 5.5.23, you might be running into Bug 40668.  It's missing
some mail-related classes.

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=40668

--
Wendy

-
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: JavaMail, NetBeans and Tomcat 5.5.23

2007-05-08 Thread Wendy Smoak

On 5/8/07, David Short <[EMAIL PROTECTED]> wrote:


Has anyone setup JavaMail in NetBeans 5.5 with Tomcat 5.5.23?  I'm trying to
register the NetBeans Server Resource and it won't let me and tells me to
set to Sun's Java System Application Server.

Any ideas, suggestions, steps or tutorial available?


It's hard to say without the exact error message, but if you're trying
to send mail with 5.5.23, you might be running into Bug 40668.  It's
missing some mail-related classes.

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=40668

--
Wendy

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



JavaMail, NetBeans and Tomcat 5.5.23

2007-05-08 Thread David Short
Has anyone setup JavaMail in NetBeans 5.5 with Tomcat 5.5.23?  I'm trying to
register the NetBeans Server Resource and it won't let me and tells me to
set to Sun's Java System Application Server.

Any ideas, suggestions, steps or tutorial available?


Re: Runaway catalina.out logging

2007-05-08 Thread Filip Hanik - Dev Lists



Andy wrote:

Filip,

This works, thanks, although I am still not sure why the original 
failed. Too many players in a single command...
the original failed cause | only pipes stdout, while tomcat is writing a 
bunch of crap to stderr

Filip


Regards,

Andy

On Wed, 9 May 2007, Filip Hanik - Dev Lists wrote:


change
 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &
to
 2>&1 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

ie, redirect stderr into stdout before passing it into the logger

Filip

Andy wrote:
This is a correction of the Subject: which I failed to set properly 
in my original message.  Sorry...


Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into 
a strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works 
much the same way as cronolog, except it is much simpler and does 
more (if anyone wants to see/use it, let me know ;)  ).  The script 
is invoked using the same approach, from catalina.sh:


I replace

   >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

   | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and 
shutdown messages "escape" to the terminal.  The rest goes to the 
script as before. It seems that for those messages, tomcat 
explicitly uses a file descriptor that corresponds to the terminal, 
or some such thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal 
performance in

production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ 
java/jre1.5.0_11/../lib/amd64

May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
> May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol 
start

INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol 
start

INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol 
pause

INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol 
pause

INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol 
destroy

INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol 
destroy

INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

-
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: How to programatically determine connector's port numbers?

2007-05-08 Thread Caldarale, Charles R
> From: webzo [mailto:[EMAIL PROTECTED] 
> Subject: Re: How to programatically determine connector's 
> port numbers?
> 
> I am in a class that is loaded earlier than the webapps
> (Bootstrapper kind of class which is loaded when the 
> webapp is being loaded first time). I am trying to get
> BOTH the Non-SSL and SSL ports at that point. Ideas?

Take a look at the code in Tomcat's manager and admin apps as well as
that in Lambda Probe.  I believe all of these use Tomcat's MX beans to
extract the information displayed, which includes port numbers among
many other things.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to programatically determine connector's port numbers?

2007-05-08 Thread Hassan Schroeder

On 5/8/07, webzo <[EMAIL PROTECTED]> wrote:

Hmm, come to think of it, I saw that one. However, that kind of
doesn't solve my problem.


OK, since you didn't describe that problem before...


I am in a class that is loaded earlier than the webapps (Bootstrapper
kind of class which is loaded when the webapp is being loaded first
time). I am trying to get BOTH the Non-SSL and SSL ports at that point.
Ideas?


I think you have an architectural issue. Correct me if I'm wrong but
you seem to assume that only one of each (non-SSL and SSL ports)
could be configured. Since there's nothing in the Servlet spec that
dictates that (AFAIK), the value of the non-SSL port(s) could be a
collection, so why not just get the port value from the request, when
it's meaningful? :-)

But perhaps if you describe the problem more explicitly...

--
Hassan Schroeder  [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 hprof empty file

2007-05-08 Thread Jason Polites

I think I "may" have found the cause of the problem with HPROF.  A
CTRL+BREAK (on win32) is what triggers the dump of the hprof data to a text
file, but when running Tomcat as a win32 service it automatically sets the
-Xrs JVM option which causes the JVM to ignore these signals from the OS
(this is required to prevent Tomcat from dying when the console user logs
off.. which triggers a CTRL+C from Windows).

That, plus this obscure
referencewhich
states:

"Do not use the -Xrs flag."

But does not really explain why.

So if I assume the hprof data is not being dumped because of the -Xrs
command, then I need to run Tomcat without this.  Of course this creates a
serious problem for me as I need it to run for a while so I get accurate
telemetry, and of course I can't log off the console otherwise the process
will die, but I am using remote desktop which will automatically log me off
after a timeout.

Might try vnc

Anyone got any other bright ideas?


On 5/8/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:


maybe try to run it under another service manager, like the Java Service
Wrapper
http://people.apache.org/~fhanik/wrapper.html

to rule out the case, that its a win service problem
Filip

Jason Polites wrote:
> Hi all,
>
> I am running Tomcat 5.5.23 on a Win32 platform as an NT Service, with
the
> native DLL.
>
> I am experiencing the CPU spinning at 100% in our production
environment,
> which is not something I have seen in our dev or staging env.  In
> order to
> determine the problem area, I have tried running Tomcat with hprof
> using the
> following JVM option:
>
> -Xrunhprof:cpu=samples,thread=y
>
> I am setting this in the Java options tab of the Windows service
> dialog.  I
> get a java.hprof.txt file created in the root tomcat directory, but
> there is
> nothing in it other than the standard intro text.
>
> This works when I run tomcat locally within eclipse (same tomcat
> version);
> but when running in production I get no data!
>
> This is really frustrating as I can't fix the CPU problem because I
can't
> identify it.
>
> Help!
>
> Thanks.
>
> 
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.6.2/787 - Release Date: 5/3/2007
2:11 PM
>


-
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: Runaway catalina.out logging

2007-05-08 Thread Andy

Filip,

This works, thanks, although I am still not sure why the original failed. 
Too many players in a single command...


Regards,

Andy

On Wed, 9 May 2007, Filip Hanik - Dev Lists wrote:


change
 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &
to
 2>&1 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

ie, redirect stderr into stdout before passing it into the logger

Filip

Andy wrote:
This is a correction of the Subject: which I failed to set properly in my 
original message.  Sorry...


Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a 
strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works much the 
same way as cronolog, except it is much simpler and does more (if anyone 
wants to see/use it, let me know ;)  ).  The script is invoked using the 
same approach, from catalina.sh:


I replace

   >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

   | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and shutdown 
messages "escape" to the terminal.  The rest goes to the script as before. 
It seems that for those messages, tomcat explicitly uses a file descriptor 
that corresponds to the terminal, or some such thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ 
java/jre1.5.0_11/../lib/amd64

May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
> May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

-
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: Runaway catalina.out logging

2007-05-08 Thread Filip Hanik - Dev Lists

change
  | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &
to
  2>&1 | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

ie, redirect stderr into stdout before passing it into the logger

Filip

Andy wrote:
This is a correction of the Subject: which I failed to set properly in 
my original message.  Sorry...


Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a 
strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works much 
the same way as cronolog, except it is much simpler and does more (if 
anyone wants to see/use it, let me know ;)  ).  The script is invoked 
using the same approach, from catalina.sh:


I replace

   >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

   | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and 
shutdown messages "escape" to the terminal.  The rest goes to the 
script as before. It seems that for those messages, tomcat explicitly 
uses a file descriptor that corresponds to the terminal, or some such 
thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal 
performance in

production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/ 


java/jre1.5.0_11/../lib/amd64
May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol 
destroy

INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol 
destroy

INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

-
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: Runaway catalina.out logging

2007-05-08 Thread Andy

Martin,

This is from catalina.sh, since it is Unix:

  JAVA_OPTS="$JAVA_OPTS
"-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" 
"-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"


As you see, it is functionally identical to your settings.

Regards,

Andy

On Tue, 8 May 2007, Martin Gainty wrote:


Andy-
in your startup file $CATALINA_HOME/bin/catalina.bat please confirm 
java.util.logging.config.file as in this example
set JAVA_OPTS=%JAVA_OPTS% 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"


then display contents of $CATALINA_HOME/conf/logging.properties

M--
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: "Andy" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, May 08, 2007 8:12 PM
Subject: Runaway catalina.out logging


This is a correction of the Subject: which I failed to set properly in my 
original message.  Sorry...


Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a 
strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works much the 
same way as cronolog, except it is much simpler and does more (if anyone 
wants to see/use it, let me know ;)  ).  The script is invoked using the 
same approach, from catalina.sh:


I replace

   >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

   | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and shutdown 
messages "escape" to the terminal.  The rest goes to the script as before. 
It seems that for those messages, tomcat explicitly uses a file descriptor 
that corresponds to the terminal, or some such thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/
java/jre1.5.0_11/../lib/amd64
May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

-

Re: How to programatically determine connector's port numbers?

2007-05-08 Thread webzo
Hmm, come to think of it, I saw that one. However, that kind of doesn't solve 
my problem. I am in a class that is loaded earlier than the webapps 
(Bootstrapper kind of class which is loaded when the webapp is being loaded 
first time). I am trying to get BOTH the Non-SSL and SSL ports at that point. 
Ideas?

Thanks for the response.

Av.

- Original Message 
From: Hassan Schroeder <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, May 8, 2007 4:41:24 PM
Subject: Re: How to programatically determine connector's port numbers?

On 5/8/07, webzo <[EMAIL PROTECTED]> wrote:

> Thats what I figured, that it would be available via ServletRequest or
> ServletContext. But I don't see any methods to get it.

In the Servlet 2.4 API doc -- the one I happened to have open :-) --

  ServletRequest.getServerPort()

HTH,
-- 
Hassan Schroeder  [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]






 

Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

-
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: Runaway catalina.out logging

2007-05-08 Thread Martin Gainty

Andy-
in your startup file $CATALINA_HOME/bin/catalina.bat please confirm 
java.util.logging.config.file as in this example
set 
JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"


then display contents of $CATALINA_HOME/conf/logging.properties

M--
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: "Andy" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, May 08, 2007 8:12 PM
Subject: Runaway catalina.out logging


This is a correction of the Subject: which I failed to set properly in my 
original message.  Sorry...


Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a 
strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works much the 
same way as cronolog, except it is much simpler and does more (if anyone 
wants to see/use it, let me know ;)  ).  The script is invoked using the 
same approach, from catalina.sh:


I replace

   >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

   | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and shutdown 
messages "escape" to the terminal.  The rest goes to the script as before. 
It seems that for those messages, tomcat explicitly uses a file descriptor 
that corresponds to the terminal, or some such thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/
java/jre1.5.0_11/../lib/amd64
May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

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

Runaway catalina.out logging

2007-05-08 Thread Andy
This is a correction of the Subject: which I failed to set properly in my 
original message.  Sorry...


Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a 
strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works much the 
same way as cronolog, except it is much simpler and does more (if anyone 
wants to see/use it, let me know ;)  ).  The script is invoked using the 
same approach, from catalina.sh:


I replace

   >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

   | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and shutdown 
messages "escape" to the terminal.  The rest goes to the script as before. 
It seems that for those messages, tomcat explicitly uses a file descriptor 
that corresponds to the terminal, or some such thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/
java/jre1.5.0_11/../lib/amd64
May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime

-
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: WELCOME to users@tomcat.apache.org

2007-05-08 Thread Andy

Hi there,

We have recently switched to tomcat-5.5, on SuSE 9.3, and I ran into a 
strange problem that was not there before.


I am using a custom script from catalina.out rotation.  It works much the 
same way as cronolog, except it is much simpler and does more (if anyone 
wants to see/use it, let me know ;)  ).  The script is invoked using the 
same approach, from catalina.sh:


I replace

  >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &

with

  | /u00/tomcat/bin/logger "$CATALINA_BASE"/logs/catalina 2>&1 &

This used to work perfectly.  But with ver.5.5, some startup and shutdown 
messages "escape" to the terminal.  The rest goes to the script as before. 
It seems that for those messages, tomcat explicitly uses a file descriptor 
that corresponds to the terminal, or some such thing.


Anyone has an idea why this is happening, and how I can capture the 
runaways?  Any help would be greatly appreciated.


Regards,

Andy Tsouladze

Escaping startup messages:

May 8, 2007 5:45:41 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/java/jre1.5.0_11/lib/amd64/server:/usr/java/jre1.5.0_11/lib/amd64:/usr/
java/jre1.5.0_11/../lib/amd64
May 8, 2007 5:45:41 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:42 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1776 ms
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
May 8, 2007 5:45:42 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 8, 2007 5:45:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/axis] startup failed due to previous errors
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 8, 2007 5:45:44 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
May 8, 2007 5:45:44 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 8, 2007 5:45:44 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/82  config=null
May 8, 2007 5:45:44 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 8, 2007 5:45:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2181 ms


Escaping shutdown messages:


May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:25 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8443
csapp02:/u00/jakarta/bin # May 8, 2007 5:47:26 PM
org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
May 8, 2007 5:47:26 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8443
May 8, 2007 5:47:26 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime


-
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: How to programatically determine connector's port numbers?

2007-05-08 Thread Hassan Schroeder

On 5/8/07, webzo <[EMAIL PROTECTED]> wrote:


Thats what I figured, that it would be available via ServletRequest or
ServletContext. But I don't see any methods to get it.


In the Servlet 2.4 API doc -- the one I happened to have open :-) --

 ServletRequest.getServerPort()

HTH,
--
Hassan Schroeder  [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: How to programatically determine connector's port numbers?

2007-05-08 Thread webzo
Thanks for the response.
Thats what I figured, that it would be available via ServletRequest or 
ServletContext. But I don't see any methods to get it. Maybe it is set as an 
attribute within one of these classes? Any ideas which method would help me?

Av.

- Original Message 
From: Hassan Schroeder <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, May 8, 2007 3:15:19 PM
Subject: Re: How to programatically determine connector's port numbers?

On 5/8/07, webzo <[EMAIL PROTECTED]> wrote:

> Is there a way to programmatically determine (using Java) the port numbers 
> that have been set up (in server.xml) for use by the SSL and Non/SSL 
> connectors?

You can get them from the ServletRequest object, a more portable
approach than extracting them from a container-specific config file.

HTH,
-- 
Hassan Schroeder  [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]





__
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: Error when increasing Tomcat's maximum memory pool

2007-05-08 Thread Caldarale, Charles R
> From: Ian H [mailto:[EMAIL PROTECTED] 
> Subject: Re: Error when increasing Tomcat's maximum memory pool
> 
> - the maximum memory available for allocation for the pool will depend
> on the amount of contiguous memory that's available to be allocated

It's the amount of contiguous virtual memory available, after Windows
has scettered code segments and DLLs all over it.

> - on a W2K box with 4GB of RAM, we will likely have, by default, 2GB
> earmarked for the OS, and 2GB for applications (seriously cutting into
> what would be contiguous and available for the pool)

The amount of installed RAM has nothing to do with the amount of virtual
space allocated to the OS and each process.  If you have a large enough
paging file and a lot of patience, you can run a Windows system with
much less than 1 GB of RAM and still have 2 GB of virtual space for each
process and 2 GB for the OS.  (It would run like crap, of course.)

> - on W2K Enterprise or Datacenter editions, you could opt to start
> with the /3GB switch and shift the allocation to 1GB/3GB for os/apps,
> respectively, increasing the likelihood of more contiguous space being
> available for the heap

Correct.  But again, that's 3 GB per process, not total for all
processes.

> [Regarding the /3GB switch not being recommended on W2K Standard
> Edition: does anyone have direct experience with this configuration
> and Tomcat as relates to stability, etc.?]

Sorry, I don't know if the standard W2K even looks for this option.  The
impact it has on the OS is less room for internal data structures;
Tomcat won't know the difference.

> - given the hypothetical scenario that more contiguous space has
> mysteriously been achieved for allocation (via choosing a different
> hardware architecture or what have you) -- does Tomcat 5.5 still have
> the 2GB limit I've heard mentioned?

The limit has nothing to do with Tomcat, but with the JVM.  Some levels
of 32-bit JVMs didn't handle address ranges of more than 2 GB due to
sign-extension problems.  I haven't checked to see if that problem has
been fixed in Sun's current 32-bit JVM.  It's not a problem in 64-bit
JVMs, of course.

> Are there any guidelines to go by regarding how much of a
> tradeoff there will be for the extra burden related to garbage
> collection with larger heaps, or is it a matter of "test and see"?

You'll have to test and see to be sure.  Typically, for a given
workload, the total heap size has little effect on the time a single GC
takes, but it does affect the frequency of GCs.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsp:include no longer working in 5.5.23

2007-05-08 Thread Scott Dunbar
No need to apologize - learning requires making mistakes and I 
appreciate the responses that you and David Smith gave in pointing me in 
the right direction.  I've got some work to do but I now understand much 
better that I was getting away with something for quite some time and 
shouldn't have been.


Again, thanks for the help.



Mark Thomas wrote:

Scott Dunbar wrote:
  

Is what I'm trying to do wrong?


Sorry, but yes.
  


Re: Tomcat6.0.10 Character Code question

2007-05-08 Thread Mark Thomas
red phoenix wrote:
> Anybody could tell me how to do it? Would you give me some code?

The following index.jsp works for me:
<%@ page contentType="text/html; charset=UTF-8" %>


   
 Character encoding test page
   
   
 Data posted to this form was:
 <%
   request.setCharacterEncoding("UTF-8");
   out.print(request.getParameter("mydata"));
 %>

 
 
   
   
   
 
   


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: jsp:include no longer working in 5.5.23

2007-05-08 Thread Mark Thomas
Scott Dunbar wrote:
> I want a directory to be the root directory of a virtual host.  That
> directory is itself a webapp and may have other directories within it
> that are webapps (with explicit Context elements). 
You simply can't do this. Tomcat was never intended to work this way.
As I said before, that it used to work this way was a side-effect of a
since fixed bug.

> To this point I have
> never had to have a different directory from my default stuff.  In
> effect this change means that there is no such thing as a default webapp
> directory - it must be explicitly enumerated.
Yes there is. It is just called ROOT rather than being the appBase for
the host.

>  There is a Tomcat
> proprietary convention of naming a default one ROOT but that will
> complicate my move to any other app server.
It shouldn't. Build your war. Do whatever the app requires to define
it as the ROOT webapp and deploy it.

>  It also complicates an
> Apache httpd and Tomcat environment.  Previously I was able to put the
> Apache httpd VirtualHost DocumentRoot and the Tomcat Host appBase at the
> same place and have httpd serve static content while Tomcat served
> dynamic content.
This is extremely dangerous from a security point of view. You are
very likely to see source code disclosure issues with your JSPs if you
run your site like this.

>  Now I have to change my directory structure because
> there are really two different places to get root level things.  For
> example, doing a jsp:include of /something.jsp comes from a different
> directory than including CSS from /styles.css.  This just seems more
> complicated to me.  You really can not overlay VirtualHost's and Host's
> anymore.
Yes, I am afraid you do need to change your directory structure. Not
least because of the security issues.

> Is what I'm trying to do wrong?
Sorry, but yes.

>  My frustration stems from the fact that
> I always been able to have a directory that is the root and, optionally,
> separate directories under the root that are webapps with their own
> Context.  What you're saying is that I can't do that - I need an
> explicit directory for my default webapp that is different from the root
> of the virtual host (though it can be a child of it).
The httpd virtual host root should be separate from Tomcat's appBase
which in turn should not be the same as any of the docBase values for
Contexts deployed in that host.

>  That complicates
> the directory structure and, since the Tomcat 3.x days through at least
> 5.5.15 is not the way it worked.
At the risk of getting boring with the repetition - it was never
intended to work this way.

> I guess what I'm looking for is a true default Context but it seems that
> that no longer exists - it must be explicit.  This could explain some
> other problems I'm having with JRoller not being able to be the top of a
> virtual host anymore with 5.5.23 (and, with some experimentation, 5.5.20
> also).
What you are looking for doesn't exist. You might be able to hack it
into working but you would need to be extremely careful.

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: jsp:include no longer working in 5.5.23

2007-05-08 Thread David Smith
The organization of webapps isn't tree oriented on disk.  It's a flat 
list of webapps on disk with the "default" webapp being named the 
special name ROOT (defined by the servlet spec).  If you need webapps 
organized deeper than the top level (ie /myWeb/path/app), then you use 
the pound symbol as a path separator in the webapp's name (ie 
myWeb#path#app).  Unfortunately that trick seems to only work in a very 
limited set of circumstances.  You can search the list for where this 
works or doesn't work.


Don't overlap the webapps directory and the apache httpd virtual 
directory.  It's cleaner to keep the two separated.  Instead organize 
your content so static resources served by apache httpd are in a apache 
httpd directory.  It seems to me what you are really after is the way 
php works and you can't get that with tomcat.


--David

Scott Dunbar wrote:

Thanks for the input.  However, I guess I'm still missing something.

I want a directory to be the root directory of a virtual host.  That 
directory is itself a webapp and may have other directories within it 
that are webapps (with explicit Context elements).  To this point I 
have never had to have a different directory from my default stuff.  
In effect this change means that there is no such thing as a default 
webapp directory - it must be explicitly enumerated.  There is a 
Tomcat proprietary convention of naming a default one ROOT but that 
will complicate my move to any other app server.  It also complicates 
an Apache httpd and Tomcat environment.  Previously I was able to put 
the Apache httpd VirtualHost DocumentRoot and the Tomcat Host appBase 
at the same place and have httpd serve static content while Tomcat 
served dynamic content.  Now I have to change my directory structure 
because there are really two different places to get root level 
things.  For example, doing a jsp:include of /something.jsp comes from 
a different directory than including CSS from /styles.css.  This just 
seems more complicated to me.  You really can not overlay 
VirtualHost's and Host's anymore.


Is what I'm trying to do wrong?  My frustration stems from the fact 
that I always been able to have a directory that is the root and, 
optionally, separate directories under the root that are webapps with 
their own Context.  What you're saying is that I can't do that - I 
need an explicit directory for my default webapp that is different 
from the root of the virtual host (though it can be a child of it).  
That complicates the directory structure and, since the Tomcat 3.x 
days through at least 5.5.15 is not the way it worked.


I guess what I'm looking for is a true default Context but it seems 
that that no longer exists - it must be explicit.  This could explain 
some other problems I'm having with JRoller not being able to be the 
top of a virtual host anymore with 5.5.23 (and, with some 
experimentation, 5.5.20 also).


I'll continue to experiment - thanks for your help.



Mark Thomas wrote:

Scott Dunbar wrote:
 

Thanks, I checked that and my I don't set a docBase in my context:



   



And there is the problem. If it isn't absolute, docBase is relative to
appBase so you do have appBase == docBase

To fix this:
- remove the Context element from your server.xml
- assuming you have only one webapp deployed, move the contents of
/home/scott/sites/domainname.tld to 
/home/scott/sites/domainname.tld/ROOT

- if you have multiple webapps deployed, just move the files that are
part of the ROOT webapp

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]

  






--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
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 when increasing Tomcat's maximum memory pool

2007-05-08 Thread Ian H

Thanks again, both Filip & Chuck,

Is this interpretation of the information out there correct:
- the maximum memory available for allocation for the pool will depend
on the amount of contiguous memory that's available to be allocated
- on a W2K box with 4GB of RAM, we will likely have, by default, 2GB
earmarked for the OS, and 2GB for applications (seriously cutting into
what would be contiguous and available for the pool)
- on W2K Enterprise or Datacenter editions, you could opt to start
with the /3GB switch and shift the allocation to 1GB/3GB for os/apps,
respectively, increasing the likelihood of more contiguous space being
available for the heap
[Regarding the /3GB switch not being recommended on W2K Standard
Edition: does anyone have direct experience with this configuration
and Tomcat as relates to stability, etc.?]

- given the hypothetical scenario that more contiguous space has
mysteriously been achieved for allocation (via choosing a different
hardware architecture or what have you) -- does Tomcat 5.5 still have
the 2GB limit I've heard mentioned?  Do newer versions still have this
limitation?  Are there any guidelines to go by regarding how much of a
tradeoff there will be for the extra burden related to garbage
collection with larger heaps, or is it a matter of "test and see"?

Thanks again,

- Ian


On 5/8/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

32 bit limitations, the entire process heap is around 2GB, leaving you
with the number you found for the java heap

Filip

Ian H wrote:
> I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
> (recently upgraded from 2GB).  The JVM in place is 1.4.2_12.
>
> Using the "Configure tomcat" widget, I attempted to increase the
> maximum memory pool from 1280MB that had been working to 2560MB.  At
> this point, Tomcat fails to start, with these errors showing up in the
> jakarta log:
>
>  JNI Error occurred during initialization of VM
>  JNI Could not reserve enough space for object heap
>
> Googling around, I've only found that there seems to be a limit which
> varies based on the flavour of the components in an installation,
> typically ranging from around 1700MB to 2GB...I have yet to find
> anything comprehensive detailing these limitations, however.
>
> That being said, with its current configuration, Tomcat will only
> start on my system with the maximum pool capped at 1344MB...anything
> higher than this and it fails.
>
> Does anyone have any suggestions regarding how to diagnose what's
> limiting this, or suggestions for increasing it?
>
> Thank you very much,
>
> - Ian


-
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 when increasing Tomcat's maximum memory pool

2007-05-08 Thread Filip Hanik - Dev Lists
32 bit limitations, the entire process heap is around 2GB, leaving you 
with the number you found for the java heap


Filip

Ian H wrote:

I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
(recently upgraded from 2GB).  The JVM in place is 1.4.2_12.

Using the "Configure tomcat" widget, I attempted to increase the
maximum memory pool from 1280MB that had been working to 2560MB.  At
this point, Tomcat fails to start, with these errors showing up in the
jakarta log:

 JNI Error occurred during initialization of VM
 JNI Could not reserve enough space for object heap

Googling around, I've only found that there seems to be a limit which
varies based on the flavour of the components in an installation,
typically ranging from around 1700MB to 2GB...I have yet to find
anything comprehensive detailing these limitations, however.

That being said, with its current configuration, Tomcat will only
start on my system with the maximum pool capped at 1344MB...anything
higher than this and it fails.

Does anyone have any suggestions regarding how to diagnose what's
limiting this, or suggestions for increasing it?

Thank you very much,

- Ian

-
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: How to programatically determine connector's port numbers?

2007-05-08 Thread Hassan Schroeder

On 5/8/07, webzo <[EMAIL PROTECTED]> wrote:


Is there a way to programmatically determine (using Java) the port numbers that 
have been set up (in server.xml) for use by the SSL and Non/SSL connectors?


You can get them from the ServletRequest object, a more portable
approach than extracting them from a container-specific config file.

HTH,
--
Hassan Schroeder  [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 on centOS

2007-05-08 Thread Scott Dunbar
I am using CentOS 4.4 but I don't think that this is specific to Linux 
per se.


I've modified startup.sh to have:

CATALINA_OPTS="-Djava.awt.headless=true -Xmx512m"
export CATALINA_OPTS

after the comments at the top and it works fine. I also hard code my 
JAVA_HOME in much the same way so that there isn't a confusion as to 
which one to use.




[EMAIL PROTECTED] wrote:

We have installed tomcat 5.5.9 on centOS with cpanel but we're having some 
problem setting custom options.
For example we wish to set the maximum memory with -Xmx, so we open catalina.sh 
and we add it to JAVA_OPTS variable.
We then restart tomcat but it doesn't take the changes since "ps aux | grep 
tomcat" gives tomcat details and there is no -Xmx option.

I compared my installation on my local ubuntu box and catalina.sh files are the 
same, like the startup.sh ones.
And on my ubuntu box i can start tomcat with all the options i want.

Both box have last jdk, and http://127.0.0.1:8080/manager/html shows the 
correct jvm version on both.

The problem is that actually the centOS box 
http://127.0.0.1:8080/manager/status gives as maximum merory only 64mb, and 
since it's a 2 gb ram box it's really too low. But the changes we try to do 
seems ignored.

Anybody have a clue on how this works? Where does it take the configuration 
file from?

Thanks in advance.


--
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/



-
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: How to programatically determine connector's port numbers?

2007-05-08 Thread Martin Gainty

Looks like you'll have to use an embedded container e.g.
http://fisheye5.cenqua.com/browse/glassfish/appserv-core/src/java/com/sun/enterprise/web/WebContainer.java?r1=1.74&r2=1.75
int[] ports= _embedded.getEngines().vsArray[0].getPorts()

M--
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: "webzo" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 4:30 PM
Subject: How to programatically determine connector's port numbers?



Hello all,
Is there a way to programmatically determine (using Java) the port numbers 
that have been set up (in server.xml) for use by the SSL and Non/SSL 
connectors? By default they are 8080 and 8443 but I need to be able to 
determine it programmatically as well.


Thanks.

Av.



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





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



Tomcat on centOS

2007-05-08 Thread [EMAIL PROTECTED]
We have installed tomcat 5.5.9 on centOS with cpanel but we're having some 
problem setting custom options.
For example we wish to set the maximum memory with -Xmx, so we open catalina.sh 
and we add it to JAVA_OPTS variable.
We then restart tomcat but it doesn't take the changes since "ps aux | grep 
tomcat" gives tomcat details and there is no -Xmx option.

I compared my installation on my local ubuntu box and catalina.sh files are the 
same, like the startup.sh ones.
And on my ubuntu box i can start tomcat with all the options i want.

Both box have last jdk, and http://127.0.0.1:8080/manager/html shows the 
correct jvm version on both.

The problem is that actually the centOS box 
http://127.0.0.1:8080/manager/status gives as maximum merory only 64mb, and 
since it's a 2 gb ram box it's really too low. But the changes we try to do 
seems ignored.

Anybody have a clue on how this works? Where does it take the configuration 
file from?

Thanks in advance.


--
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/



-
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: jsp:include no longer working in 5.5.23

2007-05-08 Thread Scott Dunbar

Thanks for the input.  However, I guess I'm still missing something.

I want a directory to be the root directory of a virtual host.  That 
directory is itself a webapp and may have other directories within it 
that are webapps (with explicit Context elements).  To this point I have 
never had to have a different directory from my default stuff.  In 
effect this change means that there is no such thing as a default webapp 
directory - it must be explicitly enumerated.  There is a Tomcat 
proprietary convention of naming a default one ROOT but that will 
complicate my move to any other app server.  It also complicates an 
Apache httpd and Tomcat environment.  Previously I was able to put the 
Apache httpd VirtualHost DocumentRoot and the Tomcat Host appBase at the 
same place and have httpd serve static content while Tomcat served 
dynamic content.  Now I have to change my directory structure because 
there are really two different places to get root level things.  For 
example, doing a jsp:include of /something.jsp comes from a different 
directory than including CSS from /styles.css.  This just seems more 
complicated to me.  You really can not overlay VirtualHost's and Host's 
anymore.


Is what I'm trying to do wrong?  My frustration stems from the fact that 
I always been able to have a directory that is the root and, optionally, 
separate directories under the root that are webapps with their own 
Context.  What you're saying is that I can't do that - I need an 
explicit directory for my default webapp that is different from the root 
of the virtual host (though it can be a child of it).  That complicates 
the directory structure and, since the Tomcat 3.x days through at least 
5.5.15 is not the way it worked.


I guess what I'm looking for is a true default Context but it seems that 
that no longer exists - it must be explicit.  This could explain some 
other problems I'm having with JRoller not being able to be the top of a 
virtual host anymore with 5.5.23 (and, with some experimentation, 5.5.20 
also).


I'll continue to experiment - thanks for your help.



Mark Thomas wrote:

Scott Dunbar wrote:
  

Thanks, I checked that and my I don't set a docBase in my context:



   



And there is the problem. If it isn't absolute, docBase is relative to
appBase so you do have appBase == docBase

To fix this:
- remove the Context element from your server.xml
- assuming you have only one webapp deployed, move the contents of
/home/scott/sites/domainname.tld to /home/scott/sites/domainname.tld/ROOT
- if you have multiple webapps deployed, just move the files that are
part of the ROOT webapp

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]

  




How to programatically determine connector's port numbers?

2007-05-08 Thread webzo
Hello all,
Is there a way to programmatically determine (using Java) the port numbers that 
have been set up (in server.xml) for use by the SSL and Non/SSL connectors? By 
default they are 8080 and 8443 but I need to be able to determine it 
programmatically as well. 

Thanks.

Av.



__
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: request.getParameter is returning the wrong value

2007-05-08 Thread James McIntosh
Try printing out the URL / URI + query string and printing a loop of all
request parameters to see what you are actually posing and if the
request is still the correct one.

The next thing to check would be whether you request is redirected /
forwarded as this can have cause problems.

Kind regards
James McIntosh



-
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-page and TC 5.5.23

2007-05-08 Thread gb1071nx
I'm just adding to this: 

When I remove the mapping for the error-code 500, then I get the
standard tc5.5 error page.  So my exception-type error-page directive is
being ignored. 

So it does appear that
http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4  isn't fixed.
And won't be fixed? 

It occurs to me that this should break quite a few "working" apps
though, so surely someone else has reported it? Searching further, I
found this:

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

Is it then now a requirement that for JSP's, we *must* use the errorPage
directive?  Or is there a way to get the more generic web.xml error-page
config to work? 

And can anyone explain what is meant by "development mode" (from comment
in bug 37062 and how to switch it off (to see if that makes my
error-page's work again)



> -Original Message-
> From: gb1071nx [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 08, 2007 12:39 PM
> To: Tomcat Users List
> Subject: error-page and TC 5.5.23
> 
> 
> Hello,
> 
> I'm starting the process of migrating some of our server from 
> 5.0.29 to 5.5.23, and I've found that the 'nice' useful 
> stacktraces with
> linenumbers are back, and working beautifully in 5.5.23.   
> 
> But I do find the following issues as well: 
> 
> I have the following test page: 
> 
> 
> 
> <%
>  if (true) {
>   throw new java.sql.SQLException("TEST");  } %>  
> 
> 
> And the following web.xml:
> 
>   xmlns="http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
> version="2.4">
> 
> 
> 
>   java.sql.SQLException 
>   /error/database.jsp
> 
> 
>   500 
>   /error/500.jsp
> 
> 
> 
> 
> 
> 
> And when I call the page throwing the SQLException, I get the 
> error page
> for the error-code 500.   Tomcat5.0 does not behave like 
> that, 5.5 does.
> Which is the correct behaviour? (or perhaps:  is there a way 
> to configure 5.5 so that it acts like 5.0?)  I recall this bug report:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 .  
> Has the bug reported in comment#4 been fixed?  Is this the 
> bug I'm experiencing in my test page?
> 
> 
> 
> 
> Also, I can confirm the following bug, I also experience it: 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=42314
> 

-
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: ACL (access control list) tutorial or example

2007-05-08 Thread Pid

David Kerber wrote:
Authentication is done in the java code, checking against the back-end 
database, and I'm trying to build the ACL's for a site as I read the 
site and user information from the db.  The only thing tomcat is doing 
is serving up data; no authentication or access controls are set up in 
tomcat itself beyond whatever is there in the default installation.


I'd be tempted to forgo setting up ACLs of some flavour, in favour of 
using a JDBCRealm to handle authentication and basic role management.


Configure portions of your application to be available by URL path:

 /staff/stuff
 /manager/stuff
 /admin/stuff

Once you're in a specific (secured path) you could use the stored 
username/object to determine which data to display.



There isn't a standard way of doing programmatical security of this 
nature - the nature of it is such that you have to write it yourself.



Programmatical checks at each read/write point, using username based SQL 
 queries if your user can be linked/related to the stock DB, it's a 
logical problem more than Tomcat problem I think.



p





Dave


Pid wrote:


David Kerber wrote:

Thanks for the response, but I don't think either of these are what I 
need.  My application involves users who need access to the inventory 
data for stores throughout the country, and those locations and users 
are all stored in a back-end database.  All this is managed by java 
classes; tomcat and about 5 jsp's are just the front end for 260 or 
so java classes that do the grunt work.  I need to be able to ensure 
that some users only have access to their own stores, while other 
users (regional managers, etc) can access all the stores under their 
jurisdiction, and system administrators can manage system settings, 
etc.  I have those permissions set up in the database, but can't 
quite work out how to apply them to ACL's and ACLEntries.  That's why 
I'm looking for a tutorial and/or sample code.
The people who initially wrote this app tried, but didn't seem to get 
the permissions handling set up quite right, because any user who 
authenticates successfully has unlimited access to their stores, but 
some of them should only have read access, and I need to get it 
straightened out.



How are you doing auth? (E.g. using Tomcat FORM).

You'll be wanting some programmatical security then no?  You'll have 
to write some checks for each occasion that a user needs to read or 
write some data I'd imagine.




If you've using the built in auth stuff, then you can use the 
Principal to identify which roles the user has access to.


if (request.isUserInRole( "system_admin" )) {
// show a page, do an action, write some data.
...
}
else {
// throw error
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
}


p




Thanks,
Dave


Martin Gainty wrote:


Good Morning Dave...

I would start by referencing this link
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html

either
setup security in %JAVA_HOME%/lib/security/java.policy and start 
java with security manager enabled e.g.
JAVA -Djava.security.policy=java.policy 
%CATALINA_HOME%\bin\bootstrap.jar


OR
read everything you can on configuring 
%CATALINA_HOME%/conf/catalina.policy
and configure the necessary options in catalina.policy *this link 
should get you started*

http://tomcat.apache.org/tomcat-4.1-doc/security-manager-howto.html

HTH/
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: "David Kerber" 
<[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 10:25 AM
Subject: ACL (access control list) tutorial or example


I posted this on comp.lang.java.security yesterday, but haven't 
gotten a single answer, so I'm hoping you people can help:


I'm trying to implement ACL's in my Tomcat-based webapp, and am 
having trouble applying what I read in the docs and in my googling 
to my real-life application.  Could somebody please point me to a 
good tutorial or some example code that shows how to set and check 
the permissions (read only vs read/write, administration vs general 
user, etc) that a given user will have to access a given object?


I've got the authentication part going with no trouble, but am 
having trouble with the access control side of things.


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






smime.p7s
Description: S/MIME Cryptographic Signature


Re: Error when increasing Tomcat's maximum memory pool

2007-05-08 Thread Ian H

Awesome, thank you again Chuck!

- Ian

-
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: ACL (access control list) tutorial or example

2007-05-08 Thread David Kerber
Authentication is done in the java code, checking against the back-end 
database, and I'm trying to build the ACL's for a site as I read the 
site and user information from the db.  The only thing tomcat is doing 
is serving up data; no authentication or access controls are set up in 
tomcat itself beyond whatever is there in the default installation.


Dave


Pid wrote:


David Kerber wrote:

Thanks for the response, but I don't think either of these are what I 
need.  My application involves users who need access to the inventory 
data for stores throughout the country, and those locations and users 
are all stored in a back-end database.  All this is managed by java 
classes; tomcat and about 5 jsp's are just the front end for 260 or 
so java classes that do the grunt work.  I need to be able to ensure 
that some users only have access to their own stores, while other 
users (regional managers, etc) can access all the stores under their 
jurisdiction, and system administrators can manage system settings, 
etc.  I have those permissions set up in the database, but can't 
quite work out how to apply them to ACL's and ACLEntries.  That's why 
I'm looking for a tutorial and/or sample code.
The people who initially wrote this app tried, but didn't seem to get 
the permissions handling set up quite right, because any user who 
authenticates successfully has unlimited access to their stores, but 
some of them should only have read access, and I need to get it 
straightened out.



How are you doing auth? (E.g. using Tomcat FORM).

You'll be wanting some programmatical security then no?  You'll have 
to write some checks for each occasion that a user needs to read or 
write some data I'd imagine.




If you've using the built in auth stuff, then you can use the 
Principal to identify which roles the user has access to.


if (request.isUserInRole( "system_admin" )) {
// show a page, do an action, write some data.
...
}
else {
// throw error
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
}


p




Thanks,
Dave


Martin Gainty wrote:


Good Morning Dave...

I would start by referencing this link
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html

either
setup security in %JAVA_HOME%/lib/security/java.policy and start 
java with security manager enabled e.g.
JAVA -Djava.security.policy=java.policy 
%CATALINA_HOME%\bin\bootstrap.jar


OR
read everything you can on configuring 
%CATALINA_HOME%/conf/catalina.policy
and configure the necessary options in catalina.policy *this link 
should get you started*

http://tomcat.apache.org/tomcat-4.1-doc/security-manager-howto.html

HTH/
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: "David Kerber" 
<[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 10:25 AM
Subject: ACL (access control list) tutorial or example


I posted this on comp.lang.java.security yesterday, but haven't 
gotten a single answer, so I'm hoping you people can help:


I'm trying to implement ACL's in my Tomcat-based webapp, and am 
having trouble applying what I read in the docs and in my googling 
to my real-life application.  Could somebody please point me to a 
good tutorial or some example code that shows how to set and check 
the permissions (read only vs read/write, administration vs general 
user, etc) that a given user will have to access a given object?


I've got the authentication part going with no trouble, but am 
having trouble with the access control side of things.


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



RE: Error when increasing Tomcat's maximum memory pool

2007-05-08 Thread Caldarale, Charles R
> From: Ian H [mailto:[EMAIL PROTECTED] 
> Subject: Error when increasing Tomcat's maximum memory pool
> 
> I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
> (recently upgraded from 2GB).  The JVM in place is 1.4.2_12.
> 
> That being said, with its current configuration, Tomcat will only
> start on my system with the maximum pool capped at 1344MB...anything
> higher than this and it fails.

This situation is discussed several times a year on this mailing list.
Try looking at this thread for an explanation:
http://marc.info/?t=10918964595&r=1&w=2

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ACL (access control list) tutorial or example

2007-05-08 Thread Pid

David Kerber wrote:
Thanks for the response, but I don't think either of these are what I 
need.  My application involves users who need access to the inventory 
data for stores throughout the country, and those locations and users 
are all stored in a back-end database.  All this is managed by java 
classes; tomcat and about 5 jsp's are just the front end for 260 or so 
java classes that do the grunt work.  I need to be able to ensure that 
some users only have access to their own stores, while other users 
(regional managers, etc) can access all the stores under their 
jurisdiction, and system administrators can manage system settings, 
etc.  I have those permissions set up in the database, but can't quite 
work out how to apply them to ACL's and ACLEntries.  That's why I'm 
looking for a tutorial and/or sample code.
The people who initially wrote this app tried, but didn't seem to get 
the permissions handling set up quite right, because any user who 
authenticates successfully has unlimited access to their stores, but 
some of them should only have read access, and I need to get it 
straightened out.


How are you doing auth? (E.g. using Tomcat FORM).

You'll be wanting some programmatical security then no?  You'll have to 
write some checks for each occasion that a user needs to read or write 
some data I'd imagine.




If you've using the built in auth stuff, then you can use the Principal 
to identify which roles the user has access to.


if (request.isUserInRole( "system_admin" )) {
// show a page, do an action, write some data.
...
}
else {
// throw error
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
}


p




Thanks,
Dave


Martin Gainty wrote:


Good Morning Dave...

I would start by referencing this link
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html

either
setup security in %JAVA_HOME%/lib/security/java.policy and start java 
with security manager enabled e.g.

JAVA -Djava.security.policy=java.policy %CATALINA_HOME%\bin\bootstrap.jar

OR
read everything you can on configuring 
%CATALINA_HOME%/conf/catalina.policy
and configure the necessary options in catalina.policy *this link 
should get you started*

http://tomcat.apache.org/tomcat-4.1-doc/security-manager-howto.html

HTH/
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: "David Kerber" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 10:25 AM
Subject: ACL (access control list) tutorial or example


I posted this on comp.lang.java.security yesterday, but haven't 
gotten a single answer, so I'm hoping you people can help:


I'm trying to implement ACL's in my Tomcat-based webapp, and am 
having trouble applying what I read in the docs and in my googling to 
my real-life application.  Could somebody please point me to a good 
tutorial or some example code that shows how to set and check the 
permissions (read only vs read/write, administration vs general user, 
etc) that a given user will have to access a given object?


I've got the authentication part going with no trouble, but am having 
trouble with the access control side of things.


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






smime.p7s
Description: S/MIME Cryptographic Signature


Error when increasing Tomcat's maximum memory pool

2007-05-08 Thread Ian H

I have Tomcat 5.5 running on a Windows 2000 machine having 4GB of RAM
(recently upgraded from 2GB).  The JVM in place is 1.4.2_12.

Using the "Configure tomcat" widget, I attempted to increase the
maximum memory pool from 1280MB that had been working to 2560MB.  At
this point, Tomcat fails to start, with these errors showing up in the
jakarta log:

 JNI Error occurred during initialization of VM
 JNI Could not reserve enough space for object heap

Googling around, I've only found that there seems to be a limit which
varies based on the flavour of the components in an installation,
typically ranging from around 1700MB to 2GB...I have yet to find
anything comprehensive detailing these limitations, however.

That being said, with its current configuration, Tomcat will only
start on my system with the maximum pool capped at 1344MB...anything
higher than this and it fails.

Does anyone have any suggestions regarding how to diagnose what's
limiting this, or suggestions for increasing it?

Thank you very much,

- Ian

-
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: Newbie Question: How to Disable Caching?

2007-05-08 Thread Pid

Robinson, Eric wrote:

The OS is RHEL4. Tomcat is 5.0.28.

The 'particular function' is a little hard to explain. It's just an area
of the program where you configure certain parameters that control
workflow in your medical practice, such as how long a default patient
visit lasts. This area has a different look and feel than the rest of
the program, and has all the earmarks of having been written by a
programmer that no longer works for the vendor. :-)

The bottom line is that when I access this section, sometimes I get
errors with scripts on the page. I had a theory that the problem was
with cached data, so I changed the way the load balancer distributes
requests. Now the LB always sends subsequent requests from a particular
source IP to whichever tomcat server was selected for the first request,
and the errors have gone away. I believe this indicates that my theory
was correct, so now I'm looking for a way to disable caching of anything
in the tomcat/work directory.

Isn't there a simple, global way to tell tomcat not to cache?


Cache what? AFAIK, Tomcat doesn't cache anything, bar generated JSP 
servlet classes (and they're checked periodically unless you've modified 
"conf/web.xml").


You've not stated what's being cached, or why you think something is 
being cached, which is why I asked for more info about the function 
that's causing it.



If the function in question is deliberately writing to a temporary file 
in the work folder, then tweaking Tomcat won't make much differene, it's 
the application that will need altering if you want to resolve this.


You could post some error data from the logs, which would also help 
diagnose the problem, and help us to provide a more precise solution.



pid




--
Eric Robinson



-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 6:00 AM

To: Tomcat Users List
Subject: Re: Newbie Question: How to Disable Caching?

Robinson, Eric wrote:
We have a medical program that runs on two tomcat servers behind an 
LVS load balancer. Everything works fine except for one particular 
function that apparently relies on data in the tomcat5/work directory.


If the load balancer directs a request to a tomcat server that has 
different cache data, the function fails.


Is there a way to disable caching in tomcat so nothing gets stored in 
the work directory? Or is that just a stupid question?


(OS, tomcat version, etc, please)

It depends on what the data is and how it got there; can you enlighten
us as to what is the 'particular function'?


If the application (rather than the server) is writing data to the work 
dir, then that's the component that needs fixing (by storing the data in


a database perhaps).


p




--
Eric Robinson




Disclaimer - May 8, 2007 
This email and any files transmitted with it are confidential and

intended solely for Tomcat Users List. If you are not the named
addressee you should not disseminate, distribute, copy or alter this
email. Any views or opinions presented in this email are solely those of
the author and might not represent those of Physician Select Management
(PSM) or Physician's Managed Care (PMC). Warning: Although the message
sender has taken reasonable precautions to ensure no viruses are present
in this email, neither PSM nor PMC can accept responsibility for any
loss or damage arising from the use of this email or attachments.

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






smime.p7s
Description: S/MIME Cryptographic Signature


RE: Need help getting application to work on Tomcat 5.x

2007-05-08 Thread Allison, Clemon
Thanks. I'll give it a shot.

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 12:49 PM
To: Tomcat Users List
Subject: RE: Need help getting application to work on Tomcat 5.x


> From: Allison, Clemon [mailto:[EMAIL PROTECTED] 
> Subject: Need help getting application to work on Tomcat 5.x
> 
> SEVERE: Parse error in application web.xml
> java.lang.IllegalArgumentException: Invalid  
> ConsolidatedInvoiceController in servlet mapping

The above seems pretty self-explanatory.  Read the servlet spec and fix
your web.xml to comply with it.  You can get the servlet spec here, if
you don't already have a copy:
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

 - 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 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: Need help getting application to work on Tomcat 5.x

2007-05-08 Thread Caldarale, Charles R
> From: Allison, Clemon [mailto:[EMAIL PROTECTED] 
> Subject: Need help getting application to work on Tomcat 5.x
> 
> SEVERE: Parse error in application web.xml
> java.lang.IllegalArgumentException: Invalid  
> ConsolidatedInvoiceController in servlet mapping

The above seems pretty self-explanatory.  Read the servlet spec and fix
your web.xml to comply with it.  You can get the servlet spec here, if
you don't already have a copy:
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need help getting application to work on Tomcat 5.x

2007-05-08 Thread Allison, Clemon
Can someone assist me with getting a war file to start on Tomcat 5.x? I've 
followed the how-to docs for deploying a war file, but still get an error when 
attemptin gto start it. A snippet of the error file:

May 8, 2007 12:19:58 PM org.apache.catalina.startup.ContextConfig 
applicationConfig
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: Invalid  
ConsolidatedInvoiceController in servlet mapping
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown 
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown 
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at 
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:263)
at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:624)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
at 
org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.java:830)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:991)
at 
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1322)
at 
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:530)
at 
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at 
org.apache.tomc

error-page and TC 5.5.23

2007-05-08 Thread gb1071nx

Hello,

I'm starting the process of migrating some of our server from 5.0.29 to
5.5.23, and I've found that the 'nice' useful stacktraces with
linenumbers are back, and working beautifully in 5.5.23.   

But I do find the following issues as well: 

I have the following test page: 



<%
 if (true) {
  throw new java.sql.SQLException("TEST");
 }
%>




And the following web.xml:


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">



java.sql.SQLException 
/error/database.jsp 


500 
/error/500.jsp 






And when I call the page throwing the SQLException, I get the error page
for the error-code 500.   Tomcat5.0 does not behave like that, 5.5 does.
Which is the correct behaviour? (or perhaps:  is there a way to
configure 5.5 so that it acts like 5.0?)  I recall this bug report:
http://issues.apache.org/bugzilla/show_bug.cgi?id=37062#c4 .  Has the
bug reported in comment#4 been fixed?  Is this the bug I'm experiencing
in my test page?




Also, I can confirm the following bug, I also experience it: 
http://issues.apache.org/bugzilla/show_bug.cgi?id=42314

-
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: ACL (access control list) tutorial or example

2007-05-08 Thread David Kerber
Thanks for the response, but I don't think either of these are what I 
need.  My application involves users who need access to the inventory 
data for stores throughout the country, and those locations and users 
are all stored in a back-end database.  All this is managed by java 
classes; tomcat and about 5 jsp's are just the front end for 260 or so 
java classes that do the grunt work.  I need to be able to ensure that 
some users only have access to their own stores, while other users 
(regional managers, etc) can access all the stores under their 
jurisdiction, and system administrators can manage system settings, 
etc.  I have those permissions set up in the database, but can't quite 
work out how to apply them to ACL's and ACLEntries.  That's why I'm 
looking for a tutorial and/or sample code. 

The people who initially wrote this app tried, but didn't seem to get 
the permissions handling set up quite right, because any user who 
authenticates successfully has unlimited access to their stores, but 
some of them should only have read access, and I need to get it 
straightened out.


Thanks,
Dave


Martin Gainty wrote:


Good Morning Dave...

I would start by referencing this link
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html

either
setup security in %JAVA_HOME%/lib/security/java.policy and start java 
with security manager enabled e.g.

JAVA -Djava.security.policy=java.policy %CATALINA_HOME%\bin\bootstrap.jar

OR
read everything you can on configuring 
%CATALINA_HOME%/conf/catalina.policy
and configure the necessary options in catalina.policy *this link 
should get you started*

http://tomcat.apache.org/tomcat-4.1-doc/security-manager-howto.html

HTH/
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: "David Kerber" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 10:25 AM
Subject: ACL (access control list) tutorial or example


I posted this on comp.lang.java.security yesterday, but haven't 
gotten a single answer, so I'm hoping you people can help:


I'm trying to implement ACL's in my Tomcat-based webapp, and am 
having trouble applying what I read in the docs and in my googling to 
my real-life application.  Could somebody please point me to a good 
tutorial or some example code that shows how to set and check the 
permissions (read only vs read/write, administration vs general user, 
etc) that a given user will have to access a given object?


I've got the authentication part going with no trouble, but am having 
trouble with the access control side of things.


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



Re: request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

On 5/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Richard,

Richard Sayre wrote:
> I started to look in the _jspService and I noticed the the variable
> which I assign the request.getParameter("id") to is not in that
> method.

Note that JSP authors these days almost never actually call
request.getParameter()... they use a tag library which helps cut down on
the confusion such as this.

> The variable is called 'theID'.  One thing I noticed about it is it
> is declared like this
>
> !String theID;

That's invalid Java syntax. Can you give us a few more characters around
that declaration? For instance:

<%! String theID; %>

Creates a member of the class, which will be shared across all
invocations of the JSP. If that's the case, then you've found your problem.

> I have never seen this before.  Does this make the variable static?

Not static. Just class-level instead of being declared as a local within
the body of the service method (which is what you really want).

> I 3 years I have never encountered it [ <%! ... %> syntax].

That's because it's almost never done. It only really makes sense when
you want to declare a method for use within the class. Declaring class
members this way usually leads to tears.

> Hopefully removing it will solve my problem.

You just want to remove the !, actually. The declaration is probably
required.

- -chris




The ! operator was the cause of my problem.  I would like to thank
everyone for their help and insight.

-
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: R: Bind address

2007-05-08 Thread Markus Schönhaber
Cesare Vairetti wrote:
> Yes you have right, IIS, even if I impose to use only that particular IP, in
> net stat I see 0.0.0.0:80 further the 172.21.10.1:80.
> And 0.0.0.0:80 is linked to a PID process that is System process.
> Then I switch off IIS and 0.0.0.0:80 disappear.
> I have no idea now how to solve the problem.

The first hit I get when I search for "iis bind address" on Microsoft's
support site is this:
http://support.microsoft.com/kb/259349/en-us

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: "Error allocating a servlet instance" after editing web.xml.

2007-05-08 Thread Caldarale, Charles R
> From: Riyaz Shaikh [mailto:[EMAIL PROTECTED]
> Subject: "Error allocating a servlet instance" after editing web.xml.
> 
> Problem: If I make any change to my application's web.xml (even as
> small as a single space), I can't access any of Tomcat's
> pages/servlets.

Is your editor generating UTF-16 and adding a pair of prefix bytes to
indicate LE or BE?  If so, the .xml may not be parseable.  Take a look
at it with a hex editor.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: request.getParameter is returning the wrong value

2007-05-08 Thread DJohnson
>  queryString : ?id=2345
> id : 2226
One thought that comes to mind is if you are getting the "id" parameter 
from the request, but assigning it to a member, or even static variable, 
as opposed to a method variable on the stack, then you lose thread safety, 
and this could happen.

I apologize for top-response etiquette violation:  stuck with Lotus Notes 
client.



Please respond to "Tomcat Users List" 

To: "Tomcat Users List" 
cc:  
Subject:RE: request.getParameter is returning the wrong value


I've never seen that either and I use the same environment you do.
Seems as if users' sessions are somehow crossing/getting overlapped, but 
not sure how.

Are you using some lookup for an id? Like SSO or something?

-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 8:33 AM
To: users@tomcat.apache.org
Subject: request.getParameter is returning the wrong value


My web application generates a list of links for a user to click on.

The URL looks like this:  showCa.jsp?id=2345

The showCa.jsp page uses the id to populate a form on the page.

The problem I am have is when a user clicks the link showCa.jsp?id=2345

The request.getParameter("id") is returning the wrong id!

I have never seen behavior like this before. This page has been
working in production for a long time. I reproduced the error, and it
only seems to be happening when there are multiple users logged in.
The wrong id that appears belongs to another user. On the showCa.jsp
page I printed out the query string and the value of id and got this:

queryString : ?id=2345
id : 2226



Has anyone seen anything like this before? I have been coding JSP for
3 years now and I have never seen behavior like this. This is
occurring on Tomcat 4.1/ JDK 1.4

I greatly appreciate any suggestions that you may have.

Thank you

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





R: Bind address

2007-05-08 Thread Cesare Vairetti
Yes you have right, IIS, even if I impose to use only that particular IP, in
net stat I see 0.0.0.0:80 further the 172.21.10.1:80.
And 0.0.0.0:80 is linked to a PID process that is System process.
Then I switch off IIS and 0.0.0.0:80 disappear.
I have no idea now how to solve the problem.
Thanks a lot

cesare


-Messaggio originale-
Da: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Inviato: martedì 8 maggio 2007 17.48
A: Tomcat Users List
Oggetto: Re: Bind address

Cesare Vairetti wrote:

> I have a server with Windows 2003 Server, with one Ethernet. I have set
two
> ips to the same eth card. 
> 
> The first 172.21.10.1 is linked to IIS server with port 80, the second is
> 172.21.10.2 and I would like to link to Apache Tomcat still using port 80.
> 
> Now the problem is that Tomcat tells me this: 
> 
>  java.net.BindException: Address already in use: JVM_Bind:80

Use something like
netstat -ano
or tcpview to see whether there's really nothing bound to 172.21.10.2:80
or 0.0.0.0:80.
I have a faint memory that it was harder than it seemed to make IIS not
bind to all available IPs (could be wrong, though).

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]

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.5/793 - Release Date: 07/05/2007
14.55
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.5/793 - Release Date: 07/05/2007
14.55
 


-
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: request.getParameter is returning the wrong value

2007-05-08 Thread Propes, Barry L
I've never seen that either and I use the same environment you do.
Seems as if users' sessions are somehow crossing/getting overlapped, but not 
sure how.

Are you using some lookup for an id? Like SSO or something?

-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 8:33 AM
To: users@tomcat.apache.org
Subject: request.getParameter is returning the wrong value


 My web application generates a list of links for a user to click on.

The URL looks like this:  showCa.jsp?id=2345

The showCa.jsp page uses the id to populate a form on the page.

The problem I am have is when a user clicks the link showCa.jsp?id=2345

The request.getParameter("id") is returning the wrong id!

I have never seen behavior like this before. This page has been
working in production for a long time. I reproduced the error, and it
only seems to be happening when there are multiple users logged in.
The wrong id that appears belongs to another user. On the showCa.jsp
page I printed out the query string and the value of id and got this:

queryString : ?id=2345
id : 2226



Has anyone seen anything like this before? I have been coding JSP for
3 years now and I have never seen behavior like this. This is
occurring on Tomcat 4.1/ JDK 1.4

I greatly appreciate any suggestions that you may have.

Thank you

-
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: request.getParameter is returning the wrong value

2007-05-08 Thread Jason Polites

too late.. looks like Mr Schultz has the correct answer.

On 5/9/07, Jason Polites <[EMAIL PROTECTED]> wrote:


That's really strange.  If that's in the generated .java file then I'm
amazed it actually compiles.  It's syntactically incorrect.  Are you sure
it's not just the editor you are using to view the file interpreting an
unknown character?  (I doubt it).

As a first step I'd delete the compiled JSP and have jasper recompile it.

Are you using scriptlets (<%%>) in your JSP?  or just tags like JSTL?
Maybe you are declaring some strange variable yourself (again.. unlikely).

The only other thing I can suggest is to rename the variable in both the
calling page and the JSP.  There is no reason why this should be any
different, but it's worth a try.


 On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
>
> I know you don't want to hear this but I'm not sure about what I can
> release due to company restrictions.  I wouldn't want to get fired for
> posting out source.  I will ask the right people if I can post a few
> pages of the source but it may take a while for them to get back to
> me.
>
> I haven't found any docs but I think the ! operator makes the variable
> a member of the class, not the _jspService method.
>
> When I search for the declaration of 'theId' it was declared as a
> member of the showCa_jsp class with no modifier (default).  I am
> assuming that tomcat will create once instance of this class, and use
> it when ever that page is requested.  The _jspService variables will
> be different for each instance since they are local to that method but
> the member variables will be shared.
>
> I can't find the doc on the operator for JSP.  I think this is the
> problem but I want to be sure that it is before I remove it from the
> code.
>
> On 5/8/07, David Delbecq <[EMAIL PROTECTED]> wrote:
> > Give us the .jsp and the jasper generated .java file, it will be
> faster
> > to solve :)
> >
> > En l'instant précis du 08/05/07 17:22, Richard Sayre s'exprimait en
> ces
> > termes:
> > > Also,  If you have any information about declaring a variable with !
> > > I would like to know.  I am having trouble finding any on google and
>
> > > my JSP book.
> > >
> > > On 5/8/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
> > >> Yes the right values are passed.  Th eonly one of those variable
> that
> > >> really efects the data on the page is vId, which is hard coded into
> > >> the 
> > >>
> > >> I started to look in the _jspService and I noticed the the variable
>
> > >> which I assign the request.getParameter("id") to is not in that
> > >> method.
> > >>
> > >> The variable is called 'theID'.  One thing I noticed about it is it
> is
> > >> declared like this
> > >>
> > >> !String theID;
> > >>
> > >> I have never seen this before.  Does this make the variable static?
> > >> If so then it is obvious why this is happening
> > >>
> > >> I am going to look up this ! operator to see what it does. I 3
> years I
> > >> have never encountered it.  Hopefully removing it will solve my
> > >> problem.  I will keep you updated.
> > >>
> > >>
> > >> On 5/8/07, Jason Polites <[EMAIL PROTECTED]> wrote:
> > >> > First, I'd just make sure you are passing the right value from
> the
> > >> form.
> > >> > alert() the (editFlag=" + document.theForm.editFlag.value  +
> > >> "&activeTab=" +
> > >> > document.theForm.activeTab.value + "&id=" + vId;) string before
> you
> > >> do the
> > >> > location.href to be sure.
> > >> >
> > >> > Given that you are saying it works until multiple users access...
> > >> it sounds
> > >> > like there is some variables in the wrong scope.  Recall that a
> JSP is
> > >> > compiled to a normal servlet by the container, and servlets are
> shared
> > >> > resources.  so.. if you are putting the value into a "shared"
> area
> > >> within
> > >> > the jsp/servlet, it would make sense that you get strange results
> with
> > >> > multiple users.
> > >> >
> > >> > All local (page scope) variables *should* be defined within the
> > >> "service"
> > >> > method of the compiled servlet, and hence shouldn't cause a
> > >> problem.. so I
> > >> > can only think you are placing the variable in some sort of
> static
> > >> > location?
> > >> >
> > >> > If you say that the query string shows the correct location..
> then
> > >> things
> > >> > are really strange.  Does the address in the browser show the
> correct
> > >> > location/url?
> > >> >
> > >> >
> > >> >
> > >> > On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
> > >> > >
> > >> > > Sorry about that.  When I copied and pasted I missed the
> function
> > >> name
> > >> > > and I typed it in manually.  I double checked and the function
> > >> name is
> > >> > > spelled correctly.  This code works normally until multiple
> users
> > >> > > login.
> > >> > >
> > >> > > I pass these values the JSP page when the following JavaScript
> > >> executes:
> > >> > >
> > >> > > top.location.href="showCa.jsp?editFlag=" +
> > >> > > document.theForm.editFlag.value 

Re: request.getParameter is returning the wrong value

2007-05-08 Thread Jason Polites

That's really strange.  If that's in the generated .java file then I'm
amazed it actually compiles.  It's syntactically incorrect.  Are you sure
it's not just the editor you are using to view the file interpreting an
unknown character?  (I doubt it).

As a first step I'd delete the compiled JSP and have jasper recompile it.

Are you using scriptlets (<%%>) in your JSP?  or just tags like JSTL?  Maybe
you are declaring some strange variable yourself (again.. unlikely).

The only other thing I can suggest is to rename the variable in both the
calling page and the JSP.  There is no reason why this should be any
different, but it's worth a try.


On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:


I know you don't want to hear this but I'm not sure about what I can
release due to company restrictions.  I wouldn't want to get fired for
posting out source.  I will ask the right people if I can post a few
pages of the source but it may take a while for them to get back to
me.

I haven't found any docs but I think the ! operator makes the variable
a member of the class, not the _jspService method.

When I search for the declaration of 'theId' it was declared as a
member of the showCa_jsp class with no modifier (default).  I am
assuming that tomcat will create once instance of this class, and use
it when ever that page is requested.  The _jspService variables will
be different for each instance since they are local to that method but
the member variables will be shared.

I can't find the doc on the operator for JSP.  I think this is the
problem but I want to be sure that it is before I remove it from the
code.

On 5/8/07, David Delbecq <[EMAIL PROTECTED]> wrote:
> Give us the .jsp and the jasper generated .java file, it will be faster
> to solve :)
>
> En l'instant précis du 08/05/07 17:22, Richard Sayre s'exprimait en ces
> termes:
> > Also,  If you have any information about declaring a variable with !
> > I would like to know.  I am having trouble finding any on google and
> > my JSP book.
> >
> > On 5/8/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
> >> Yes the right values are passed.  Th eonly one of those variable that
> >> really efects the data on the page is vId, which is hard coded into
> >> the 
> >>
> >> I started to look in the _jspService and I noticed the the variable
> >> which I assign the request.getParameter("id") to is not in that
> >> method.
> >>
> >> The variable is called 'theID'.  One thing I noticed about it is it
is
> >> declared like this
> >>
> >> !String theID;
> >>
> >> I have never seen this before.  Does this make the variable static?
> >> If so then it is obvious why this is happening
> >>
> >> I am going to look up this ! operator to see what it does. I 3 years
I
> >> have never encountered it.  Hopefully removing it will solve my
> >> problem.  I will keep you updated.
> >>
> >>
> >> On 5/8/07, Jason Polites <[EMAIL PROTECTED]> wrote:
> >> > First, I'd just make sure you are passing the right value from the
> >> form.
> >> > alert() the (editFlag=" + document.theForm.editFlag.value  +
> >> "&activeTab=" +
> >> > document.theForm.activeTab.value + "&id=" + vId;) string before you
> >> do the
> >> > location.href to be sure.
> >> >
> >> > Given that you are saying it works until multiple users access...
> >> it sounds
> >> > like there is some variables in the wrong scope.  Recall that a JSP
is
> >> > compiled to a normal servlet by the container, and servlets are
shared
> >> > resources.  so.. if you are putting the value into a "shared" area
> >> within
> >> > the jsp/servlet, it would make sense that you get strange results
with
> >> > multiple users.
> >> >
> >> > All local (page scope) variables *should* be defined within the
> >> "service"
> >> > method of the compiled servlet, and hence shouldn't cause a
> >> problem.. so I
> >> > can only think you are placing the variable in some sort of static
> >> > location?
> >> >
> >> > If you say that the query string shows the correct location.. then
> >> things
> >> > are really strange.  Does the address in the browser show the
correct
> >> > location/url?
> >> >
> >> >
> >> >
> >> > On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
> >> > >
> >> > > Sorry about that.  When I copied and pasted I missed the function
> >> name
> >> > > and I typed it in manually.  I double checked and the function
> >> name is
> >> > > spelled correctly.  This code works normally until multiple users
> >> > > login.
> >> > >
> >> > > I pass these values the JSP page when the following JavaScript
> >> executes:
> >> > >
> >> > > top.location.href="showCa.jsp?editFlag=" +
> >> > > document.theForm.editFlag.value  + "&activeTab=" +
> >> > > document.theForm.activeTab.value + "&id=" + vId;
> >> > >
> >> > >
> >> > > On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
> >> > > > you are calling js function named 'showCa'
> >> > > > but your javascript function name is 'showCap'
> >> > > > When/Where do you actually pass these values to servlet?
> >>

Re: Bind address

2007-05-08 Thread Markus Schönhaber
Cesare Vairetti wrote:

> I have a server with Windows 2003 Server, with one Ethernet. I have set two
> ips to the same eth card. 
> 
> The first 172.21.10.1 is linked to IIS server with port 80, the second is
> 172.21.10.2 and I would like to link to Apache Tomcat still using port 80.
> 
> Now the problem is that Tomcat tells me this: 
> 
>  java.net.BindException: Address already in use: JVM_Bind:80

Use something like
netstat -ano
or tcpview to see whether there's really nothing bound to 172.21.10.2:80
or 0.0.0.0:80.
I have a faint memory that it was harder than it seemed to make IIS not
bind to all available IPs (could be wrong, though).

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: request.getParameter is returning the wrong value

2007-05-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Richard,

Richard Sayre wrote:
> I started to look in the _jspService and I noticed the the variable 
> which I assign the request.getParameter("id") to is not in that 
> method.

Note that JSP authors these days almost never actually call
request.getParameter()... they use a tag library which helps cut down on
the confusion such as this.

> The variable is called 'theID'.  One thing I noticed about it is it
> is declared like this
> 
> !String theID;

That's invalid Java syntax. Can you give us a few more characters around
that declaration? For instance:

<%! String theID; %>

Creates a member of the class, which will be shared across all
invocations of the JSP. If that's the case, then you've found your problem.

> I have never seen this before.  Does this make the variable static?

Not static. Just class-level instead of being declared as a local within
the body of the service method (which is what you really want).

> I 3 years I have never encountered it [ <%! ... %> syntax].

That's because it's almost never done. It only really makes sense when
you want to declare a method for use within the class. Declaring class
members this way usually leads to tears.

> Hopefully removing it will solve my problem.

You just want to remove the !, actually. The declaration is probably
required.

- -chris

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

iD8DBQFGQJtf9CaO5/Lv0PARAoDjAJwMSfhA/CKiQ7YU/fJQsnRlGUKxygCgscwH
l5ihkVI7oPQdS5m/hyPyJAo=
=rcqu
-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: request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

I know you don't want to hear this but I'm not sure about what I can
release due to company restrictions.  I wouldn't want to get fired for
posting out source.  I will ask the right people if I can post a few
pages of the source but it may take a while for them to get back to
me.

I haven't found any docs but I think the ! operator makes the variable
a member of the class, not the _jspService method.

When I search for the declaration of 'theId' it was declared as a
member of the showCa_jsp class with no modifier (default).  I am
assuming that tomcat will create once instance of this class, and use
it when ever that page is requested.  The _jspService variables will
be different for each instance since they are local to that method but
the member variables will be shared.

I can't find the doc on the operator for JSP.  I think this is the
problem but I want to be sure that it is before I remove it from the
code.

On 5/8/07, David Delbecq <[EMAIL PROTECTED]> wrote:

Give us the .jsp and the jasper generated .java file, it will be faster
to solve :)

En l'instant précis du 08/05/07 17:22, Richard Sayre s'exprimait en ces
termes:
> Also,  If you have any information about declaring a variable with !
> I would like to know.  I am having trouble finding any on google and
> my JSP book.
>
> On 5/8/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
>> Yes the right values are passed.  Th eonly one of those variable that
>> really efects the data on the page is vId, which is hard coded into
>> the 
>>
>> I started to look in the _jspService and I noticed the the variable
>> which I assign the request.getParameter("id") to is not in that
>> method.
>>
>> The variable is called 'theID'.  One thing I noticed about it is it is
>> declared like this
>>
>> !String theID;
>>
>> I have never seen this before.  Does this make the variable static?
>> If so then it is obvious why this is happening
>>
>> I am going to look up this ! operator to see what it does. I 3 years I
>> have never encountered it.  Hopefully removing it will solve my
>> problem.  I will keep you updated.
>>
>>
>> On 5/8/07, Jason Polites <[EMAIL PROTECTED]> wrote:
>> > First, I'd just make sure you are passing the right value from the
>> form.
>> > alert() the (editFlag=" + document.theForm.editFlag.value  +
>> "&activeTab=" +
>> > document.theForm.activeTab.value + "&id=" + vId;) string before you
>> do the
>> > location.href to be sure.
>> >
>> > Given that you are saying it works until multiple users access...
>> it sounds
>> > like there is some variables in the wrong scope.  Recall that a JSP is
>> > compiled to a normal servlet by the container, and servlets are shared
>> > resources.  so.. if you are putting the value into a "shared" area
>> within
>> > the jsp/servlet, it would make sense that you get strange results with
>> > multiple users.
>> >
>> > All local (page scope) variables *should* be defined within the
>> "service"
>> > method of the compiled servlet, and hence shouldn't cause a
>> problem.. so I
>> > can only think you are placing the variable in some sort of static
>> > location?
>> >
>> > If you say that the query string shows the correct location.. then
>> things
>> > are really strange.  Does the address in the browser show the correct
>> > location/url?
>> >
>> >
>> >
>> > On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Sorry about that.  When I copied and pasted I missed the function
>> name
>> > > and I typed it in manually.  I double checked and the function
>> name is
>> > > spelled correctly.  This code works normally until multiple users
>> > > login.
>> > >
>> > > I pass these values the JSP page when the following JavaScript
>> executes:
>> > >
>> > > top.location.href="showCa.jsp?editFlag=" +
>> > > document.theForm.editFlag.value  + "&activeTab=" +
>> > > document.theForm.activeTab.value + "&id=" + vId;
>> > >
>> > >
>> > > On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
>> > > > you are calling js function named 'showCa'
>> > > > but your javascript function name is 'showCap'
>> > > > When/Where do you actually pass these values to servlet?
>> > > >
>> > > > M--
>> > > > 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: "Richard Sayre" <[EMAIL PROTECTED]>
>> > > > To: "Tomcat Users List" 
>> > > > Sent: Tuesday, May 08, 2007 9:55 AM
>> > > > Subject: Re: request.getParameter is returning the wrong value
>> > > >
>> > > >
>> > > > > On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]>
>> wrote:
>> > > > >> > From: Richard Sayre [mailto:[EMAIL PROTECTED]
>> > > > >> > Subject: request.getParamet

Bind address

2007-05-08 Thread Cesare Vairetti
Hi everybody,

I have a server with Windows 2003 Server, with one Ethernet. I have set two
ips to the same eth card. 

The first 172.21.10.1 is linked to IIS server with port 80, the second is
172.21.10.2 and I would like to link to Apache Tomcat still using port 80.

Now the problem is that Tomcat tells me this: 

 java.net.BindException: Address already in use: JVM_Bind:80

 

even if it’s linked to a different IP.

This is a part of server.xml:



 

Any good advice will very appreciated thanks a lot!

 

cesare


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.5/793 - Release Date: 07/05/2007
14.55



No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.5/793 - Release Date: 07/05/2007
14.55
 


Re: SSL not working on Tomcat 5.5

2007-05-08 Thread Markus Schönhaber
Marcus Johansson wrote:

> I am running Tomcat 5.5 on a Windows 2003 server box, using Sun JRE 1.5.0_11.
> Since I want to have SSL support on my server, I followed the instructions
> on
> 
> http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html
> 
> first creating a self-signed certificate and then uncommenting the SSL
> Connector on port 8443. After a restart of the tomcat service i expected to
> have the SSL up and running but alas. When accessing http://localhost:8443
> 
> it works fine, hence the connector seems active on the port. But when trying
> to access https://localhost:8443 , my IE7 browser stands hanging for a
> pretty long while until it declares that the page cannot be opened. No error
> messages whatsoever to be found in the tomcat logs.

Check whether you're using APR.
If so, the above document won't help you much - look at
http://tomcat.apache.org/tomcat-5.5-doc/apr.html#HTTPS
instead and check the list archives for more info, since this comes up
quite frequently.

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: "Error allocating a servlet instance" after editing web.xml.

2007-05-08 Thread Propes, Barry L
might be breaking at your xml file with the space, although seems like you get 
a SaxParse error if that happens -- usually.
I guess it depends on which version of TC you have.

-Original Message-
From: Riyaz Shaikh [mailto:[EMAIL PROTECTED]
Sent: Monday, May 07, 2007 6:08 PM
To: users@tomcat.apache.org
Subject: "Error allocating a servlet instance" after editing web.xml.


Problem: If I make any change to my application's web.xml (even as
small as a single space), I can't access any of Tomcat's
pages/servlets.

Info to narrow things down (hopefully):
- I think Tomcat reloads things whenever a change is made to web.xml.
But I haven't been able to find some good information on this yet.

- The application is located under CATALINA_HOME\webapps. I tried
creating a context file under conf/catalina/localhost and set
reloadable="false", but it didn't help.

- Since this problem isn't seen if I edit the web.xml of any of
Tomcat's example applications, it might have something to do with how
my application initializes. But nothing shows up in the logs anywhere,
other than the stack trace I get when I try to access any page. Would
anyone know which tomcat elements I should enable the debugging info
for, to get more info about the re-initialization.

- This is the stack trace I get if I try to access anything, after the
web.xml editing:

exception

javax.servlet.ServletException: Error allocating a servlet instance

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
java.lang.Thread.run(Thread.java:595)

root cause

java.lang.NullPointerException

org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:58)

org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:51)

org.eclipse.osgi.framework.util.SecureAction.getProperty(SecureAction.java:49)

org.eclipse.osgi.framework.internal.protocol.StreamHandlerFactory.createURLStreamHandler(StreamHandlerFactory.java:85)
java.net.URL.getURLStreamHandler(URL.java:1104)
java.net.URL.(URL.java:393)
java.net.URL.(URL.java:283)
java.net.URL.(URL.java:306)
java.io.File.toURL(File.java:594)

org.apache.catalina.loader.WebappClassLoader.getURL(WebappClassLoader.java:2292)

org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1966)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
java.lang.Thread.run(Thread.java:595)

-
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: request.getParameter is returning the wrong value

2007-05-08 Thread David Delbecq
Give us the .jsp and the jasper generated .java file, it will be faster
to solve :)

En l'instant précis du 08/05/07 17:22, Richard Sayre s'exprimait en ces
termes:
> Also,  If you have any information about declaring a variable with !
> I would like to know.  I am having trouble finding any on google and
> my JSP book.
>
> On 5/8/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
>> Yes the right values are passed.  Th eonly one of those variable that
>> really efects the data on the page is vId, which is hard coded into
>> the 
>>
>> I started to look in the _jspService and I noticed the the variable
>> which I assign the request.getParameter("id") to is not in that
>> method.
>>
>> The variable is called 'theID'.  One thing I noticed about it is it is
>> declared like this
>>
>> !String theID;
>>
>> I have never seen this before.  Does this make the variable static?
>> If so then it is obvious why this is happening
>>
>> I am going to look up this ! operator to see what it does. I 3 years I
>> have never encountered it.  Hopefully removing it will solve my
>> problem.  I will keep you updated.
>>
>>
>> On 5/8/07, Jason Polites <[EMAIL PROTECTED]> wrote:
>> > First, I'd just make sure you are passing the right value from the
>> form.
>> > alert() the (editFlag=" + document.theForm.editFlag.value  +
>> "&activeTab=" +
>> > document.theForm.activeTab.value + "&id=" + vId;) string before you
>> do the
>> > location.href to be sure.
>> >
>> > Given that you are saying it works until multiple users access...
>> it sounds
>> > like there is some variables in the wrong scope.  Recall that a JSP is
>> > compiled to a normal servlet by the container, and servlets are shared
>> > resources.  so.. if you are putting the value into a "shared" area
>> within
>> > the jsp/servlet, it would make sense that you get strange results with
>> > multiple users.
>> >
>> > All local (page scope) variables *should* be defined within the
>> "service"
>> > method of the compiled servlet, and hence shouldn't cause a
>> problem.. so I
>> > can only think you are placing the variable in some sort of static
>> > location?
>> >
>> > If you say that the query string shows the correct location.. then
>> things
>> > are really strange.  Does the address in the browser show the correct
>> > location/url?
>> >
>> >
>> >
>> > On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Sorry about that.  When I copied and pasted I missed the function
>> name
>> > > and I typed it in manually.  I double checked and the function
>> name is
>> > > spelled correctly.  This code works normally until multiple users
>> > > login.
>> > >
>> > > I pass these values the JSP page when the following JavaScript
>> executes:
>> > >
>> > > top.location.href="showCa.jsp?editFlag=" +
>> > > document.theForm.editFlag.value  + "&activeTab=" +
>> > > document.theForm.activeTab.value + "&id=" + vId;
>> > >
>> > >
>> > > On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
>> > > > you are calling js function named 'showCa'
>> > > > but your javascript function name is 'showCap'
>> > > > When/Where do you actually pass these values to servlet?
>> > > >
>> > > > M--
>> > > > 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: "Richard Sayre" <[EMAIL PROTECTED]>
>> > > > To: "Tomcat Users List" 
>> > > > Sent: Tuesday, May 08, 2007 9:55 AM
>> > > > Subject: Re: request.getParameter is returning the wrong value
>> > > >
>> > > >
>> > > > > On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]>
>> wrote:
>> > > > >> > From: Richard Sayre [mailto:[EMAIL PROTECTED]
>> > > > >> > Subject: request.getParameter is returning the wrong value
>> > > > >> >
>> > > > >> > The problem I am have is when a user clicks the link
>> > > > >> > showCa.jsp?id=2345
>> > > > >> >
>> > > > >> > The request.getParameter("id") is returning the wrong id!
>> > > > >>
>> > > > >> This is usually caused by application code storing some
>> value in the
>> > > > >> wrong scope, or erroneous use of static variables.  Storing a
>> > > > >> request-specific item in the session or servlet objects is
>> one such
>> > > > >> example.
>> > > > >>
>> > > > >>  - Chuck
>> > > > >
>> > > > > I store a 'UserSession' object in Tomcats session but it does
>> not
>> > > > > contain a variable called "id".  This is the only
>> variable/object that
>> > > > > I am storing in that scope.  Everything else is using the 'page'
>> > > > > scope.
>> > > > >
>> > > > > I am passing the "id" parameter through the URL (HTTP GET
>> Method).
>> > > > >
>> > > > > The Generated HTML looks like this:
>> > > > >
>> > > > > 

Tomcat6.0.10 Character Code question

2007-05-08 Thread red phoenix

I have set my all files with UTF-8 format,so I set URIEncoding parameter in
server.xml,like follows:

Then I write a JSP file like follows:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>





In test.do action,I get the value of Name from JSP,like follows:
request.getParameter("Name");
System.out.println("Name="+Name);
If I input english name in the field Name in JSP,when I submit,the
test.dowill receive right english name,but when I input chinese name
in the field
Name in JSP,test.do will receive not right name,it will show [EMAIL PROTECTED]
I know it must be wrong in character change.But I don't want to change
URIEncoding from UTF-8 to GB2312 in the server.xml file,I guess I should do
something in test.do,but I don't know how to do it.
Anybody could tell me how to do it? Would you give me some code?

Thanks


Re: request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

Also,  If you have any information about declaring a variable with !
I would like to know.  I am having trouble finding any on google and
my JSP book.

On 5/8/07, Richard Sayre <[EMAIL PROTECTED]> wrote:

Yes the right values are passed.  Th eonly one of those variable that
really efects the data on the page is vId, which is hard coded into
the 

I started to look in the _jspService and I noticed the the variable
which I assign the request.getParameter("id") to is not in that
method.

The variable is called 'theID'.  One thing I noticed about it is it is
declared like this

!String theID;

I have never seen this before.  Does this make the variable static?
If so then it is obvious why this is happening

I am going to look up this ! operator to see what it does. I 3 years I
have never encountered it.  Hopefully removing it will solve my
problem.  I will keep you updated.


On 5/8/07, Jason Polites <[EMAIL PROTECTED]> wrote:
> First, I'd just make sure you are passing the right value from the form.
> alert() the (editFlag=" + document.theForm.editFlag.value  + "&activeTab=" +
> document.theForm.activeTab.value + "&id=" + vId;) string before you do the
> location.href to be sure.
>
> Given that you are saying it works until multiple users access... it sounds
> like there is some variables in the wrong scope.  Recall that a JSP is
> compiled to a normal servlet by the container, and servlets are shared
> resources.  so.. if you are putting the value into a "shared" area within
> the jsp/servlet, it would make sense that you get strange results with
> multiple users.
>
> All local (page scope) variables *should* be defined within the "service"
> method of the compiled servlet, and hence shouldn't cause a problem.. so I
> can only think you are placing the variable in some sort of static
> location?
>
> If you say that the query string shows the correct location.. then things
> are really strange.  Does the address in the browser show the correct
> location/url?
>
>
>
> On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
> >
> > Sorry about that.  When I copied and pasted I missed the function name
> > and I typed it in manually.  I double checked and the function name is
> > spelled correctly.  This code works normally until multiple users
> > login.
> >
> > I pass these values the JSP page when the following JavaScript executes:
> >
> > top.location.href="showCa.jsp?editFlag=" +
> > document.theForm.editFlag.value  + "&activeTab=" +
> > document.theForm.activeTab.value + "&id=" + vId;
> >
> >
> > On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > > you are calling js function named 'showCa'
> > > but your javascript function name is 'showCap'
> > > When/Where do you actually pass these values to servlet?
> > >
> > > M--
> > > 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: "Richard Sayre" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" 
> > > Sent: Tuesday, May 08, 2007 9:55 AM
> > > Subject: Re: request.getParameter is returning the wrong value
> > >
> > >
> > > > On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> > > >> > From: Richard Sayre [mailto:[EMAIL PROTECTED]
> > > >> > Subject: request.getParameter is returning the wrong value
> > > >> >
> > > >> > The problem I am have is when a user clicks the link
> > > >> > showCa.jsp?id=2345
> > > >> >
> > > >> > The request.getParameter("id") is returning the wrong id!
> > > >>
> > > >> This is usually caused by application code storing some value in the
> > > >> wrong scope, or erroneous use of static variables.  Storing a
> > > >> request-specific item in the session or servlet objects is one such
> > > >> example.
> > > >>
> > > >>  - Chuck
> > > >
> > > > I store a 'UserSession' object in Tomcats session but it does not
> > > > contain a variable called "id".  This is the only variable/object that
> > > > I am storing in that scope.  Everything else is using the 'page'
> > > > scope.
> > > >
> > > > I am passing the "id" parameter through the URL (HTTP GET Method).
> > > >
> > > > The Generated HTML looks like this:
> > > >
> > > > 1818 2007/04/13
> > > >
> > > > The showCa function:
> > > >
> > > > function showCap( vId ) {
> > > >
> > > >
> > > >top.location.href="showCa.jsp?editFlag=" +
> > > > document.theForm.editFlag.value  + "&activeTab=" +
> > > > document.theForm.activeTab.value + "&id=" + vId;
> > > >
> > > >
> > > > }
> > > >
> > > > The JavaScript function redirects the browser.
> > > >
> > > > On the showCa page the URL in the browser has the right ID.  The
> > > > request.getQueryString(); returns the proper query string but the
> > > > request.getPa

Re: request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

Yes the right values are passed.  Th eonly one of those variable that
really efects the data on the page is vId, which is hard coded into
the 

I started to look in the _jspService and I noticed the the variable
which I assign the request.getParameter("id") to is not in that
method.

The variable is called 'theID'.  One thing I noticed about it is it is
declared like this

!String theID;

I have never seen this before.  Does this make the variable static?
If so then it is obvious why this is happening

I am going to look up this ! operator to see what it does. I 3 years I
have never encountered it.  Hopefully removing it will solve my
problem.  I will keep you updated.


On 5/8/07, Jason Polites <[EMAIL PROTECTED]> wrote:

First, I'd just make sure you are passing the right value from the form.
alert() the (editFlag=" + document.theForm.editFlag.value  + "&activeTab=" +
document.theForm.activeTab.value + "&id=" + vId;) string before you do the
location.href to be sure.

Given that you are saying it works until multiple users access... it sounds
like there is some variables in the wrong scope.  Recall that a JSP is
compiled to a normal servlet by the container, and servlets are shared
resources.  so.. if you are putting the value into a "shared" area within
the jsp/servlet, it would make sense that you get strange results with
multiple users.

All local (page scope) variables *should* be defined within the "service"
method of the compiled servlet, and hence shouldn't cause a problem.. so I
can only think you are placing the variable in some sort of static
location?

If you say that the query string shows the correct location.. then things
are really strange.  Does the address in the browser show the correct
location/url?



On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:
>
> Sorry about that.  When I copied and pasted I missed the function name
> and I typed it in manually.  I double checked and the function name is
> spelled correctly.  This code works normally until multiple users
> login.
>
> I pass these values the JSP page when the following JavaScript executes:
>
> top.location.href="showCa.jsp?editFlag=" +
> document.theForm.editFlag.value  + "&activeTab=" +
> document.theForm.activeTab.value + "&id=" + vId;
>
>
> On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
> > you are calling js function named 'showCa'
> > but your javascript function name is 'showCap'
> > When/Where do you actually pass these values to servlet?
> >
> > M--
> > 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: "Richard Sayre" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" 
> > Sent: Tuesday, May 08, 2007 9:55 AM
> > Subject: Re: request.getParameter is returning the wrong value
> >
> >
> > > On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> > >> > From: Richard Sayre [mailto:[EMAIL PROTECTED]
> > >> > Subject: request.getParameter is returning the wrong value
> > >> >
> > >> > The problem I am have is when a user clicks the link
> > >> > showCa.jsp?id=2345
> > >> >
> > >> > The request.getParameter("id") is returning the wrong id!
> > >>
> > >> This is usually caused by application code storing some value in the
> > >> wrong scope, or erroneous use of static variables.  Storing a
> > >> request-specific item in the session or servlet objects is one such
> > >> example.
> > >>
> > >>  - Chuck
> > >
> > > I store a 'UserSession' object in Tomcats session but it does not
> > > contain a variable called "id".  This is the only variable/object that
> > > I am storing in that scope.  Everything else is using the 'page'
> > > scope.
> > >
> > > I am passing the "id" parameter through the URL (HTTP GET Method).
> > >
> > > The Generated HTML looks like this:
> > >
> > > 1818 2007/04/13
> > >
> > > The showCa function:
> > >
> > > function showCap( vId ) {
> > >
> > >
> > >top.location.href="showCa.jsp?editFlag=" +
> > > document.theForm.editFlag.value  + "&activeTab=" +
> > > document.theForm.activeTab.value + "&id=" + vId;
> > >
> > >
> > > }
> > >
> > > The JavaScript function redirects the browser.
> > >
> > > On the showCa page the URL in the browser has the right ID.  The
> > > request.getQueryString(); returns the proper query string but the
> > > request.getParameter("id") does not return the id that is in the URL
> > > or QueryString
> > >
> > > -
> > > 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: ACL (access control list) tutorial or example

2007-05-08 Thread Martin Gainty

Good Morning Dave...

I would start by referencing this link
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html

either
setup security in %JAVA_HOME%/lib/security/java.policy and start java with 
security manager enabled e.g.

JAVA -Djava.security.policy=java.policy %CATALINA_HOME%\bin\bootstrap.jar

OR
read everything you can on configuring %CATALINA_HOME%/conf/catalina.policy
and configure the necessary options in catalina.policy *this link should get 
you started*

http://tomcat.apache.org/tomcat-4.1-doc/security-manager-howto.html

HTH/
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: "David Kerber" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 10:25 AM
Subject: ACL (access control list) tutorial or example


I posted this on comp.lang.java.security yesterday, but haven't gotten a 
single answer, so I'm hoping you people can help:


I'm trying to implement ACL's in my Tomcat-based webapp, and am having 
trouble applying what I read in the docs and in my googling to my 
real-life application.  Could somebody please point me to a good tutorial 
or some example code that shows how to set and check the permissions (read 
only vs read/write, administration vs general user, etc) that a given user 
will have to access a given object?


I've got the authentication part going with no trouble, but am having 
trouble with the access control side of things.


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





-
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: request.getParameter is returning the wrong value

2007-05-08 Thread Jason Polites

First, I'd just make sure you are passing the right value from the form.
alert() the (editFlag=" + document.theForm.editFlag.value  + "&activeTab=" +
document.theForm.activeTab.value + "&id=" + vId;) string before you do the
location.href to be sure.

Given that you are saying it works until multiple users access... it sounds
like there is some variables in the wrong scope.  Recall that a JSP is
compiled to a normal servlet by the container, and servlets are shared
resources.  so.. if you are putting the value into a "shared" area within
the jsp/servlet, it would make sense that you get strange results with
multiple users.

All local (page scope) variables *should* be defined within the "service"
method of the compiled servlet, and hence shouldn't cause a problem.. so I
can only think you are placing the variable in some sort of static
location?

If you say that the query string shows the correct location.. then things
are really strange.  Does the address in the browser show the correct
location/url?



On 5/9/07, Richard Sayre <[EMAIL PROTECTED]> wrote:


Sorry about that.  When I copied and pasted I missed the function name
and I typed it in manually.  I double checked and the function name is
spelled correctly.  This code works normally until multiple users
login.

I pass these values the JSP page when the following JavaScript executes:

top.location.href="showCa.jsp?editFlag=" +
document.theForm.editFlag.value  + "&activeTab=" +
document.theForm.activeTab.value + "&id=" + vId;


On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
> you are calling js function named 'showCa'
> but your javascript function name is 'showCap'
> When/Where do you actually pass these values to servlet?
>
> M--
> 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: "Richard Sayre" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Tuesday, May 08, 2007 9:55 AM
> Subject: Re: request.getParameter is returning the wrong value
>
>
> > On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> >> > From: Richard Sayre [mailto:[EMAIL PROTECTED]
> >> > Subject: request.getParameter is returning the wrong value
> >> >
> >> > The problem I am have is when a user clicks the link
> >> > showCa.jsp?id=2345
> >> >
> >> > The request.getParameter("id") is returning the wrong id!
> >>
> >> This is usually caused by application code storing some value in the
> >> wrong scope, or erroneous use of static variables.  Storing a
> >> request-specific item in the session or servlet objects is one such
> >> example.
> >>
> >>  - Chuck
> >
> > I store a 'UserSession' object in Tomcats session but it does not
> > contain a variable called "id".  This is the only variable/object that
> > I am storing in that scope.  Everything else is using the 'page'
> > scope.
> >
> > I am passing the "id" parameter through the URL (HTTP GET Method).
> >
> > The Generated HTML looks like this:
> >
> > 1818 2007/04/13
> >
> > The showCa function:
> >
> > function showCap( vId ) {
> >
> >
> >top.location.href="showCa.jsp?editFlag=" +
> > document.theForm.editFlag.value  + "&activeTab=" +
> > document.theForm.activeTab.value + "&id=" + vId;
> >
> >
> > }
> >
> > The JavaScript function redirects the browser.
> >
> > On the showCa page the URL in the browser has the right ID.  The
> > request.getQueryString(); returns the proper query string but the
> > request.getParameter("id") does not return the id that is in the URL
> > or QueryString
> >
> > -
> > 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]




SSL not working on Tomcat 5.5

2007-05-08 Thread Marcus Johansson

Hi,

I am running Tomcat 5.5 on a Windows 2003 server box, using Sun JRE 1.5.0_11.
Since I want to have SSL support on my server, I followed the instructions
on

http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html

first creating a self-signed certificate and then uncommenting the SSL
Connector on port 8443. After a restart of the tomcat service i expected to
have the SSL up and running but alas. When accessing http://localhost:8443

it works fine, hence the connector seems active on the port. But when trying
to access https://localhost:8443 , my IE7 browser stands hanging for a
pretty long while until it declares that the page cannot be opened. No error
messages whatsoever to be found in the tomcat logs.

I have the same problem on another box which runs Windows 2000 Server, all
other things the same. Please help me figure out what is wrong!

Regards

Marcus Johansson


AW: Re: Cookie's value and double quotes with tomcat 6.0.10

2007-05-08 Thread valery.brinnel
Hi,

Sorry to bother again, but there is still something I can't understand.

The changelog of Tomcat indicates that the changes you've reported happened 
with tomcat version 5.5.14. 
(It says "Strip quotes when parsing Cookie values, even for v0 Cookies".)
However, the integrated Tomcat delivered with the Entrust application is a 
version 5.5.17.

If I make no mistake, the changes mentioned above should also apply to the 
native install of the Entrust Truepass, it means I should get the same error. 

What do i miss here ?

Thanks again for your time,
Very Best
Valéry. 

-Ursprüngliche Nachricht-
Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Bill Barker
Gesendet: Dienstag, 8. Mai 2007 05:05
An: users@tomcat.apache.org
Betreff: Re: Cookie's value and double quotes with tomcat 6.0.10

Yes, that is the correct BZ issue.  It was decided that TC would quote cookie 
values containing special characters, even for v0 cookies.  The thought was 
that browsers would likely understand the quoted value and handle it correctly. 
 It seems that Entrust thought the same thing, and they came up with their 
nasty little hack to quote the value.  You will have to take it up with Entrust 
and get them to stop trying to quote the cookie value themselves.


<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

Hi everyone!

First, thanks for reading this.

Here is the situation:

Entrust (a provider of security solutions) offers Java-based security 
applications for enterprises.
Their installer installs an own Java virtual machine for each application as 
well as an own Tomcat (v 5.5.17)

As we are already running some self-developed servlets, we wish to extract the 
server application and run it with our own JVM (6u1) and Tomcat (6.0.10).
That's what we did: the servlets are up and running.

But we are apparently facing a problem regarding the cookie's value.
When I am running the ISAPI redirector in DEBUG mode, I get this:

[Fri May 04 17:59:08 2007] [1308:1988] [debug] jk_ajp_common.c (684): 
Header[3] [Set-Cookie] =
[EntrustTruePassID="\"7.0|Y249U[...]PUx1ZnRoYW5zYSwgYz1kZQ==|1|2007-05-04
15:59:08 UTC|1200|50|-61|Qx2M2Q==|[...]3VmobNkg8j46JaoSkgMCTU=\"";
Domain=.blabla.com; Path=/; Secure]

The cookie's value is twice double quoted -> the inner double quotes have been 
backslashed.
On a test server, with the native install of this application, the same log 
entry looks like this:

[Fri May 04 15:57:29 2007] [1884:3676] [debug] jk_ajp_common.c (684): 
Header[3] [Set-Cookie] = [EntrustTruePassID="7.[...]fDs==|1|2007-05-04
13:57:29 
UTC|1200|50|0|Qx2M2Q==|[..]/d5wFNo145sdCJHdGXkayL8v3RFTSv2VT5Wvd6zixINFv
UTC|1200|50|0|HywI55zeDJq8len0=";
domain=.blabla.com; path=/; secure]

Because the cookie's value has been changed, the authentication process
fails:

Fri May 04 17:59:09 2007 - WARNING   - 
[SessionValidationImpl::checkAuthentication()] - Auth cookie: Reporting
Error:
TruePass: TPAuthCookie - Could not create the cookie using the cookie string 
Line number: 253 File name: AuthCookie.cpp caused by TruePass: TPAuthCookie - 
Could not validate the authentication cookie Line number: 976 File name: 
AuthCookie.cpp caused by TruePass: TPAuthCookie - The authentication cookie 
string is improperly formatted Line number: 763 File name: AuthCookie.cpp


Before I give up, I would like to ask the specialists, if I am missing any 
point here ;) I read some posts about v0 cookies values problems
(http://issues.apache.org/bugzilla/show_bug.cgi?id=36863)
and I am wondering if it may also be a Tomcat problem here.

Tanks a lot for your time
Best regards

Valéry.

-
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: request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

Sorry about that.  When I copied and pasted I missed the function name
and I typed it in manually.  I double checked and the function name is
spelled correctly.  This code works normally until multiple users
login.

I pass these values the JSP page when the following JavaScript executes:

top.location.href="showCa.jsp?editFlag=" +
document.theForm.editFlag.value  + "&activeTab=" +
document.theForm.activeTab.value + "&id=" + vId;


On 5/8/07, Martin Gainty <[EMAIL PROTECTED]> wrote:

you are calling js function named 'showCa'
but your javascript function name is 'showCap'
When/Where do you actually pass these values to servlet?

M--
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: "Richard Sayre" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 9:55 AM
Subject: Re: request.getParameter is returning the wrong value


> On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
>> > From: Richard Sayre [mailto:[EMAIL PROTECTED]
>> > Subject: request.getParameter is returning the wrong value
>> >
>> > The problem I am have is when a user clicks the link
>> > showCa.jsp?id=2345
>> >
>> > The request.getParameter("id") is returning the wrong id!
>>
>> This is usually caused by application code storing some value in the
>> wrong scope, or erroneous use of static variables.  Storing a
>> request-specific item in the session or servlet objects is one such
>> example.
>>
>>  - Chuck
>
> I store a 'UserSession' object in Tomcats session but it does not
> contain a variable called "id".  This is the only variable/object that
> I am storing in that scope.  Everything else is using the 'page'
> scope.
>
> I am passing the "id" parameter through the URL (HTTP GET Method).
>
> The Generated HTML looks like this:
>
> 1818 2007/04/13
>
> The showCa function:
>
> function showCap( vId ) {
>
>
>top.location.href="showCa.jsp?editFlag=" +
> document.theForm.editFlag.value  + "&activeTab=" +
> document.theForm.activeTab.value + "&id=" + vId;
>
>
> }
>
> The JavaScript function redirects the browser.
>
> On the showCa page the URL in the browser has the right ID.  The
> request.getQueryString(); returns the proper query string but the
> request.getParameter("id") does not return the id that is in the URL
> or QueryString
>
> -
> 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]



ACL (access control list) tutorial or example

2007-05-08 Thread David Kerber
I posted this on comp.lang.java.security yesterday, but haven't gotten a 
single answer, so I'm hoping you people can help:


I'm trying to implement ACL's in my Tomcat-based webapp, and am having 
trouble applying what I read in the docs and in my googling to my 
real-life application.  Could somebody please point me to a good 
tutorial or some example code that shows how to set and check the 
permissions (read only vs read/write, administration vs general user, 
etc) that a given user will have to access a given object?


I've got the authentication part going with no trouble, but am having 
trouble with the access control side of things.


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



RE: Newbie Question: How to Disable Caching?

2007-05-08 Thread Robinson, Eric
The OS is RHEL4. Tomcat is 5.0.28.

The 'particular function' is a little hard to explain. It's just an area
of the program where you configure certain parameters that control
workflow in your medical practice, such as how long a default patient
visit lasts. This area has a different look and feel than the rest of
the program, and has all the earmarks of having been written by a
programmer that no longer works for the vendor. :-)

The bottom line is that when I access this section, sometimes I get
errors with scripts on the page. I had a theory that the problem was
with cached data, so I changed the way the load balancer distributes
requests. Now the LB always sends subsequent requests from a particular
source IP to whichever tomcat server was selected for the first request,
and the errors have gone away. I believe this indicates that my theory
was correct, so now I'm looking for a way to disable caching of anything
in the tomcat/work directory.

Isn't there a simple, global way to tell tomcat not to cache?

--
Eric Robinson



-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 6:00 AM
To: Tomcat Users List
Subject: Re: Newbie Question: How to Disable Caching?

Robinson, Eric wrote:
> We have a medical program that runs on two tomcat servers behind an 
> LVS load balancer. Everything works fine except for one particular 
> function that apparently relies on data in the tomcat5/work directory.

> If the load balancer directs a request to a tomcat server that has 
> different cache data, the function fails.
> 
> Is there a way to disable caching in tomcat so nothing gets stored in 
> the work directory? Or is that just a stupid question?

(OS, tomcat version, etc, please)

It depends on what the data is and how it got there; can you enlighten
us as to what is the 'particular function'?


If the application (rather than the server) is writing data to the work 
dir, then that's the component that needs fixing (by storing the data in

a database perhaps).


p



> --
> Eric Robinson
> 
> 
> 
> 
> Disclaimer - May 8, 2007 
> This email and any files transmitted with it are confidential and
intended solely for Tomcat Users List. If you are not the named
addressee you should not disseminate, distribute, copy or alter this
email. Any views or opinions presented in this email are solely those of
the author and might not represent those of Physician Select Management
(PSM) or Physician's Managed Care (PMC). Warning: Although the message
sender has taken reasonable precautions to ensure no viruses are present
in this email, neither PSM nor PMC can accept responsibility for any
loss or damage arising from the use of this email or attachments.
> 
> -
> 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: request.getParameter is returning the wrong value

2007-05-08 Thread Martin Gainty
you are calling js function named 'showCa' 
but your javascript function name is 'showCap'

When/Where do you actually pass these values to servlet?

M--
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: "Richard Sayre" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, May 08, 2007 9:55 AM
Subject: Re: request.getParameter is returning the wrong value



On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:

> From: Richard Sayre [mailto:[EMAIL PROTECTED]
> Subject: request.getParameter is returning the wrong value
>
> The problem I am have is when a user clicks the link
> showCa.jsp?id=2345
>
> The request.getParameter("id") is returning the wrong id!

This is usually caused by application code storing some value in the
wrong scope, or erroneous use of static variables.  Storing a
request-specific item in the session or servlet objects is one such
example.

 - Chuck


I store a 'UserSession' object in Tomcats session but it does not
contain a variable called "id".  This is the only variable/object that
I am storing in that scope.  Everything else is using the 'page'
scope.

I am passing the "id" parameter through the URL (HTTP GET Method).

The Generated HTML looks like this:

1818 2007/04/13

The showCa function:

function showCap( vId ) {


   top.location.href="showCa.jsp?editFlag=" +
document.theForm.editFlag.value  + "&activeTab=" +
document.theForm.activeTab.value + "&id=" + vId;
   


}

The JavaScript function redirects the browser.

On the showCa page the URL in the browser has the right ID.  The
request.getQueryString(); returns the proper query string but the
request.getParameter("id") does not return the id that is in the URL
or QueryString

-
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: request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

On 5/8/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:

> From: Richard Sayre [mailto:[EMAIL PROTECTED]
> Subject: request.getParameter is returning the wrong value
>
> The problem I am have is when a user clicks the link
> showCa.jsp?id=2345
>
> The request.getParameter("id") is returning the wrong id!

This is usually caused by application code storing some value in the
wrong scope, or erroneous use of static variables.  Storing a
request-specific item in the session or servlet objects is one such
example.

 - Chuck


I store a 'UserSession' object in Tomcats session but it does not
contain a variable called "id".  This is the only variable/object that
I am storing in that scope.  Everything else is using the 'page'
scope.

I am passing the "id" parameter through the URL (HTTP GET Method).

The Generated HTML looks like this:

1818 2007/04/13

The showCa function:

function showCap( vId ) {


top.location.href="showCa.jsp?editFlag=" +
document.theForm.editFlag.value  + "&activeTab=" +
document.theForm.activeTab.value + "&id=" + vId;


}

The JavaScript function redirects the browser.

On the showCa page the URL in the browser has the right ID.  The
request.getQueryString(); returns the proper query string but the
request.getParameter("id") does not return the id that is in the URL
or QueryString

-
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: request.getParameter is returning the wrong value

2007-05-08 Thread Caldarale, Charles R
> From: Richard Sayre [mailto:[EMAIL PROTECTED] 
> Subject: request.getParameter is returning the wrong value
> 
> The problem I am have is when a user clicks the link 
> showCa.jsp?id=2345
> 
> The request.getParameter("id") is returning the wrong id!

This is usually caused by application code storing some value in the
wrong scope, or erroneous use of static variables.  Storing a
request-specific item in the session or servlet objects is one such
example.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



request.getParameter is returning the wrong value

2007-05-08 Thread Richard Sayre

My web application generates a list of links for a user to click on.

The URL looks like this:  showCa.jsp?id=2345

The showCa.jsp page uses the id to populate a form on the page.

The problem I am have is when a user clicks the link showCa.jsp?id=2345

The request.getParameter("id") is returning the wrong id!

I have never seen behavior like this before. This page has been
working in production for a long time. I reproduced the error, and it
only seems to be happening when there are multiple users logged in.
The wrong id that appears belongs to another user. On the showCa.jsp
page I printed out the query string and the value of id and got this:

queryString : ?id=2345
id : 2226



Has anyone seen anything like this before? I have been coding JSP for
3 years now and I have never seen behavior like this. This is
occurring on Tomcat 4.1/ JDK 1.4

I greatly appreciate any suggestions that you may have.

Thank you

-
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: Newbie Question: How to Disable Caching?

2007-05-08 Thread Pid

Robinson, Eric wrote:

We have a medical program that runs on two tomcat servers behind an LVS
load balancer. Everything works fine except for one particular function
that apparently relies on data in the tomcat5/work directory. If the
load balancer directs a request to a tomcat server that has different
cache data, the function fails.

Is there a way to disable caching in tomcat so nothing gets stored in
the work directory? Or is that just a stupid question?


(OS, tomcat version, etc, please)

It depends on what the data is and how it got there; can you enlighten 
us as to what is the 'particular function'?



If the application (rather than the server) is writing data to the work 
dir, then that's the component that needs fixing (by storing the data in 
a database perhaps).



p




--
Eric Robinson




Disclaimer - May 8, 2007 
This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments.


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






smime.p7s
Description: S/MIME Cryptographic Signature


AW: Re: Cookie's value and double quotes with tomcat 6.0.10

2007-05-08 Thread valery.brinnel
Hi Bill,

Many thanks for your reply. 
I will try to fix this with Entrust.

Very Best
Valery.

-Ursprüngliche Nachricht-
Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Bill Barker
Gesendet: Dienstag, 8. Mai 2007 05:05
An: users@tomcat.apache.org
Betreff: Re: Cookie's value and double quotes with tomcat 6.0.10

Yes, that is the correct BZ issue.  It was decided that TC would quote cookie 
values containing special characters, even for v0 cookies.  The thought was 
that browsers would likely understand the quoted value and handle it correctly. 
 It seems that Entrust thought the same thing, and they came up with their 
nasty little hack to quote the value.  You will have to take it up with Entrust 
and get them to stop trying to quote the cookie value themselves.


<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

Hi everyone!

First, thanks for reading this.

Here is the situation:

Entrust (a provider of security solutions) offers Java-based security 
applications for enterprises.
Their installer installs an own Java virtual machine for each application as 
well as an own Tomcat (v 5.5.17)

As we are already running some self-developed servlets, we wish to extract the 
server application and run it with our own JVM (6u1) and Tomcat (6.0.10).
That's what we did: the servlets are up and running.

But we are apparently facing a problem regarding the cookie's value.
When I am running the ISAPI redirector in DEBUG mode, I get this:

[Fri May 04 17:59:08 2007] [1308:1988] [debug] jk_ajp_common.c (684): 
Header[3] [Set-Cookie] =
[EntrustTruePassID="\"7.0|Y249U[...]PUx1ZnRoYW5zYSwgYz1kZQ==|1|2007-05-04
15:59:08 UTC|1200|50|-61|Qx2M2Q==|[...]3VmobNkg8j46JaoSkgMCTU=\"";
Domain=.blabla.com; Path=/; Secure]

The cookie's value is twice double quoted -> the inner double quotes have been 
backslashed.
On a test server, with the native install of this application, the same log 
entry looks like this:

[Fri May 04 15:57:29 2007] [1884:3676] [debug] jk_ajp_common.c (684): 
Header[3] [Set-Cookie] = [EntrustTruePassID="7.[...]fDs==|1|2007-05-04
13:57:29 
UTC|1200|50|0|Qx2M2Q==|[..]/d5wFNo145sdCJHdGXkayL8v3RFTSv2VT5Wvd6zixINFv
UTC|1200|50|0|HywI55zeDJq8len0=";
domain=.blabla.com; path=/; secure]

Because the cookie's value has been changed, the authentication process
fails:

Fri May 04 17:59:09 2007 - WARNING   - 
[SessionValidationImpl::checkAuthentication()] - Auth cookie: Reporting
Error:
TruePass: TPAuthCookie - Could not create the cookie using the cookie string 
Line number: 253 File name: AuthCookie.cpp caused by TruePass: TPAuthCookie - 
Could not validate the authentication cookie Line number: 976 File name: 
AuthCookie.cpp caused by TruePass: TPAuthCookie - The authentication cookie 
string is improperly formatted Line number: 763 File name: AuthCookie.cpp


Before I give up, I would like to ask the specialists, if I am missing any 
point here ;) I read some posts about v0 cookies values problems
(http://issues.apache.org/bugzilla/show_bug.cgi?id=36863)
and I am wondering if it may also be a Tomcat problem here.

Tanks a lot for your time
Best regards

Valéry.

-
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 hprof empty file

2007-05-08 Thread Filip Hanik - Dev Lists
maybe try to run it under another service manager, like the Java Service 
Wrapper

http://people.apache.org/~fhanik/wrapper.html

to rule out the case, that its a win service problem
Filip

Jason Polites wrote:

Hi all,

I am running Tomcat 5.5.23 on a Win32 platform as an NT Service, with the
native DLL.

I am experiencing the CPU spinning at 100% in our production environment,
which is not something I have seen in our dev or staging env.  In 
order to
determine the problem area, I have tried running Tomcat with hprof 
using the

following JVM option:

-Xrunhprof:cpu=samples,thread=y

I am setting this in the Java options tab of the Windows service 
dialog.  I
get a java.hprof.txt file created in the root tomcat directory, but 
there is

nothing in it other than the standard intro text.

This works when I run tomcat locally within eclipse (same tomcat 
version);

but when running in production I get no data!

This is really frustrating as I can't fix the CPU problem because I can't
identify it.

Help!

Thanks.



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.2/787 - Release Date: 5/3/2007 2:11 PM
  



-
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: NioEndpoint closes connection upon timeout

2007-05-08 Thread Filip Hanik - Dev Lists

Reich, Matthias wrote:
 

  

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 11:00 AM

However, the Javadoc of enum EventSubType says: 

TIMEOUT - the connection timed out (sub type of ERROR); 
  

note that this

ERROR type is not fatal, and the connection will not be 
  

closed unless


the servlet uses the close method of the event.
  
  

hmm, not sure I agree with the docs. let me check on that.
in the meantime, why don't you set a much higher timeout value
for the NIO connector you can do this on a per-connection basis.
just do event.setTimeout during the BEGIN event.

Filip

My servlet does not close the event in case of a TIMEOUT, 
  
  

you're servlet SHOULD ALWAYS call event.close upon any type of error.




Well, there is still no common understanding about what a TIMEOUT really
means
within the code base and the documentation.

E.g. the Javadoc for CometEvent says:

ERROR - Error will be called by the container in the case where an IO
exception
or a similar unrecoverable error occurs on the connection. Fields that
have
been initialized in the begin method should be reset. After this event
has
been processed, the request and response objects, as well as all their
dependent
objects will be recycled and used to process other requests.

However, the CoyoteAdapter does *not* treat a timeout as an error and
does *not* recycle any objects,
and this behavior works fine with Apr connector - i.e. the Servlet can
decide if this is an error
situation and close the event if appropriate.

No matter what the final meaning of a timeout will be - the behavior
should be the same for both connectors,
i.e. either both connectors should close the connection upon a timeout,
or both should keep it open.
  
yes, I agree, I made the modification to the NIO connector to handle it 
the same way as APR.
basically, the connection stays open, and if Keep Alive is turned on, 
you can reuse it for another HTTP request.
This means that it is now the developers responsibility to notify the 
client that the connection is no longer a "comet" connection.
My personal preference is that TIMEOUT is an error and should close the 
connection, but for the sake of consistency, both connectors should now 
behave in the same manner.


Filip

Matthias

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



Newbie Question: How to Disable Caching?

2007-05-08 Thread Robinson, Eric
We have a medical program that runs on two tomcat servers behind an LVS
load balancer. Everything works fine except for one particular function
that apparently relies on data in the tomcat5/work directory. If the
load balancer directs a request to a tomcat server that has different
cache data, the function fails.

Is there a way to disable caching in tomcat so nothing gets stored in
the work directory? Or is that just a stupid question?

--
Eric Robinson




Disclaimer - May 8, 2007 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of Physician Select Management (PSM) or Physician's Managed Care (PMC). 
Warning: Although the message sender has taken reasonable precautions to ensure 
no viruses are present in this email, neither PSM nor PMC can accept 
responsibility for any loss or damage arising from the use of this email or 
attachments.

-
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 hprof empty file

2007-05-08 Thread Jason Polites

Hi all,

I am running Tomcat 5.5.23 on a Win32 platform as an NT Service, with the
native DLL.

I am experiencing the CPU spinning at 100% in our production environment,
which is not something I have seen in our dev or staging env.  In order to
determine the problem area, I have tried running Tomcat with hprof using the
following JVM option:

-Xrunhprof:cpu=samples,thread=y

I am setting this in the Java options tab of the Windows service dialog.  I
get a java.hprof.txt file created in the root tomcat directory, but there is
nothing in it other than the standard intro text.

This works when I run tomcat locally within eclipse (same tomcat version);
but when running in production I get no data!

This is really frustrating as I can't fix the CPU problem because I can't
identify it.

Help!

Thanks.


Re: Odd tomcat 6.1.0 problem

2007-05-08 Thread Sebastiaan van Erk

Adam Lipscombe wrote:

Folks

I have an odd problem that occurs on TC6 running on fedora core 6.
Apache in fronting TC.

When I try to pass an HTML parameter from a JSP it is not in present 
in the request object for the receiving JSP. I get the following in 
catalina.out:


WARNING: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
at 
org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
at 
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392) 

at 
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344) 

at 
org.apache.catalina.connector.Request.parseParameters(Request.java:2453)
at 
org.apache.catalina.connector.Request.getParameter(Request.java:1031)
at 
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) 





The param I am trying to pass is a simple text string.


Any ideas?


Sounds to me like there is a % sign in the parameter text which is not 
url encoded. Make sure you url encode the request url in your first JSP.

Regards,
Sebastiaan


-
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: NioEndpoint closes connection upon timeout

2007-05-08 Thread Reich, Matthias
 

> -Original Message-
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 08, 2007 11:00 AM
> >
> > However, the Javadoc of enum EventSubType says: 
> >
> > TIMEOUT - the connection timed out (sub type of ERROR); 
> note that this
> > ERROR type is not fatal, and the connection will not be 
> closed unless
> > the servlet uses the close method of the event.
> >   
> hmm, not sure I agree with the docs. let me check on that.
> in the meantime, why don't you set a much higher timeout value
> for the NIO connector you can do this on a per-connection basis.
> just do event.setTimeout during the BEGIN event.
> 
> Filip
> > My servlet does not close the event in case of a TIMEOUT, 
> >   
> you're servlet SHOULD ALWAYS call event.close upon any type of error.


Well, there is still no common understanding about what a TIMEOUT really
means
within the code base and the documentation.

E.g. the Javadoc for CometEvent says:

ERROR - Error will be called by the container in the case where an IO
exception
or a similar unrecoverable error occurs on the connection. Fields that
have
been initialized in the begin method should be reset. After this event
has
been processed, the request and response objects, as well as all their
dependent
objects will be recycled and used to process other requests.

However, the CoyoteAdapter does *not* treat a timeout as an error and
does *not* recycle any objects,
and this behavior works fine with Apr connector - i.e. the Servlet can
decide if this is an error
situation and close the event if appropriate.

No matter what the final meaning of a timeout will be - the behavior
should be the same for both connectors,
i.e. either both connectors should close the connection upon a timeout,
or both should keep it open.

Matthias

-
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: jsp:include no longer working in 5.5.23

2007-05-08 Thread Mark Thomas
Scott Dunbar wrote:
> Thanks, I checked that and my I don't set a docBase in my context:
> 
>   unpackWARs="true" autoDeploy="true"
>  xmlValidation="false" xmlNamespaceAware="false">
> 
>

And there is the problem. If it isn't absolute, docBase is relative to
appBase so you do have appBase == docBase

To fix this:
- remove the Context element from your server.xml
- assuming you have only one webapp deployed, move the contents of
/home/scott/sites/domainname.tld to /home/scott/sites/domainname.tld/ROOT
- if you have multiple webapps deployed, just move the files that are
part of the ROOT webapp

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: Odd tomcat 6.1.0 problem

2007-05-08 Thread Filip Hanik - Dev Lists

send us a small test app please
Filip

Adam Lipscombe wrote:

Folks

I have an odd problem that occurs on TC6 running on fedora core 6.
Apache in fronting TC.

When I try to pass an HTML parameter from a JSP it is not in present 
in the request object for the receiving JSP. I get the following in 
catalina.out:


WARNING: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
at 
org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
at 
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392) 

at 
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344) 

at 
org.apache.catalina.connector.Request.parseParameters(Request.java:2453)
at 
org.apache.catalina.connector.Request.getParameter(Request.java:1031)
at 
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) 





The param I am trying to pass is a simple text string.



Any ideas?


TIA - Adam


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



Odd tomcat 6.1.0 problem

2007-05-08 Thread Adam Lipscombe

Folks

I have an odd problem that occurs on TC6 running on fedora core 6.
Apache in fronting TC.

When I try to pass an HTML parameter from a JSP it is not in present in the request object for the 
receiving JSP. I get the following in catalina.out:


WARNING: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
at 
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392)
at 
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344)
at 
org.apache.catalina.connector.Request.parseParameters(Request.java:2453)
at org.apache.catalina.connector.Request.getParameter(Request.java:1031)
at 
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)



The param I am trying to pass is a simple text string.



Any ideas?


TIA - Adam


-
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: Clustering - not joining the group

2007-05-08 Thread Filip Hanik - Dev Lists

it comes down to multicasting working properly on your system.
that is where your troubleshooting efforts need to go. Sometimes 
removing mcastBindAddr helps.

Filip

Vinu Varghese wrote:

Hi,
   I have a clustered environment which have 4 machines that are in 
the same private switch. I have configured the clustering element of 
server.xml as shown below :


   |  
manager.className="org.apache.catalina.cluster.session.DeltaManager"

manager.expireSessionsOnShutdown="false"
manager.notifyListenersOnReplication="false"
manager.notifySessionListenersOnReplication="false"
manager.sendAllSessions="false" manager.sendAllSessionsSize="500"
manager.sendAllSessionsWaitTime="20">





 
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"

 doProcessingStats="true" doTransmitterProcessingStats="true"
 doWaitAckStats="true" keepAliveMaxRequestCount="-1"
 keepAliveTimeout="8" queueCheckLock="true" 
queueDoStats="true"

 queueTimeWait="true" recoverCounter="6" recoverTimeout="500"
 replicationMode="fastasyncqueue" waitForAck="true" />

   
filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.html;.*\.txt;" 


 primaryIndicator="true" />

   
className="org.apache.catalina.cluster.session.JvmRouteBinderValve"

 enabled="true" />
   
className="org.apache.catalina.cluster.session.ClusterSessionListener"

   />
   
className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" 


   />


   
   |

Only two pair of machines get participated in clustering. The other 
two will not respond to any messages or doesnt recognize the rest of 
the members at all. I am running Tomcat 5.5.20 on FC5 and JDK 1.5. I 
have my iptables shutdown and no other security options are enabled. 
Also I have JBoss PojoCache running in my application. It is 
configured on a different UDP address other than mcastAddress of 
Tomcat Server.xml's Membership element. Can anyone lash some light on 
this issue ?


Thanks in advance.

Regards
--Vinu Varghese



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.2/787 - Release Date: 5/3/2007 2:11 PM
  



-
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: NioEndpoint closes connection upon timeout

2007-05-08 Thread Filip Hanik - Dev Lists

Reich, Matthias wrote:

The NioEndpoint seems to close a connection during the timeout handling.
My client reacts to a connection failure with a resubmit of the last
request,
and I see this in the log:

07.05.2007 22:08:14 comettest.CometServlet event
WARNUNG: BEGIN(16) POST /comettest/comet/request?action=poll&count=1
07.05.2007 22:08:35 comettest.CometServlet event
WARNUNG: ERROR/TIMEOUT(16) POST
/comettest/comet/request?action=poll&count=1
07.05.2007 22:08:35 comettest.CometServlet event
WARNUNG: BEGIN(17) POST /comettest/comet/request?action=poll&count=1

I had a look into the code and found that NioEndpoint.timeout calls
cancelledKey(key, SocketStatus.TIMEOUT,true);
Method cancelledKey processes the timeout event and then closes the
channel.

However, the Javadoc of enum EventSubType says: 


TIMEOUT - the connection timed out (sub type of ERROR); note that this
ERROR type is not fatal, and the connection will not be closed unless
the servlet uses the close method of the event.
  

hmm, not sure I agree with the docs. let me check on that.
in the meantime, why don't you set a much higher timeout value
for the NIO connector you can do this on a per-connection basis.
just do event.setTimeout during the BEGIN event.

Filip

My servlet does not close the event in case of a TIMEOUT, and thus the
CoyoteAdapter won't recycle the processor. The consequence is that
Tomcat runs out of memory after a while if my asynchronous response
provider thread often waits longer than the connection timeout before
sending an answer. 
  

you're servlet SHOULD ALWAYS call event.close upon any type of error.

According to a note which was still present in the Tomcat 5.5 server.xml
file, I tried to set the connectionTimeout value to 0 to disable
connection timeouts, but that does no longer seem to work with Tomcat 6,
at least not with the Nio connector.
  
see the note about per-connection timeout, also, you can set 
socket.soTimeout

see the documentation

Thus, I think this behavior of the NioEndpoint must be considered a bug.
(Also, the Apr connector does not close the connection upon a TIMEOUT
event.)

If it should not be possible to provide a short term solution which
keeps the connection open, perhaps the behavior of NioEndpoint.timeout
can be modified to signal a DISCONNECT instead of a TIMEOUT, even if it
was the server and not the client that disconnected. This would allow
the Servlet and the CoyoteAdapter to clean up more properly.


Matthias

-
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 6 and system property

2007-05-08 Thread Mikolaj Rydzewski

Manca Davide wrote:

This didn't worked out, I tried to write in my server.xml to let Jfig work.

 









  
This does not set system property. Please read 
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html to 
know how to read such variables / parameters.


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


RE: tomcat 6 and system property

2007-05-08 Thread Manca Davide
Hello,

 

This didn't worked out, I tried to write in my server.xml to let Jfig work.

 









 

But the output was:

 

May 8, 2007 10:37:05 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Allocate exception for servlet DestinationSearchServlet

org.igfay.jfig.JFigException: ConfigurationDictionary.getValueReally() 
***Exception ***

Section DESTINATION not found.

at org.igfay.jfig.JFigDictionary.getValueReally(JFigDictionary.java:292)

at org.igfay.jfig.JFigDictionary.getValue(JFigDictionary.java:247)

at org.igfay.jfig.JFig.getValue(JFig.java:480)

at 
it.matrix.planner.DestinationSearchServlet.loadApplicationConfiguration(DestinationSearchServlet.java:501)

at 
it.matrix.planner.DestinationSearchServlet.init(DestinationSearchServlet.java:162)

at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)

at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)

at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)

at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)

at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)

at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)

at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)

at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)

at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)

at java.lang.Thread.run(Thread.java:595)

 

I tried also

 









 

But it didn't work out...what do I wrong?

 

I need help please!

 

Thank you in advance

 

-Original Message-
From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
Sent: lunedì 7 maggio 2007 12.47
To: Tomcat Users List
Subject: Re: tomcat 6 and system property

 

Manca Davide wrote:

> I have various webapp under various hosts under one Tomcat. I'm trying

> to set system-properties for every webapps, I mean that every single

> webapp should have one or more system-property. In resin 2 or 3 it is

> possible setting them in the webapp web.xml like that:

> 

>  

> 

>   

> 

>  

> 

>   

> 

>   

> 

>  

> 

> I tried the same way in Tomcat 6 but it doesn't see system-properties.

>   

So? The  syntax is Resin specific.

> And I cannot use the -D into the Java or Tomcat start command because of

> I have a lot of webapps under one Tomcat.

>   

I'd rather use context parameters or environment entries 

(http://tomcat.apache.org/tomcat-6.0-doc/config/context.html) than 

system properties.

 

-- 

Mikolaj Rydzewski <[EMAIL PROTECTED]>

 



NioEndpoint closes connection upon timeout

2007-05-08 Thread Reich, Matthias
The NioEndpoint seems to close a connection during the timeout handling.
My client reacts to a connection failure with a resubmit of the last
request,
and I see this in the log:

07.05.2007 22:08:14 comettest.CometServlet event
WARNUNG: BEGIN(16) POST /comettest/comet/request?action=poll&count=1
07.05.2007 22:08:35 comettest.CometServlet event
WARNUNG: ERROR/TIMEOUT(16) POST
/comettest/comet/request?action=poll&count=1
07.05.2007 22:08:35 comettest.CometServlet event
WARNUNG: BEGIN(17) POST /comettest/comet/request?action=poll&count=1

I had a look into the code and found that NioEndpoint.timeout calls
cancelledKey(key, SocketStatus.TIMEOUT,true);
Method cancelledKey processes the timeout event and then closes the
channel.

However, the Javadoc of enum EventSubType says: 

TIMEOUT - the connection timed out (sub type of ERROR); note that this
ERROR type is not fatal, and the connection will not be closed unless
the servlet uses the close method of the event.

My servlet does not close the event in case of a TIMEOUT, and thus the
CoyoteAdapter won't recycle the processor. The consequence is that
Tomcat runs out of memory after a while if my asynchronous response
provider thread often waits longer than the connection timeout before
sending an answer. 

According to a note which was still present in the Tomcat 5.5 server.xml
file, I tried to set the connectionTimeout value to 0 to disable
connection timeouts, but that does no longer seem to work with Tomcat 6,
at least not with the Nio connector.

Thus, I think this behavior of the NioEndpoint must be considered a bug.
(Also, the Apr connector does not close the connection upon a TIMEOUT
event.)

If it should not be possible to provide a short term solution which
keeps the connection open, perhaps the behavior of NioEndpoint.timeout
can be modified to signal a DISCONNECT instead of a TIMEOUT, even if it
was the server and not the client that disconnected. This would allow
the Servlet and the CoyoteAdapter to clean up more properly.


Matthias

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



Clustering - not joining the group

2007-05-08 Thread Vinu Varghese

Hi,
   I have a clustered environment which have 4 machines that are in the 
same private switch. I have configured the clustering element of 
server.xml as shown below :


   |   
   manager.className="org.apache.catalina.cluster.session.DeltaManager"

manager.expireSessionsOnShutdown="false"
manager.notifyListenersOnReplication="false"
manager.notifySessionListenersOnReplication="false"
manager.sendAllSessions="false" manager.sendAllSessionsSize="500"
manager.sendAllSessionsWaitTime="20">








   filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.html;.*\.txt;"

 primaryIndicator="true" />


   className="org.apache.catalina.cluster.session.JvmRouteBinderValve"

 enabled="true" />

   className="org.apache.catalina.cluster.session.ClusterSessionListener"

   />

   className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener"

   />


   
   |

Only two pair of machines get participated in clustering. The other two 
will not respond to any messages or doesnt recognize the rest of the 
members at all. I am running Tomcat 5.5.20 on FC5 and JDK 1.5. I have my 
iptables shutdown and no other security options are enabled. Also I have 
JBoss PojoCache running in my application. It is configured on a 
different UDP address other than mcastAddress of Tomcat Server.xml's 
Membership element. Can anyone lash some light on this issue ?


Thanks in advance.

Regards
--Vinu Varghese