Re: Expression language not working

2010-09-01 Thread abhishek jain
On Tue, Aug 31, 2010 at 9:16 PM, Mark Thomas ma...@apache.org wrote:

 On 31/08/2010 16:38, abhishek jain wrote:
  Hey ,
  I just realized that actually i accidently placed el-api.jar in
 WEB-INF/lib
  folder.
  If i dont than i get the following exception:
 
 
  Aug 31, 2010 4:28:44 PM org.apache.catalina.core.
  StandardContext listenerStart
  SEVERE: Error configuring application listener of class
  com.sun.faces.config.ConfigureListener
  java.lang.NoClassDefFoundError: javax/el/ExpressionFactory

 What else do you expect? The class isn't in the JSP spec. If you want to
 use that class you'll need to be using at least Tomcat 6.0.x.

 Mark


does that mean tomcat 5.5 cannot run EL ?

thanks
abhishek


Slow network with additional Connector (Port) in tomcat

2010-09-01 Thread Yoav Naveh
Hi,

I have come across a weird behavior. I defined an additional port for my
tomcat, by adding an additional connector in the server.xml
The connector was placed in the same container, and the only difference was
the new port.

Now, when I connect to my server using the old port (80) - network time is
standard. When I use the new custom port, I see much
longer network time. Analyzing the network shows that the difference is that
a new chunk of time is taken for connection and about the same time for
actually working with the server. To emphasize, the connections to port 80
still works ok, just the new port on that server works slowly.

Removing the port 80 connector altogether (leaving just the new one) did not
help.

Is there any default configuration for port 80 that should be duplicated for
a new port?
Any ideas would help.

Thanks!


Tomcat dies after starting

2010-09-01 Thread jan gestre
Hi Everyone,

I'm using 6.0.26 tomcat binary in my RHEL5 box, it was configured for
high availability using DRBD, it was already working for more than a
week already but all of a sudden it stopped working, tomcat just dies,
restarting it manually does not help either.

Here's my setup:

RHEL5 64bit
Sun Java 1.6 SDK 64 bit
Tomcat 6.0.29

Here's my catalina.out log which is the same as the catalina.2010-09-01.log:

logs/catalina.out
at
org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:596)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
Sep 1, 2010 1:44:26 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Sep 1, 2010 1:44:26 PM org.apache.catalina.connector.Connector stop
SEVERE: Coyote connector has not been started
---

Here's the log when it was working/running:

catalina.2010-08-23.log
Aug 23, 2010 3:00:16 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 23, 2010 3:00:16 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 23, 2010 3:00:16 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16  config=null
Aug 23, 2010 3:00:16 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 513 ms
Aug 23, 2010 3:10:19 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080

I've already googled similar issues but did not find any concrete solution.

Will appreciate any help.

Many thanks in advance.

Jan

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



Re: Expression language not working

2010-09-01 Thread Mark Thomas
On 01/09/2010 07:35, abhishek jain wrote:
 On Tue, Aug 31, 2010 at 9:16 PM, Mark Thomas ma...@apache.org wrote:
 
 On 31/08/2010 16:38, abhishek jain wrote:
 Hey ,
 I just realized that actually i accidently placed el-api.jar in
 WEB-INF/lib
 folder.
 If i dont than i get the following exception:


 Aug 31, 2010 4:28:44 PM org.apache.catalina.core.
 StandardContext listenerStart
 SEVERE: Error configuring application listener of class
 com.sun.faces.config.ConfigureListener
 java.lang.NoClassDefFoundError: javax/el/ExpressionFactory

 What else do you expect? The class isn't in the JSP spec. If you want to
 use that class you'll need to be using at least Tomcat 6.0.x.

 Mark

 
 does that mean tomcat 5.5 cannot run EL ?

Time for you to read the specifications.

Tomcat 5.5.x implements JSP 2.0 which does have EL support, although
that support does not include javax.el.ExpressionFactory which was
introduced in JSP 2.1.

Mark

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



Re: Tomcat dies after starting

2010-09-01 Thread Wesley Acheson
Can you put in the beginning of the stack trace?

Some things to look at make sure that you have permission to bind to
the port that you've set your http connection to. (you probably won't
be able to bind to port 80 on a linux box)

RHEL5 has selinux installed by default which may cause problems. I'm not sure.
Ensure nothing else is listening to that port.

Regards,

Wesley Acheson

On Wed, Sep 1, 2010 at 9:00 AM, jan gestre ipcopper...@gmail.com wrote:
 Hi Everyone,

 I'm using 6.0.26 tomcat binary in my RHEL5 box, it was configured for
 high availability using DRBD, it was already working for more than a
 week already but all of a sudden it stopped working, tomcat just dies,
 restarting it manually does not help either.

 Here's my setup:

 RHEL5 64bit
 Sun Java 1.6 SDK 64 bit
 Tomcat 6.0.29

 Here's my catalina.out log which is the same as the catalina.2010-09-01.log:

 logs/catalina.out
        at
 org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
        at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
        at
 org.apache.catalina.core.StandardService.stop(StandardService.java:596)
        at
 org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
        at
 org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
 Sep 1, 2010 1:44:26 PM org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8080
 Sep 1, 2010 1:44:26 PM org.apache.catalina.connector.Connector stop
 SEVERE: Coyote connector has not been started
 ---

 Here's the log when it was working/running:

 catalina.2010-08-23.log
 Aug 23, 2010 3:00:16 PM org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 Aug 23, 2010 3:00:16 PM org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 Aug 23, 2010 3:00:16 PM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/16  config=null
 Aug 23, 2010 3:00:16 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 513 ms
 Aug 23, 2010 3:10:19 PM org.apache.coyote.http11.Http11Protocol pause
 INFO: Pausing Coyote HTTP/1.1 on http-8080

 I've already googled similar issues but did not find any concrete solution.

 Will appreciate any help.

 Many thanks in advance.

 Jan

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



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



Help with Tomcat 6.0.29 and Comet

2010-09-01 Thread Thiago Locatelli da Silva

Hello everybody.

We have an application which was developed using comet and gwt and it 
was build over the tomcat 6.0.16 code. It was working very well and as 
according to the documentation, we are closing all the come events when 
we reach the event type ERROR and END. The application has never been 
tested with any other newer version of tomcat since the version 6.0.16. 
I was asked to test the application using the tomcat version 6.0.29. I 
was expceting to see the app working fine and for my surprise, the comet 
part of the application started failing and throwing 
IllegalStateException and NullPointerException.


Thus I went to the tomcat change log and I found that on the version 
6.0.19 there was a change in the comet async close and i am pretty sure 
that this is the part the is failing in my application. During a lot of 
debug sessions, i realized that tomcat was, by itself, recycling all my 
requests/responses and turning them into null objects, so when I was 
manually invoking event.close() i was getting the IllegalStateException 
because the request was nullified by tomcat and when I tried to write 
back to the client I was getting the NullPointerException because my 
response has been nullified as well.


The only way to make my application is avoid closing the event in the 
END event, only in the ERROR event (and all the other ones).


I am not sure this is the bests approach neither a good practice.

Does anyone has any though to share on this?


Thiago

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



RE: Tomcat dies after starting

2010-09-01 Thread Caldarale, Charles R
 From: Wesley Acheson [mailto:wesley.ache...@gmail.com] 
 Subject: Re: Tomcat dies after starting

 Can you put in the beginning of the stack trace?

Nice that the OP cut off the critical information...

Also, the OP should post the server.xml, preferably with comments removed and 
security information obfuscated, and let us know if APR is being used.

 (you probably won't be able to bind to port 80 on a linux box)

Of course you can - but you have to use the proper technique, such as starting 
Tomcat via jsvc or using iptables.

 - Chuck


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


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



RE: Slow network with additional Connector (Port) in tomcat

2010-09-01 Thread Caldarale, Charles R
 From: Yoav Naveh [mailto:yoavna...@gmail.com] 
 Subject: Slow network with additional Connector (Port) in tomcat

 I have come across a weird behavior.

Such as not telling us the exact Tomcat level you're using, the JVM version 
it's running in, the platform you're running on, and whether or not you're 
using APR, or anything in the logs that might be pertinent?

 I defined an additional port for my tomcat, by adding 
 an additional connector in the server.xml

So post your server.xml, with comments removed and secure information 
obfuscated, so we can see what you really did.

 - Chuck


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


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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Maximilian Stocker
The version that was being used (using java -version) was an OpenJDK

java version 1.6.0_0
OpenJDK Runtime Environment (IcedTea6 1.6) (rhel-1.13.b16.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

However as a test yesterday the most recent Sun/Oracle version was installed

java version 1.6.0_21
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

But using this version has not proved to fix the problem either.

I also created a very simple test, a WAR with one index.jsp and its own context 
configured with both lock jars and lock resources off. Deployed fine. Still 
failed on undeploy with the same relatively nondescript error message and 
lengthy stack trace.

If anyone has any more suggestions of things to look at I'd be glad to hear 
them. As a next step I am going to attempt to run a standalone program that 
will try and delete a copy of a tomcat unpacked war using the ExpandWar class 
source from 5 and see if I can recreate the problem outside tomcat.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, August 31, 2010 4:58 PM
To: Tomcat Users List
Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

 From: Pid [mailto:p...@pidster.com]
 Subject: Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

 Really?

  JVM - 1.6.0_0-b16 (Sun)

 You can probably find a newer JVM than that

You're saying that just because 1.6.0_0 is approaching the fourth anniversary 
of its release?  And even then it was at build 105, not 16.  At best, b16 was a 
pre-release alpha test level.

Or somebody's been fooling around with the version tag.

 - Chuck


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


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


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



Re: Tomcat dies after starting

2010-09-01 Thread Wesley Acheson
On Wed, Sep 1, 2010 at 3:28 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Wesley Acheson [mailto:wesley.ache...@gmail.com]
 Subject: Re: Tomcat dies after starting

 Of course you can - but you have to use the proper technique, such as 
 starting Tomcat via jsvc or using iptables.

I know that. I was trying to keep it simple. As in if you start what
is the first thing to look at.  You can't bind to port 80 (or any port
below 1024) as a non root user unless you apply a work around.

  - Chuck


Are you happier with that response. I was only trying to help.

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



RE: Tomcat dies after starting

2010-09-01 Thread Caldarale, Charles R
 From: Wesley Acheson [mailto:wesley.ache...@gmail.com] 
 Subject: Re: Tomcat dies after starting

 I know that. I was trying to keep it simple.

The problem with making an unqualified statement is that many people - 
especially inexperienced ones - will take it as an absolute, resulting in 
misconceptions and confusion that might be carried on for years.

 You can't bind to port 80 (or any port below 1024) as a
 non root user unless you apply a work around.

Better, but I wouldn't qualify it as a work-around, just an appropriate 
technique; work-around has the connotation of something temporary.

 - Chuck


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


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



Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Maximilian,

On 9/1/2010 10:08 AM, Maximilian Stocker wrote:
 The version that was being used (using java -version) was an OpenJDK
 
 java version 1.6.0_0
 OpenJDK Runtime Environment (IcedTea6 1.6) (rhel-1.13.b16.el5-x86_64)
 OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

And that was working properly? Many folks have encountered problems
using OpenJDK with Tomcat and their webapps.

 However as a test yesterday the most recent Sun/Oracle version was installed
 
 java version 1.6.0_21
 Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
 Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
 
 But using this version has not proved to fix the problem either.

Ok.

 I also created a very simple test, a WAR with one index.jsp and its
 own context configured with both lock jars and lock resources off.
 Deployed fine. Still failed on undeploy with the same relatively
 nondescript error message and lengthy stack trace.
 
 If anyone has any more suggestions of things to look at I'd be glad
 to hear them. As a next step I am going to attempt to run a
 standalone program that will try and delete a copy of a tomcat
 unpacked war using the ExpandWar class source from 5 and see if I can
 recreate the problem outside tomcat.

I do have an idea: tell us what the full path to your WAR file is. You
said it doesn't matter but it might help to know what it actually was.
Also, giving us more details about the symlink layout might help.

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

iEYEARECAAYFAkx+YxIACgkQ9CaO5/Lv0PC7cgCdF0IAorUrc31g09D2coK2rlzT
i7wAni+RjLEIPnqFmJVsOR6vTk3NDzC3
=ZSjX
-END PGP SIGNATURE-

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



Re: Slow network with additional Connector (Port) in tomcat

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 9/1/2010 9:33 AM, Caldarale, Charles R wrote:
 From: Yoav Naveh [mailto:yoavna...@gmail.com] 
 Subject: Slow network with additional Connector (Port) in tomcat
 
 I have come across a weird behavior.
 
 Such as not telling us the exact Tomcat level you're using, the JVM version 
 it's running in, the platform you're running on, and whether or not you're 
 using APR, or anything in the logs that might be pertinent?
 
 I defined an additional port for my tomcat, by adding 
 an additional connector in the server.xml
 
 So post your server.xml, with comments removed and secure information 
 obfuscated, so we can see what you really did.

It would also help to know what other network components are in place:
software/hardware firewall, any iptables routing, reverse DNS settings,
etc. Also, is the test client always on the same host?

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

iEYEARECAAYFAkx+ZToACgkQ9CaO5/Lv0PAYiACgjYDJVtNVStcoUijm/Qp8XQtP
WAEAnR9AABDved7jrN1NT3uiku8/dsrr
=HGNw
-END PGP SIGNATURE-

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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

 And that was working properly? Many folks have encountered
 problems using OpenJDK with Tomcat and their webapps.

I don't think that's true; the problems are with gcj, not OpenJDK.  OpenJDK is 
almost identical to the Sun download, with the exception of a few (mostly 
graphics) packages whose licenses do not permit them to be open-sourced.

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



Re: iCal4j and ThreadLocal

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bill,

On 8/31/2010 4:49 PM, Bill Davidson wrote:
 On 8/31/2010 12:16 PM, Christopher Schultz wrote:
 Or, just remove the ThreadLocal manually. Since you know it's name, it
 should be easy to remove. There are two obvious ways to remove these
 ThreadLocals in a webapp:

 1. Modify all the code that uses the iCal4j library so that, after
 performing it's iCal4j operations, you manually remove the ThreadLocals.

 
 I don't understand how to do that.  I have local objects that I create from
 the library.  Once I'm done with them, they go out of scope and are given
 to the garbage collector.  However, the ThreadLocal's are static to the
 class, and the library offers no way to access them.  Is there some way to
 find them?
 
 Hmm, now that I think about it, Tomcat found them.  I guess I should
 look at the Tomcat source.

The most convenient thing would be for the library author to provide a
cleanup method. Tomcat uses reflective tricks to probe the ThreadLocal
map and purge it.

 2. Write a Filter that removes any ThreadLocals once the request has
 been completed.
 
 Again, I'm not sure how to do that.

Once you figure out how to do the above, writing a Filter is simple:
just implement the javax.servlet.Filter interface and configure your
class in web.xml. Your doFilter method just includes whatever code
works above.

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

iEYEARECAAYFAkx+aToACgkQ9CaO5/Lv0PAU8ACZAcSQ0I+ZuGMaHwNfzTP90CuX
/10AoIxYnF4xon31W8dqd8mC/ieYZEKi
=ktUb
-END PGP SIGNATURE-

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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Maximilian Stocker
The previous Java was a different (older) build of openjdk and yes was working 
properly for months.

I am not entirely sure when you say full path to WAR what you are looking for 
so I am going to list all the information.

Before deploying my last test project the war was in two places (I tried both). 
On my local system and uploaded through the manager and on the target machine 
in my home directory.

So I deployed using the upload and I also tried to deploy by specifying the 
path to the WAR locally. Both of these deployments worked.

At that point I have the following

/usr/share/tomcat5

Contains the below

work - /var/cache/tomcat5/work
webapps - /var/lib/tomcat5/webapps
temp - /var/cache/tomcat5/work
shared - /var/lib/tomcat5/shared
server - /var/lib/tomcat5/server
logs - /var/log/tomcat5
conf - /etc/tomcat5
common - /var/lib/tomcat5/webapps
bin

In webapps for the war in question I have the following

A war file called maxtest.war and a directory called maxtest.

So the path would be

/var/lib/tomcat5/webapps/maxtest.war
or
/usr/share/tomcat5/webapps/maxtest.war

Both of these have rwxrwxr-x for permissions and the owner and group is tomcat. 
And again this directory layout was unchanged since it worked and it was 
working since at least sometime last fall (I wasn't here before then so I can't 
speak to that)

If I try and undeploy I get the error message previously described, in the log 
I can see the stack trace and in the webapps directory I will see that the WAR 
file has been deleted but the directory and all its contents are intact.

In this case after the undeploy the maxtest directory contains

META-INF/context.xml
META-INF/MANIFEST.MF
WEB-INF/web.xml
WEB-INF/classes (empty directory)
WEB-INF/lib (empty directory)
Index.jsp

In the case of any of the existing projects that actually have classes and libs 
they will still all be in these directories rather than empty.

If this is not the information that you are looking for can you please try and 
restate and I will get it for you.
-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, September 01, 2010 10:29 AM
To: Tomcat Users List
Subject: Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Maximilian,

On 9/1/2010 10:08 AM, Maximilian Stocker wrote:
 The version that was being used (using java -version) was an OpenJDK

 java version 1.6.0_0
 OpenJDK Runtime Environment (IcedTea6 1.6) (rhel-1.13.b16.el5-x86_64)
 OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

And that was working properly? Many folks have encountered problems
using OpenJDK with Tomcat and their webapps.

 However as a test yesterday the most recent Sun/Oracle version was installed

 java version 1.6.0_21
 Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
 Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

 But using this version has not proved to fix the problem either.

Ok.

 I also created a very simple test, a WAR with one index.jsp and its
 own context configured with both lock jars and lock resources off.
 Deployed fine. Still failed on undeploy with the same relatively
 nondescript error message and lengthy stack trace.

 If anyone has any more suggestions of things to look at I'd be glad
 to hear them. As a next step I am going to attempt to run a
 standalone program that will try and delete a copy of a tomcat
 unpacked war using the ExpandWar class source from 5 and see if I can
 recreate the problem outside tomcat.

I do have an idea: tell us what the full path to your WAR file is. You
said it doesn't matter but it might help to know what it actually was.
Also, giving us more details about the symlink layout might help.

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

iEYEARECAAYFAkx+YxIACgkQ9CaO5/Lv0PC7cgCdF0IAorUrc31g09D2coK2rlzT
i7wAni+RjLEIPnqFmJVsOR6vTk3NDzC3
=ZSjX
-END PGP SIGNATURE-

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


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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Caldarale, Charles R
 From: Maximilian Stocker [mailto:m...@talentoyster.com] 
 Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

 work - /var/cache/tomcat5/work
 temp - /var/cache/tomcat5/work

That's a bit scary - those should be separate directories.  I have no idea what 
happens when they're co-located.

 In webapps for the war in question I have the following

 A war file called maxtest.war and a directory called maxtest.

Did you explicitly create the maxtest directory, or did Tomcat do so as a 
result of deployment?

 I will see that the WAR file has been deleted but the directory 
 and all its contents are intact.

Just for verification: Are there any further symbolic links underneath the 
maxtest directory?

Have you run fsck lately?  This is still looking like a loop in the directory 
structure.

 - Chuck


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


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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Maximilian Stocker
Sorry temp is linked to temp. That was a copy and paste error from the shell to 
email on my part. I just double checked what I had sent and it is the only one 
I made a mistake on.

It is

Temp - /var/chache/tomcat5/temp

Again sorry about that.

Tomcat created the directory as a result of the deployment.

There are no symbolic links in maxtest. And I looked through the other project 
directories and cannot find any symbolic links there.

I don't know about fsck (as in when it was run) but will look into that now.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Wednesday, September 01, 2010 11:19 AM
To: Tomcat Users List
Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

 From: Maximilian Stocker [mailto:m...@talentoyster.com]
 Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

 work - /var/cache/tomcat5/work
 temp - /var/cache/tomcat5/work

That's a bit scary - those should be separate directories.  I have no idea what 
happens when they're co-located.

 In webapps for the war in question I have the following

 A war file called maxtest.war and a directory called maxtest.

Did you explicitly create the maxtest directory, or did Tomcat do so as a 
result of deployment?

 I will see that the WAR file has been deleted but the directory
 and all its contents are intact.

Just for verification: Are there any further symbolic links underneath the 
maxtest directory?

Have you run fsck lately?  This is still looking like a loop in the directory 
structure.

 - Chuck


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


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


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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Maximilian Stocker
Sorry multiple typos. I am just going to paste the whole ls -lr output here

lrwxrwxrwx 1 root   root   23 Aug 27 15:53 work - /var/cache/tomcat5/work
lrwxrwxrwx 1 root   root   24 Aug 27 15:53 webapps -/var/lib/tomcat5/webapps
lrwxrwxrwx 1 root   root   23 Aug 27 15:53 temp - /var/cache/tomcat5/temp
lrwxrwxrwx 1 root   root   23 Aug 27 15:53 shared - /var/lib/tomcat5/shared
lrwxrwxrwx 1 root   root   23 Aug 27 15:53 server - /var/lib/tomcat5/server
lrwxrwxrwx 1 root   root   16 Aug 27 15:53 logs - /var/log/tomcat5
lrwxrwxrwx 1 root   root   12 Aug 27 15:53 conf - /etc/tomcat5
lrwxrwxrwx 1 root   root   23 Aug 27 15:53 common - /var/lib/tomcat5/common
drwxr-xr-x 2 root   root 4096 Aug 27 15:53 bin

-Original Message-
From: Maximilian Stocker [mailto:m...@talentoyster.com]
Sent: Wednesday, September 01, 2010 11:39 AM
To: 'Tomcat Users List'
Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

Sorry temp is linked to temp. That was a copy and paste error from the shell to 
email on my part. I just double checked what I had sent and it is the only one 
I made a mistake on.

It is

Temp - /var/chache/tomcat5/temp

Again sorry about that.

Tomcat created the directory as a result of the deployment.

There are no symbolic links in maxtest. And I looked through the other project 
directories and cannot find any symbolic links there.

I don't know about fsck (as in when it was run) but will look into that now.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Wednesday, September 01, 2010 11:19 AM
To: Tomcat Users List
Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

 From: Maximilian Stocker [mailto:m...@talentoyster.com]
 Subject: RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

 work - /var/cache/tomcat5/work
 temp - /var/cache/tomcat5/work

That's a bit scary - those should be separate directories.  I have no idea what 
happens when they're co-located.

 In webapps for the war in question I have the following

 A war file called maxtest.war and a directory called maxtest.

Did you explicitly create the maxtest directory, or did Tomcat do so as a 
result of deployment?

 I will see that the WAR file has been deleted but the directory
 and all its contents are intact.

Just for verification: Are there any further symbolic links underneath the 
maxtest directory?

Have you run fsck lately?  This is still looking like a loop in the directory 
structure.

 - Chuck


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


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


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


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



Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 9/1/2010 10:53 AM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: undeploy failure - stack overflow tomcat 5 on RHEL 5
 
 And that was working properly? Many folks have encountered problems
 using OpenJDK with Tomcat and their webapps.
 
 I don't think that's true; the problems are with gcj, not OpenJDK.
 OpenJDK is almost identical to the Sun download, with the exception
 of a few (mostly graphics) packages whose licenses do not permit them
 to be open-sourced.

I definitely misspoke: I was thinking gcj, not OpenJDK.

Thanks for the clarification.

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

iEYEARECAAYFAkx+gO4ACgkQ9CaO5/Lv0PA7zgCfbvEjmAnvNHlY3EvRUgz75K3y
Dq8An286+xCn90rbKWT1kAkUusGWwjsp
=3RjE
-END PGP SIGNATURE-

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



RE: undeploy failure - stack overflow tomcat 5 on RHEL 5

2010-09-01 Thread Maximilian Stocker
I finally found some others with the same issue (and the same stackoverflow)

https://jira.jboss.org/browse/JBPAPP-3753

The workaround to unpackWAR=false mentioned by the last commenter does 
resolve it at least temporarily for me at least.

Looking at the stack trace posted there, I have a little bit of difference at 
the top but from the stackoverflow error on it's the same, including the 
ExpandWar.delete calls (although it is a different source slightly - different 
line numbers)

At any rate this topic is sort of closed for me. It's not just my setup 
whatever the problem is and I have it working, if less than ideally now.

Thanks for the suggestions etc.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, September 01, 2010 12:36 PM
To: Tomcat Users List
Subject: Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 9/1/2010 10:53 AM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: undeploy failure - stack overflow tomcat 5 on RHEL 5

 And that was working properly? Many folks have encountered problems
 using OpenJDK with Tomcat and their webapps.

 I don't think that's true; the problems are with gcj, not OpenJDK.
 OpenJDK is almost identical to the Sun download, with the exception
 of a few (mostly graphics) packages whose licenses do not permit them
 to be open-sourced.

I definitely misspoke: I was thinking gcj, not OpenJDK.

Thanks for the clarification.

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

iEYEARECAAYFAkx+gO4ACgkQ9CaO5/Lv0PA7zgCfbvEjmAnvNHlY3EvRUgz75K3y
Dq8An286+xCn90rbKWT1kAkUusGWwjsp
=3RjE
-END PGP SIGNATURE-

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


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



Question on SSI

2010-09-01 Thread Marc Chamberlin
 Hello -  I am running a Tomcat6.0 server both stand-alone and with 
Eclipse, and am in the process of developing a webapp that I will want 
to make available to all our users via a server side include statement. 
I have this working in a limited sense, in that I got it working using 
the filter version but was unsuccessful getting the servlet version 
working, which is acceptable. (I am not clear on what the real 
difference between the two approaches is, documentation is non-existent 
as far as I could find).


Anywise, what I have working, works so long as the !--#include 
virtual=somefile.html -- is in a .shtml file, but this will be 
unacceptable. I need this feature to also work from inside normal .html 
and .htm as well as .jsp files as that is what our users will expect. I 
have fooled around with the filter-mapping segment in the server's 
web.xml file but so far no joy in finding a solution.


Searches (lots of em!) on the internet have not provided me with an 
answer, though I have gotten hints that it is doable.  Could some kind 
guru help me grok this and guide me to the light?  Many thanks in 
advance


Marc Chamberlin



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



Re: Question on SSI

2010-09-01 Thread Wesley Acheson
On Wed, Sep 1, 2010 at 10:13 PM, Marc Chamberlin
m...@marcchamberlin.com wrote:
  Hello -  I am running a Tomcat6.0 server both stand-alone and with Eclipse,
 and am in the process of developing a webapp that I will want to make
 available to all our users via a server side include statement. I have this
 working in a limited sense, in that I got it working using the filter
 version but was unsuccessful getting the servlet version working, which is
 acceptable. (I am not clear on what the real difference between the two
 approaches is, documentation is non-existent as far as I could find).

 Anywise, what I have working, works so long as the !--#include
 virtual=somefile.html -- is in a .shtml file, but this will be
 unacceptable. I need this feature to also work from inside normal .html and
 .htm as well as .jsp files as that is what our users will expect. I have
 fooled around with the filter-mapping segment in the server's web.xml file
 but so far no joy in finding a solution.

Have you tried modifying this section?

filter-mapping
filter-namessi/filter-name
url-pattern*.shtml/url-pattern
/filter-mapping


To look more like this

filter-mapping
filter-namessi/filter-name
url-pattern*/url-pattern
/filter-mapping

Also change the section
init-param
  param-namecontentType/param-name
  param-valuetext/x-server-parsed-html(;.*)?/param-value
/init-param

The param-value must be a regular expression that will meet the
following mime types
text/x-server-parsed-html or text/html. My regular expressions aren't
great so I'll leave that for an exercise.

I think this should work with html and htm. I'm not so sure about JSP,
hopefully someone else can clear this up.

Note there is an overhead with scanning all your files for SSI
comments but I don't think it should be too bad. Again someone more
experienced should be able to answer.

 Searches (lots of em!) on the internet have not provided me with an answer,
 though I have gotten hints that it is doable.  Could some kind guru help me
 grok this and guide me to the light?  Many thanks in advance

    Marc Chamberlin


Note I got this info from reading the web.xml that came with tomcat 6
it may be different depending on your version.

Regards,

Wes

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



Re: Question on SSI

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc,

On 9/1/2010 4:13 PM, Marc Chamberlin wrote:
  Hello -  I am running a Tomcat6.0 server both stand-alone and with
 Eclipse, and am in the process of developing a webapp that I will want
 to make available to all our users via a server side include statement.

Uhh... you want the webapp to be available via SSI? I'm pretty sure
that's the problem of whoever wants to use your service. You can't
configure SSI on someone else's site. Maybe I'm misunderstanding you.

 I have this working in a limited sense, in that I got it working using
 the filter version but was unsuccessful getting the servlet version
 working, which is acceptable. (I am not clear on what the real
 difference between the two approaches is, documentation is non-existent
 as far as I could find).

Do http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html and
http://httpd.apache.org/docs/current/howto/ssi.html#basic count as
non-existent? Or were you thinking of more involved documentation?

 Anywise, what I have working, works so long as the !--#include
 virtual=somefile.html -- is in a .shtml file, but this will be
 unacceptable. I need this feature to also work from inside normal .html
 and .htm as well as .jsp files as that is what our users will expect. I
 have fooled around with the filter-mapping segment in the server's
 web.xml file but so far no joy in finding a solution.

You will have to use filter mapping in order to post-process your .jsp
and other dynamic pages: a servlet can't be wrapped around another
servlet (such as the JSPServlet, which you don't have to map yourself)
for this kind of thing. So, stick with the filter.

 Searches (lots of em!) on the internet have not provided me with an
 answer, though I have gotten hints that it is doable.  Could some kind
 guru help me grok this and guide me to the light?  Many thanks in
 advance

What is the complete configuration for your filter and
filter-mapping for the aforementioned filter? It should be as simple
as setting up multiple url-patterns for the URL patterns that you want
to have run through the SSI filter.

Note that you should be able to set up SSI in a single webapp instead of
modifying the conf/web.xml file as described in the SSI documentation. I
find this cleaner, as you will only end up making SSI available in a
specific webapp instead of across all webapps deployed onto the server.
The filter-mapping itself should definitely only be included in your
webapp's META-INF/web.xml file.

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

iEYEARECAAYFAkx+vFYACgkQ9CaO5/Lv0PC4OwCdH4LC/EJ6BWOtTsTY+8/hkl5R
4iYAninNnCDU4foqXS+od3Z9LVTxJzmo
=ceu5
-END PGP SIGNATURE-

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



FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol


Hi, folks, I am using apache's fileupload jar in a couple of webapps, 
and one of them just started throwing this exception when the user tries 
to upload an image bigger than 1 meg.


org.apache.commons.fileuploa
d.FileUploadBase$IOFileUploadException: Processing of 
multipart/form-data request failed. /upload__529be8aa_12acec7e12c__8000_000

0.tmp (Permission denied)

Directory permissions are set correctly.

Has anyone encountered and solved a similar problem?

Thanks,
Paul

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



Re: Question on SSI

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wesley,

On 9/1/2010 4:46 PM, Wesley Acheson wrote:
 filter-mapping
 filter-namessi/filter-name
 url-pattern*/url-pattern
 /filter-mapping

That may be casting the net a bit wide, but, of course, it's all up to
whatever Marc's requirements are.

 Also change the section
 init-param
   param-namecontentType/param-name
   param-valuetext/x-server-parsed-html(;.*)?/param-value
 /init-param
 
 The param-value must be a regular expression that will meet the
 following mime types
 text/x-server-parsed-html or text/html.

The above doesn't allow text/html... it would have to be modified to
allow content types other than text/x-server-parsed-html.

 I think this should work with html and htm. I'm not so sure about JSP,
 hopefully someone else can clear this up.

It should work with any kind of resource.

 Note there is an overhead with scanning all your files for SSI
 comments but I don't think it should be too bad. Again someone more
 experienced should be able to answer.

It's not just scanning the files for SSI directives: the entire output
generated by the primary resource (say, a .html or .jsp file) has to be
buffered in memory in order for the SSI processor to do it's job. I
would say this buffering is worse for performance and resource
management than simply scanning for SSI directives.

I wonder why the SSI processor isn't set up to do dynamic filtering. Hmm.

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

iEYEARECAAYFAkx+vXUACgkQ9CaO5/Lv0PCqogCgi5HePghUIgdhBBxoD4vXL0SE
484AoIy0drXieyypVChyWKlMc3aqu49v
=kGdS
-END PGP SIGNATURE-

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



FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol



Hi, folks, I am using apache's fileupload jar in a couple of webapps, 
and one of them just started throwing this exception when the user tries 
to upload an image bigger than 1 meg.


org.apache.commons.fileuploa
d.FileUploadBase$IOFileUploadException: Processing of 
multipart/form-data request failed. /upload__529be8aa_12acec7e12c__8000_000

0.tmp (Permission denied)

Directory permissions are set correctly.

Has anyone encountered and solved a similar problem?

Thanks,
Paul


Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Wesley Acheson
Hi Paul

Check the maxPost size on your connector. Also that libary may be
trying to read/write to an area of disk that It isn't able to. Also
the FileUpload has its own limits on file size.

Have you looked at http://commons.apache.org/fileupload/using.html?

Regards,

Wes

On Wed, Sep 1, 2010 at 10:53 PM, Paul Szynol pj...@columbia.edu wrote:

 Hi, folks, I am using apache's fileupload jar in a couple of webapps, and
 one of them just started throwing this exception when the user tries to
 upload an image bigger than 1 meg.

 org.apache.commons.fileuploa
 d.FileUploadBase$IOFileUploadException: Processing of multipart/form-data
 request failed. /upload__529be8aa_12acec7e12c__8000_000
 0.tmp (Permission denied)

 Directory permissions are set correctly.

 Has anyone encountered and solved a similar problem?

 Thanks,
 Paul

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



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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Pid
On 01/09/2010 22:04, Paul Szynol wrote:
 
 
 Hi, folks, I am using apache's fileupload jar in a couple of webapps,
 and one of them just started throwing this exception when the user tries
 to upload an image bigger than 1 meg.
 
 org.apache.commons.fileuploa
 d.FileUploadBase$IOFileUploadException: Processing of
 multipart/form-data request failed. /upload__529be8aa_12acec7e12c__8000_000
 0.tmp (Permission denied)

I'm not tremendously familiar with the error messages generated by
fileupload, but there is a configurable limit to the size of file which
can be uploaded.

Have you set this limit manually?

Can you post the full stacktrace rather than a small segment?


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Questions about Server Side Includes (SSI) implementation

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

In responding to Marc's recent Question about SSI post, I was
wondering a couple of things about the implementation. If anyone who can
provide some illumination, I'd appreciate it.

First, the SSI Filter is implemented as a buffer-then-process filter,
rather than setting up the SSI processor to do pipelined processing. By
that, I mean that the original resource is fetched into a buffer and
then processed start-to-finish, rather than wrapping the response's
output stream and allowing the SSI processor to run /during/ the
generation of content by the original resource.

Was this done for performance reasons? I'd imagine that you might
hold-up content generation of the original resource (that is, the thing
you get by calling chain.doFilter) if the SSI processor stalls doing
something such as executing an external script or including some other
slow resource. On the other hand, the same thread will be doing all the
work, anyway, so the client doesn't get the bytes any faster either way.
The only difference seems to be that the current strategy requires a
potentially large buffer to hold the entire contents of the original
resource, plus a potentially large buffer to hold the post-SSI-processed
output.

I have to imagine that a parallel SSI processor configuration could
avoid these potentially large buffers without degrading performance: a
win-win.

Complications arise, of course, because the content type is not
guaranteed to be set when the first byte of output is sent and because
the response might be reset somewhere along the way. I believe these
issues are not deal-breakers. The SSI filter would also not be able to
set the Content-Length header in this case. I'm not sure if that's a
problem or not.

Second, for configurations where the content type of the original
resource is unimportant, it might be nice to avoid the overhead of a
regular expression pattern match. I'd be happy to provide a simple patch
that avoids the pattern match for patterns like .* or .

These were just some thoughts I had while reading-through the SSI filter
code. Any thoughts?

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

iEYEARECAAYFAkx+wk0ACgkQ9CaO5/Lv0PDzvACgueG+qr7XLHibw05zmGNaSwH9
OvMAnAnQqCdKCWb1h8l3GPhk1k25RJYm
=/k06
-END PGP SIGNATURE-

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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

(Thanks for un-hijacking the Question on SSI thread)

On 9/1/2010 5:04 PM, Paul Szynol wrote:
 Hi, folks, I am using apache's fileupload jar in a couple of webapps,
 and one of them just started throwing this exception when the user tries
 to upload an image bigger than 1 meg.

Immediate thought (same as Pid's): check the configured upload file size
limit.

 org.apache.commons.fileuploa
 d.FileUploadBase$IOFileUploadException: Processing of
 multipart/form-data request failed. /upload__529be8aa_12acec7e12c__8000_000
 0.tmp (Permission denied)

Second thought: permissions error.

 Directory permissions are set correctly.

Sure? Who gets to write into / ?

What is the euid of Tomcat? What are the exact UNIX permissions of / ?
What about any other types of permissions that might be influencing your
ability to write (ACLs, remote filesystems, SELinux, etc.)?

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

iEYEARECAAYFAkx+wxcACgkQ9CaO5/Lv0PDW2gCgw/cmzVB3rMzpaNCNa1cMKEPN
g2UAn3RyO5rswvyP4RkWoRn2nbeCmXBY
=wnPS
-END PGP SIGNATURE-

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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol


Wes, Pid and Chris,

Thanks for writing back so quickly (and sorry about the thread 
hijack--it was unintentional).


Increasing the value of .setSizeThreshold() did the trick.  Thanks for 
pointing me in that direction--I should have sent my question here about 
12 hrs ago! :)


Take care,
Paul



On 9/1/10 5:18 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

(Thanks for un-hijacking the Question on SSI thread)

On 9/1/2010 5:04 PM, Paul Szynol wrote:

Hi, folks, I am using apache's fileupload jar in a couple of webapps,
and one of them just started throwing this exception when the user tries
to upload an image bigger than 1 meg.

Immediate thought (same as Pid's): check the configured upload file size
limit.


org.apache.commons.fileuploa
d.FileUploadBase$IOFileUploadException: Processing of
multipart/form-data request failed. /upload__529be8aa_12acec7e12c__8000_000
0.tmp (Permission denied)

Second thought: permissions error.


Directory permissions are set correctly.

Sure? Who gets to write into / ?

What is the euid of Tomcat? What are the exact UNIX permissions of / ?
What about any other types of permissions that might be influencing your
ability to write (ACLs, remote filesystems, SELinux, etc.)?

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

iEYEARECAAYFAkx+wxcACgkQ9CaO5/Lv0PDW2gCgw/cmzVB3rMzpaNCNa1cMKEPN
g2UAn3RyO5rswvyP4RkWoRn2nbeCmXBY
=wnPS
-END PGP SIGNATURE-

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




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



META - Thread Hijacking

2010-09-01 Thread Wesley Acheson
I've seen complaints about thread hijacking but I always see them as
different threads in my mail client. (Gmail) should I be using
different software to subscribe to the list I think I've replied to
them (threadjacks) a few times :S

Wes

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



RE: META - Thread Hijacking

2010-09-01 Thread Caldarale, Charles R
 From: Wesley Acheson [mailto:wesley.ache...@gmail.com] 
 Subject: META - Thread Hijacking

 I've seen complaints about thread hijacking but I always see 
 them as different threads in my mail client.

Newer e-mail readers tend to ignore much of the SMTP header information and use 
the subject line to organize messages instead.  (I suspect this came about due 
to Microsoft's e-mail clients blatently violating the relevant RFCs - again.)  
People with traditional clients that actually follow the rules can get 
unrelated messages lumped together.

 should I be using different software to subscribe 
 to the list

Probably not.

 I think I've replied to them (threadjacks) a few times :S

As we all have.

 - Chuck


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


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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 9/1/2010 5:28 PM, Paul Szynol wrote:
 Increasing the value of .setSizeThreshold() did the trick.  Thanks for
 pointing me in that direction--I should have sent my question here about
 12 hrs ago! :)

Strange that you get Permission Denied instead of some other exception.
If you are up-to-date on commons fileupload, you might suggest that they
change their error message to make it easier to understand why the error
is occurring.

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

iEYEARECAAYFAkx+zNwACgkQ9CaO5/Lv0PAYrACfaKbXoZ47sADRvCuxYIcGbBC6
jJkAoISByEJPau4o78H43Q4yC2jCULjn
=DZ6s
-END PGP SIGNATURE-

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



Re: META - Thread Hijacking

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wesley,

On 9/1/2010 5:39 PM, Wesley Acheson wrote:
 I've seen complaints about thread hijacking but I always see them as
 different threads in my mail client. (Gmail) should I be using
 different software to subscribe to the list I think I've replied to
 them (threadjacks) a few times :S

As Chuck points out, lots of mail readers have started using only the
message subject as the thread identifier. This isn't really a good idea
because sometimes the subject changes (because someone corrects a
spelling mistake, or the subject becomes RE: [whatever] or AW:
[whatever] or modified in some other way) and not all messages with the
same subject (i needz teh helpzorz) are necessarily related.

My mail reader, Mozilla Thunderbird, (used to?) defaults to this
message-subject-is-thread-id behavior. I decided to disable it and have
tb follow the SMTP header that was designed to maintain message thread
identity. (It looks like the right way is now the default. I was sure
I had to change it. Oh well.)

In the end, it's mostly up to the user's own personal preference which
way things should go. Those of us whose mail clients respect the
thread-id in the SMTP headers can see immediately when someone hijacks a
thread. Those folks have nowhere to hide: the SMTP headers do not lie. :)

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

iEYEARECAAYFAkx+zmIACgkQ9CaO5/Lv0PAgOgCglGy3Tquf0KkwWEzUrDSGnfaJ
n4gAn0CDnX0gU5zqwoK7baejP4H3jPak
=+XRK
-END PGP SIGNATURE-

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



RE: Help with Tomcat 6.0.29 and Comet

2010-09-01 Thread Caldarale, Charles R
 From: Thiago Locatelli da Silva [mailto:thiago.si...@digitro.com.br] 
 Subject: Help with Tomcat 6.0.29 and Comet

 The only way to make my application is avoid closing the event in
 the END event, only in the ERROR event (and all the other ones).

 I am not sure this is the bests approach neither a good practice.

 Does anyone has any though to share on this?

Even though you've posted this exact same message three times, no one has 
answered, probably because no one on the list at the moment knows the answer.  
As I recall, the Comet expert is off on National Guard duty for a bit, and he's 
the one that is best suited to deal with this.

 - Chuck


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


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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol


Chris, I agree.  Exceeds threshold size or something along those lines 
would be a lot more helpful.

Paul

On 9/1/10 5:59 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 9/1/2010 5:28 PM, Paul Szynol wrote:

Increasing the value of .setSizeThreshold() did the trick.  Thanks for
pointing me in that direction--I should have sent my question here about
12 hrs ago! :)

Strange that you get Permission Denied instead of some other exception.
If you are up-to-date on commons fileupload, you might suggest that they
change their error message to make it easier to understand why the error
is occurring.

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

iEYEARECAAYFAkx+zNwACgkQ9CaO5/Lv0PAYrACfaKbXoZ47sADRvCuxYIcGbBC6
jJkAoISByEJPau4o78H43Q4yC2jCULjn
=DZ6s
-END PGP SIGNATURE-

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




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



Re: Question on SSI

2010-09-01 Thread Marc Chamberlin

 On 9/1/2010 1:46 PM, Wesley Acheson wrote:

On Wed, Sep 1, 2010 at 10:13 PM, Marc Chamberlin
m...@marcchamberlin.com  wrote:
Have you tried modifying this section?

 filter-mapping
 filter-namessi/filter-name
 url-pattern*.shtml/url-pattern
 /filter-mapping


To look more like this

 filter-mapping
 filter-namessi/filter-name
 url-pattern*/url-pattern
 /filter-mapping
Thanks Wesley for taking the time to answer, much appreciated!  Yes, I 
have tried this filter mapping / url-pattern with no joy.  Also have 
tried a url-pattern of *.html and no joy either

Also change the section
 init-param
   param-namecontentType/param-name
   param-valuetext/x-server-parsed-html(;.*)?/param-value
 /init-param

The param-value must be a regular expression that will meet the
following mime types
text/x-server-parsed-html or text/html. My regular expressions aren't
great so I'll leave that for an exercise.
Yeah, neither are mine ;-) ...  The trouble with reg expressions is that 
there are a lot of variants and documentation does not clarify just 
whose reg expr parser is being used. I usually assume GNU, but been bit 
so many times by that assumption that I can never be sure.  So I don't 
know how to modify this either

I think this should work with html and htm. I'm not so sure about JSP,
hopefully someone else can clear this up.

Note there is an overhead with scanning all your files for SSI
comments but I don't think it should be too bad. Again someone more
experienced should be able to answer.

Searches (lots of em!) on the internet have not provided me with an answer,
though I have gotten hints that it is doable.  Could some kind guru help me
grok this and guide me to the light?  Many thanks in advance

Marc Chamberlin



Note I got this info from reading the web.xml that came with tomcat 6
it may be different depending on your version.

Yeah I read, but did not grok...   Marc..


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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Konstantin Kolinko
AFAIK, the said threshold determines when a file is too big to be hold
in memory and should be written to disk.  So, I think that Permission
denied actually comes from your file system.  You have to read the
docs (or the source code), but I guess that it tries to write to
${catalina.base}/temp (aka $CATALINA_TMPDIR, aka java.io.tmpdir ).

Best regards,
Konstantin Kolinko

2010/9/2 Paul Szynol pj...@columbia.edu:

 Chris, I agree.  Exceeds threshold size or something along those lines
 would be a lot more helpful.
 Paul

 On 9/1/10 5:59 PM, Christopher Schultz wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Paul,

 On 9/1/2010 5:28 PM, Paul Szynol wrote:

 Increasing the value of .setSizeThreshold() did the trick.  Thanks for
 pointing me in that direction--I should have sent my question here about
 12 hrs ago! :)

 Strange that you get Permission Denied instead of some other exception.
 If you are up-to-date on commons fileupload, you might suggest that they
 change their error message to make it easier to understand why the error
 is occurring.

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

 iEYEARECAAYFAkx+zNwACgkQ9CaO5/Lv0PAYrACfaKbXoZ47sADRvCuxYIcGbBC6
 jJkAoISByEJPau4o78H43Q4yC2jCULjn
 =DZ6s
 -END PGP SIGNATURE-

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



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



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



Re: META - Thread Hijacking

2010-09-01 Thread Len Popp
On Wed, Sep 1, 2010 at 18:06, Christopher Schultz
ch...@christopherschultz.net wrote:
 In the end, it's mostly up to the user's own personal preference which
 way things should go. Those of us whose mail clients respect the
 thread-id in the SMTP headers can see immediately when someone hijacks a
 thread. Those folks have nowhere to hide: the SMTP headers do not lie. :)

I suggest that complaints about hijacked threads should be sent to the
person directly instead of spamming the whole list.
(The complaints seem especially pointless to me because, ironically,
the threads never looked hijacked to me!)
--
Len

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



RE: META - Thread Hijacking

2010-09-01 Thread George Sexton
It's a religious issue; it's like top-posting versus bottom posting. The thing 
to do is be tolerant of the opposing side. Because it's a religious issue you 
will never convert them to your point of view.


George Sexton
MH Software, Inc.
303 438-9585
www.mhsoftware.com


 -Original Message-
 From: Len Popp [mailto:len.p...@gmail.com]
 Sent: Wednesday, September 01, 2010 4:28 PM
 To: Tomcat Users List
 Subject: Re: META - Thread Hijacking
 
 On Wed, Sep 1, 2010 at 18:06, Christopher Schultz
 ch...@christopherschultz.net wrote:
  In the end, it's mostly up to the user's own personal preference
 which
  way things should go. Those of us whose mail clients respect the
  thread-id in the SMTP headers can see immediately when someone
 hijacks a
  thread. Those folks have nowhere to hide: the SMTP headers do not
 lie. :)
 
 I suggest that complaints about hijacked threads should be sent to the
 person directly instead of spamming the whole list.
 (The complaints seem especially pointless to me because, ironically,
 the threads never looked hijacked to me!)
 --
 Len
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



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



Re: Question on SSI

2010-09-01 Thread Wesley Acheson
On Thu, Sep 2, 2010 at 12:24 AM, Marc Chamberlin
m...@marcchamberlin.com wrote:
  On 9/1/2010 1:46 PM, Wesley Acheson wrote:

 On Wed, Sep 1, 2010 at 10:13 PM, Marc Chamberlin
 m...@marcchamberlin.com  wrote:
 Have you tried modifying this section?

     filter-mapping
         filter-namessi/filter-name
         url-pattern*.shtml/url-pattern
     /filter-mapping


 To look more like this

     filter-mapping
         filter-namessi/filter-name
         url-pattern*/url-pattern
     /filter-mapping

 Thanks Wesley for taking the time to answer, much appreciated!  Yes, I have
 tried this filter mapping / url-pattern with no joy.  Also have tried a
 url-pattern of *.html and no joy either

 Also change the section
         init-param
           param-namecontentType/param-name
           param-valuetext/x-server-parsed-html(;.*)?/param-value
         /init-param

 The param-value must be a regular expression that will meet the
 following mime types
 text/x-server-parsed-html or text/html. My regular expressions aren't
 great so I'll leave that for an exercise.

Hi Marc,

Okay the suggestion was to do these two changes in conjunction with
one another as I understand it the mapping says what URLS this is
applied on and the init-param says what the mime type has to be.

To test simply, just to see if we are on the right track try chaning
the filter-mapping as above, but change

 init-param
   param-namecontentType/param-name
   param-valuetext/x-server-parsed-html(;.*)?/param-value
 /init-param

to

 init-param
   param-namecontentType/param-name
   param-valuetext/html(;.*)?/param-value
 /init-param

And test it on a html page. If I'm right it will work but shtml won't.
 Really need a regularexpression writer.

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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol


Hey, Konstantin,

The file system allows me to write the bigger image if I just increase 
the threshold size, though, so the file system is allowing the larger 
images.  That suggests to me that the exception is being thrown solely 
when the image size exceeds the threshold size value.  I read the 
exception to mean something like I can't write this tmp file because it 
is bigger than the threshold size value, rather than I can't write 
this tmp file because the file system won't let me.


Paul

On 9/1/10 6:26 PM, Konstantin Kolinko wrote:

AFAIK, the said threshold determines when a file is too big to be hold
in memory and should be written to disk.  So, I think that Permission
denied actually comes from your file system.  You have to read the
docs (or the source code), but I guess that it tries to write to
${catalina.base}/temp (aka $CATALINA_TMPDIR, aka java.io.tmpdir ).

Best regards,
Konstantin Kolinko

2010/9/2 Paul Szynolpj...@columbia.edu:

Chris, I agree.  Exceeds threshold size or something along those lines
would be a lot more helpful.
Paul

On 9/1/10 5:59 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 9/1/2010 5:28 PM, Paul Szynol wrote:

Increasing the value of .setSizeThreshold() did the trick.  Thanks for
pointing me in that direction--I should have sent my question here about
12 hrs ago! :)

Strange that you get Permission Denied instead of some other exception.
If you are up-to-date on commons fileupload, you might suggest that they
change their error message to make it easier to understand why the error
is occurring.

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

iEYEARECAAYFAkx+zNwACgkQ9CaO5/Lv0PAYrACfaKbXoZ47sADRvCuxYIcGbBC6
jJkAoISByEJPau4o78H43Q4yC2jCULjn
=DZ6s
-END PGP SIGNATURE-

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



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



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




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



Re: Question on SSI

2010-09-01 Thread Marc Chamberlin

 On 9/1/2010 1:49 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc,

On 9/1/2010 4:13 PM, Marc Chamberlin wrote:

  Hello -  I am running a Tomcat6.0 server both stand-alone and with
Eclipse, and am in the process of developing a webapp that I will want
to make available to all our users via a server side include statement.

Uhh... you want the webapp to be available via SSI? I'm pretty sure
that's the problem of whoever wants to use your service. You can't
configure SSI on someone else's site. Maybe I'm misunderstanding you.
Thanks Christopher for your taking the time to reply, again much 
appreciated! What I am trying to accomplish is to provide users with 
some services that can be included on their web pages, simply by 
including a server side include statement, which I will define for them, 
in their web pages. (I run a Tomcat server for a number of users and 
host their websites for them.)

I have this working in a limited sense, in that I got it working using
the filter version but was unsuccessful getting the servlet version
working, which is acceptable. (I am not clear on what the real
difference between the two approaches is, documentation is non-existent
as far as I could find).

Do http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html and
http://httpd.apache.org/docs/current/howto/ssi.html#basic count as
non-existent? Or were you thinking of more involved documentation?
Yes, I read both of these documents, as well as a bunch of others! ;-)  
The documentation was not detailed enough for me to grok and solve this 
problem on my own

Anywise, what I have working, works so long as the!--#include
virtual=somefile.html --  is in a .shtml file, but this will be
unacceptable. I need this feature to also work from inside normal .html
and .htm as well as .jsp files as that is what our users will expect. I
have fooled around with the filter-mapping segment in the server's
web.xml file but so far no joy in finding a solution.

You will have to use filter mapping in order to post-process your .jsp
and other dynamic pages: a servlet can't be wrapped around another
servlet (such as the JSPServlet, which you don't have to map yourself)
for this kind of thing. So, stick with the filter.
OK, I kinda gathered that a filter is applied to everything served up by 
the server, before servlets are invoked... So it makes sense that a 
filter has to be used (if I am understanding this correctly) for JSP 
Servlets

Searches (lots of em!) on the internet have not provided me with an
answer, though I have gotten hints that it is doable.  Could some kind
guru help me grok this and guide me to the light?  Many thanks in
advance

What is the complete configuration for yourfilter  and
filter-mapping  for the aforementioned filter? It should be as simple
as setting up multipleurl-patterns for the URL patterns that you want
to have run through the SSI filter.
Umm, well let me include that part of the web.xml file, as it stands at 
the moment, here..  Note: Commented out pieces are from my attempts to 
get this working, so you can see some of the things that I have tried.


filter
filter-namessi/filter-name
filter-class
  org.apache.catalina.ssi.SSIFilter
/filter-class
init-param
param-namecontentType/param-name
param-valuetext/x-server-parsed-html(;.*)?/param-value
/init-param
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
init-param
param-nameexpires/param-name
param-value666/param-value
/init-param
init-param
param-nameisVirtualWebappRelative/param-name
param-value0/param-value
/init-param
/filter



!--  Built In Filter Mappings 
== --


!-- The mapping for the SSI Filter --

filter-mapping
filter-namessi/filter-name
url-pattern*/url-pattern
/filter-mapping

!--
filter-mapping
filter-namessi/filter-name
url-pattern*.shtml/url-pattern
/filter-mapping
--
!--
filter-mapping
filter-namessi/filter-name
url-pattern*.html/url-pattern
/filter-mapping
--
!--
filter-mapping
filter-namessi/filter-name
url-pattern*.shtml/url-pattern
url-pattern*.html/url-pattern
/filter-mapping
--
!--
filter-mapping
filter-namessi/filter-name
url-pattern/*/url-pattern
/filter-mapping
--






Note that you should be able to set up SSI in a single webapp instead of
modifying the conf/web.xml file as described in the SSI documentation. I
find this cleaner, as you will only end up making SSI available in a
specific webapp instead of across all webapps deployed onto the server.
Thefilter-mapping  itself should definitely only be included in your
webapp's META-INF/web.xml file.
Not sure I fully understand you here, so please forgive my lack of 
understanding... I do want this SSI feature to be available across all 
the webapps deployed on our server. As I mentioned previously, we want 
to provide some services that users can access, by simply including a 
server side include statement that will effectively include these 
features 

Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Konstantin Kolinko
2010/9/2 Paul Szynol pj...@columbia.edu:

 Hey, Konstantin,

 The file system allows me to write the bigger image if I just increase the
 threshold size, though, so the file system is allowing the larger images.
  That suggests to me that the exception is being thrown solely when the
 image size exceeds the threshold size value.  I read the exception to mean
 something like I can't write this tmp file because it is bigger than the
 threshold size value, rather than I can't write this tmp file because the
 file system won't let me.


http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html#setSizeThreshold%28int%29

I understand that if you use setSizeThreshold() to increase the
threshold value, the file is not written to disk:

 On 9/1/2010 5:28 PM, Paul Szynol wrote:

 Increasing the value of .setSizeThreshold() did the trick.  Thanks for
 pointing me in that direction--I should have sent my question here
 about
 12 hrs ago! :)


Best regards,
Konstantin Kolinko

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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol


Ah, now I see what you mean.  So the reason the exception isn't being 
thrown when I increase the threshold value is that the image isn't being 
written to disk in the first place.  That makes more sense.  But the odd 
part of it (in my configuration, at least) is that the file permissions 
do allow fileupload to write the file...so, I guess I still don't 
understand what's causing the exception.


On 9/1/10 6:52 PM, Konstantin Kolinko wrote:

2010/9/2 Paul Szynolpj...@columbia.edu:

Hey, Konstantin,

The file system allows me to write the bigger image if I just increase the
threshold size, though, so the file system is allowing the larger images.
  That suggests to me that the exception is being thrown solely when the
image size exceeds the threshold size value.  I read the exception to mean
something like I can't write this tmp file because it is bigger than the
threshold size value, rather than I can't write this tmp file because the
file system won't let me.


http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html#setSizeThreshold%28int%29

I understand that if you use setSizeThreshold() to increase the
threshold value, the file is not written to disk:


On 9/1/2010 5:28 PM, Paul Szynol wrote:

Increasing the value of .setSizeThreshold() did the trick.  Thanks for
pointing me in that direction--I should have sent my question here
about
12 hrs ago! :)

Best regards,
Konstantin Kolinko

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




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



Re: META - Thread Hijacking

2010-09-01 Thread Konstantin Kolinko
2010/9/2 Len Popp len.p...@gmail.com:
 On Wed, Sep 1, 2010 at 18:06, Christopher Schultz
 ch...@christopherschultz.net wrote:
 In the end, it's mostly up to the user's own personal preference which
 way things should go. Those of us whose mail clients respect the
 thread-id in the SMTP headers can see immediately when someone hijacks a
 thread. Those folks have nowhere to hide: the SMTP headers do not lie. :)

 I suggest that complaints about hijacked threads should be sent to the
 person directly instead of spamming the whole list.

 (The complaints seem especially pointless to me because, ironically,
 the threads never looked hijacked to me!)

Have you ever searched the list archives? Hijacked threads are
harmful. I appreciate those complaints being on the list, so that I
won't waste my time replying (and increasing the mess).

Best regards,
Konstantin Kolinko

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



Re: META - Thread Hijacking

2010-09-01 Thread Wesley Acheson
 Have you ever searched the list archives? Hijacked threads are
 harmful. I appreciate those complaints being on the list, so that I
 won't waste my time replying (and increasing the mess).


In that case the answer is yes. I should read this in a threaded client.

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



Re: Question on SSI

2010-09-01 Thread Marc Chamberlin

 On 9/1/2010 3:35 PM, Wesley Acheson wrote:

On Thu, Sep 2, 2010 at 12:24 AM, Marc Chamberlin
m...@marcchamberlin.com  wrote:

  On 9/1/2010 1:46 PM, Wesley Acheson wrote:

On Wed, Sep 1, 2010 at 10:13 PM, Marc Chamberlin
m...@marcchamberlin.comwrote:
Have you tried modifying this section?

 filter-mapping
 filter-namessi/filter-name
 url-pattern*.shtml/url-pattern
 /filter-mapping


To look more like this

 filter-mapping
 filter-namessi/filter-name
 url-pattern*/url-pattern
 /filter-mapping

Thanks Wesley for taking the time to answer, much appreciated!  Yes, I have
tried this filter mapping / url-pattern with no joy.  Also have tried a
url-pattern of *.html and no joy either

Also change the section
 init-param
   param-namecontentType/param-name
   param-valuetext/x-server-parsed-html(;.*)?/param-value
 /init-param

The param-value must be a regular expression that will meet the
following mime types
text/x-server-parsed-html or text/html. My regular expressions aren't
great so I'll leave that for an exercise.

Hi Marc,

Okay the suggestion was to do these two changes in conjunction with
one another as I understand it the mapping says what URLS this is
applied on and the init-param says what the mime type has to be.

To test simply, just to see if we are on the right track try chaning
the filter-mapping as above, but change

  init-param
param-namecontentType/param-name
param-valuetext/x-server-parsed-html(;.*)?/param-value
  /init-param

to

  init-param
param-namecontentType/param-name
param-valuetext/html(;.*)?/param-value
  /init-param

And test it on a html page. If I'm right it will work but shtml won't.
  Really need a regularexpression writer.
Thanks Wesley!!! That did the trick, and yes, shtml does not work... But 
this should be ok for our needs, our users don't create .shtml files, 
and this also worked for .jsp and .htm files as well as .html...   
Documentation on the Tomcat site should be updated to discuss this, 
IMHO... And it might be an interesting exercise to figure out how to 
make this work for all files if one is looking for exercises... ;-)

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





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



Re: Question on SSI

2010-09-01 Thread Wesley Acheson
On Thu, Sep 2, 2010 at 1:16 AM, Marc Chamberlin m...@marcchamberlin.com
wrote:

 Thanks Wesley!!! That did the trick, and yes, shtml does not work... But
 this should be ok for our needs, our users don't create .shtml files, and
 this also worked for .jsp and .htm files as well as .html...
Documentation
 on the Tomcat site should be updated to discuss this, IMHO... And it might
 be an interesting exercise to figure out how to make this work for all
files
 if one is looking for exercises... ;-)


For the record, the documentation actually does say it.  You need to know
what mime types are though.

*contentType* - A regex pattern that must be matched before SSI processing
is applied. When crafting your own pattern, don't forget that a mime content
type may be followed by an optional character set in the form mime/type;
charset=set that you must take into account. Default is
text/x-server-parsed-html(;.*)?.

Green emphisis assuming the mailing list allows html mail is mine.

Also as a side note you can have multiple mappings for one filter.So in
production based on your requirements I'd do the following

   filter-mapping
   filter-namessi/filter-name
   url-pattern*.html/url-
pattern
   /filter-mapping

   filter-mapping
   filter-namessi/filter-name
   url-pattern*.htm/url-
pattern
   /filter-mapping

   filter-mapping
   filter-namessi/filter-name
   url-pattern*.jsp/url-
pattern
   /filter-mapping


 That should fix it.  In case your wondering what mime types that are used
in tomcat they are all listed in the web.xml in the conf subfolder of
tomcat.


Re: Tomcat dies after starting

2010-09-01 Thread jan gestre
On Wed, Sep 1, 2010 at 4:40 PM, Wesley Acheson wesley.ache...@gmail.com wrote:
 Can you put in the beginning of the stack trace?

 Some things to look at make sure that you have permission to bind to
 the port that you've set your http connection to. (you probably won't
 be able to bind to port 80 on a linux box)

 RHEL5 has selinux installed by default which may cause problems. I'm not sure.
 Ensure nothing else is listening to that port.

 Regards,

 Wesley Acheson

 On Wed, Sep 1, 2010 at 9:00 AM, jan gestre ipcopper...@gmail.com wrote:
 Hi Everyone,

 I'm using 6.0.26 tomcat binary in my RHEL5 box, it was configured for
 high availability using DRBD, it was already working for more than a
 week already but all of a sudden it stopped working, tomcat just dies,
 restarting it manually does not help either.

 Here's my setup:

 RHEL5 64bit
 Sun Java 1.6 SDK 64 bit
 Tomcat 6.0.29

 Here's my catalina.out log which is the same as the catalina.2010-09-01.log:

 logs/catalina.out
        at
 org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
        at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
        at
 org.apache.catalina.core.StandardService.stop(StandardService.java:596)
        at
 org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
        at
 org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
 Sep 1, 2010 1:44:26 PM org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8080
 Sep 1, 2010 1:44:26 PM org.apache.catalina.connector.Connector stop
 SEVERE: Coyote connector has not been started
 ---

 Here's the log when it was working/running:

 catalina.2010-08-23.log
 Aug 23, 2010 3:00:16 PM org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 Aug 23, 2010 3:00:16 PM org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 Aug 23, 2010 3:00:16 PM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/16  config=null
 Aug 23, 2010 3:00:16 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 513 ms
 Aug 23, 2010 3:10:19 PM org.apache.coyote.http11.Http11Protocol pause
 INFO: Pausing Coyote HTTP/1.1 on http-8080

 I've already googled similar issues but did not find any concrete solution.

 Will appreciate any help.

 Many thanks in advance.

 Jan

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



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



Hi Wesley,

SELinux is disabled as well as the firewall, and Tomcat is running as
unprivileged user, all related files is owned by that user.

Jan

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



Re: Tomcat dies after starting

2010-09-01 Thread jan gestre
On Wed, Sep 1, 2010 at 9:28 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Wesley Acheson [mailto:wesley.ache...@gmail.com]
 Subject: Re: Tomcat dies after starting

 Can you put in the beginning of the stack trace?

 Nice that the OP cut off the critical information...

 Also, the OP should post the server.xml, preferably with comments removed and 
 security information obfuscated, and let us know if APR is being used.

 (you probably won't be able to bind to port 80 on a linux box)

 Of course you can - but you have to use the proper technique, such as 
 starting Tomcat via jsvc or using iptables.

  - Chuck


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


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



Hi Charles,

Here's my server.xml file, pardon me but I don't know what stack trace
is. As you can see they're default values, I did not change anything
in my box. How would I know if apr is used? I think apr is installed.
Also I'm planning to configure to use Apache installed in another
machine as a reverse proxy to access Tomcat.


server.xml:

?xml version=1.0 encoding=utf-8 ?
- Server port=8005 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener
/
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/
- GlobalNamingResources
  Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase description=User database
that can be updated and saved
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml /
  /GlobalNamingResources
- Service name=Catalina
  Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2
redirectPort=8443 /
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
- Engine name=Catalina defaultHost=localhost
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase /
- Host name=localhost appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
  /Host
  /Engine
  /Service
  /Server

Regards,

Jan

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



Re: META - Thread Hijacking

2010-09-01 Thread Len Popp
On Wed, Sep 1, 2010 at 19:08, Konstantin Kolinko knst.koli...@gmail.com wrote:
 Have you ever searched the list archives?

Good idea...
http://tomcat.markmail.org/search/?q=hijack#query:hijack%20list%3Aorg.apache.tomcat.users+page:1+state:facets
More than 700 messages! Really, is there a reason they all need to be
sent to everyone??
--
Len

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



URL rewrite

2010-09-01 Thread Mohit Anchlia
Tomcat 6:

Is there a way to change the URL for eg:

http://abc.com/a

to

http://abc.com/b/a

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



Re: URL rewrite

2010-09-01 Thread Hassan Schroeder
 Is there a way to change the URL for eg:

 http://abc.com/a
 to
 http://abc.com/b/a

http://lmgtfy.com/?q=tomcat+url+rewrite

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: Question on SSI

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc,

On 9/1/2010 6:24 PM, Marc Chamberlin wrote:
  On 9/1/2010 1:46 PM, Wesley Acheson wrote:
  filter-mapping
  filter-namessi/filter-name
  url-pattern*/url-pattern
  /filter-mapping

 Thanks Wesley for taking the time to answer, much appreciated!  Yes, I
 have tried this filter mapping / url-pattern with no joy.  Also have
 tried a url-pattern of *.html and no joy either

Note that url-pattern*/url-pattern is out-of spec: that will
probably look for a request for the exact URL http://host/context/*,
which probably isn't what you want. If you want to intercept all
requests, you'll need url-pattern/*/url-pattern. Using / should
also work to intercept everything, but the spec actually says that /
specifies the default servlet for the application and so I'm not sure
if a Filter can reliably be given that URL mapping.

 Also change the section
  init-param
param-namecontentType/param-name
param-valuetext/x-server-parsed-html(;.*)?/param-value
  /init-param

 The param-value must be a regular expression that will meet the
 following mime types
 text/x-server-parsed-html or text/html. My regular expressions aren't
 great so I'll leave that for an exercise.

 Yeah, neither are mine ;-) ...  The trouble with reg expressions is that
 there are a lot of variants and documentation does not clarify just
 whose reg expr parser is being used. I usually assume GNU, but been bit
 so many times by that assumption that I can never be sure.  So I don't
 know how to modify this either

.* works pretty much the same in all regular expression variants. What
have you tried?

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

iEYEARECAAYFAkx/AeEACgkQ9CaO5/Lv0PBcNACfWS1EFWPeiUXk/NBkp83tjE5s
gpsAn1h4j6BMehr/AybKL/QLIF4OPlpo
=ts+K
-END PGP SIGNATURE-

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



Re: Question on SSI

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc,

On 9/1/2010 7:16 PM, Marc Chamberlin wrote:
 [Changing the content-type regular expression pattern] did the trick,
 and yes, shtml does not work... But this should be ok for our needs,
 our users don't create .shtml files, and this also worked for .jsp
 and .htm files as well as .html... Documentation on the Tomcat site
 should be updated to discuss this, IMHO.

What should be updated? It seems clear to me from the documentation what
will happen:


contentType - A regex pattern that must be matched before SSI processing
is applied. When crafting your own pattern, don't forget that a mime
content type may be followed by an optional character set in the form
mime/type; charset=set that you must take into account. Default is
text/x-server-parsed-html(;.*)?.


It clearly specifies the default, and tells you what the value will be
used for. If the default won't meet your needs, change it to a value
that /will/ meet your needs. Standard regular expressions should be
acceptable.

 And it might be an interesting exercise to figure out how to make
 this work for all files if one is looking for exercises... ;-)

Try this:

url-pattern/*/url-pattern   (should definitely work)
or
url-pattern//url-pattern(will probably work)

plus:

contentType=.*

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

iEYEARECAAYFAkx/AtAACgkQ9CaO5/Lv0PCubgCfdnlZfEaEPuaVI2JHvkRiR26L
K5UAnA3bEfiHBe9HZfESB/RqiDiCbf/R
=oIA/
-END PGP SIGNATURE-

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



Re: Question on SSI

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wesley,

On 9/1/2010 7:25 PM, Wesley Acheson wrote:
 Green emphisis assuming the mailing list allows html mail is mine.

It doesn't: it uses the text version, instead, and discards the HTML. :(

 Also as a side note you can have multiple mappings for one filter.So in
 production based on your requirements I'd do the following
 
filter-mapping
filter-namessi/filter-name
url-pattern*.html/url-pattern
/filter-mapping
 
filter-mapping
filter-namessi/filter-name
url-pattern*.htm/url-pattern
/filter-mapping
 
filter-mapping
filter-namessi/filter-name
url-pattern*.jsp/url-pattern
/filter-mapping

If you aren't picky about the ordering of /other/ filter mappings within
your webapp, you can merge those together:

filter-mapping
filter-namessi/filter-name
url-pattern*.html/url-pattern
url-pattern*.htm/url-pattern
url-pattern*.jsp/url-pattern
/filter-mapping

You can even specify that the filter will be applied to requests that
will be handled by specific servlets, such as default or jsp. Just
be aware that switching servlets for whatever reason will end up
disabling your SSI filter if you aren't careful.

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

iEYEARECAAYFAkx/BAAACgkQ9CaO5/Lv0PBsmACgwihA9PPD+13QP2eRtoOK3WGy
1tYAn1hCHNxPeFUIqmbabTaZ3xK9sX6Q
=MIjV
-END PGP SIGNATURE-

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



Re: Question on SSI

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc,

On 9/1/2010 6:52 PM, Marc Chamberlin wrote:
  On 9/1/2010 1:49 PM, Christopher Schultz wrote:
 You will have to use filter mapping in order to post-process your .jsp
 and other dynamic pages: a servlet can't be wrapped around another
 servlet (such as the JSPServlet, which you don't have to map yourself)
 for this kind of thing. So, stick with the filter.

 OK, I kinda gathered that a filter is applied to everything served up by
 the server, before servlets are invoked... So it makes sense that a
 filter has to be used (if I am understanding this correctly) for JSP
 Servlets

Technically speaking, the filter wraps the call to the actual servlet
(or, even, other filters that get called before the servlet). They can
act either before or after the servlet, or both. The SSI filter wraps
the request handed-off to the filter chain (which ultimately ends by
calling a servlet) and buffers the response. After the rest of the
filter chain has run (and presumably produced output), the SSI filter
completes its task by actually running that buffered-output through the
SSI processor to actually *do* all of the SSI stuff. The result is then
sent to the client.

Honestly, I'm not sure why the SSI Servlet is even included: the
DefaultServlet handles files on the disk, etc. quite nicely and the SSI
Filter can be used to filter them, too. See my related post on the SSI
Filter implementation if you're interested.

 Note that you should be able to set up SSI in a single webapp instead of
 modifying the conf/web.xml file as described in the SSI documentation. I
 find this cleaner, as you will only end up making SSI available in a
 specific webapp instead of across all webapps deployed onto the server.
 Thefilter-mapping  itself should definitely only be included in your
 webapp's META-INF/web.xml file.

 Not sure I fully understand you here, so please forgive my lack of
 understanding... I do want this SSI feature to be available across all
 the webapps deployed on our server. As I mentioned previously, we want
 to provide some services that users can access, by simply including a
 server side include statement that will effectively include these
 features on their web pages.

Gotcha. Feel free to enable this site-wide, then (using conf/web.xml).
Evidently, you'll also have to make all contexts that want to use SSI
privileged. I'm not entirely sure that's true if you enable it at the
top-level as you are doing. Please let us know.

 And like I mentioned, I have gotten this
 working in one sense, but the include statement only works for me from
 within .shtml files and I need it to work from within .html, .htm, and
 .jsp files.

It looks like you've gotten this working the correct combination of
url-pattern and contentType configuration.

Good luck in the future,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx/BZcACgkQ9CaO5/Lv0PDI7QCeJIghAxNYbqNiwmcIQzZ01ppT
4ooAoIRD7mRVmUJjTRCjrIYsU84VcU9w
=omY5
-END PGP SIGNATURE-

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



Re: URL rewrite

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohit,

On 9/1/2010 9:10 PM, Mohit Anchlia wrote:
 Tomcat 6:
 
 Is there a way to change the URL for eg:
 
 http://abc.com/a
 
 to
 
 http://abc.com/b/a

Sure:

CTRL-L, END, LEFT, 'b', then '/'

Voile!

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

iEYEARECAAYFAkx/BjUACgkQ9CaO5/Lv0PAy1ACgrn27f5l0EmVV+ogHJcRPfOfn
hbwAnAunqGVIFcuxJudmMZaaWpCfDfbK
=NpF0
-END PGP SIGNATURE-

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



Re: Tomcat dies after starting

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan,

On 9/1/2010 8:44 PM, jan gestre wrote:
 Here's my server.xml file, pardon me but I don't know what stack trace
 is.

The is the bottom of the stack trace, from your original post:

 at
 org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
 at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
 at
 org.apache.catalina.core.StandardService.stop(StandardService.java:596)
 at
 org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
 at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
 at
 org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
 Sep 1, 2010 1:44:26 PM org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8080
 Sep 1, 2010 1:44:26 PM org.apache.catalina.connector.Connector stop
 SEVERE: Coyote connector has not been started

There's more in the log file before that. It should say something like:

[date and time] SomeKindOfException: Something bad happened! Oh, no!
Cause by: org.apache.catalina.core.Whatever.someMethod(Whatever.java:45)
 at org.apache.catalina.core.Whatever.someMethod(Whatever.java:98)
   ...

...ending in the stuff you've already posted. If you post the entire
stack trace, it will likely tell us what the problem was. It looks like
there was an error that caused Tomcat to voluntarily shut down, and then
the shut down caused an error, too.

Tell you what: stop Tomcat 9if it's somehow running), delete your
logs/catalina.out file, then re-start Tomcat. If/when it fails, attach
the /entire/ catalina.out file to a message to the list, and we'll check
it out.

 As you can see they're default values, I did not change anything
 in my box. How would I know if apr is used? I think apr is installed.

APR will tell you if it's running at the top of your logs/catalina.out
log file. Each time you start the server, it should tell you whether APR
is enabled or not.

 Also I'm planning to configure to use Apache [httpd] installed in another
 machine as a reverse proxy to access Tomcat.

Why particular reason you're putting Apache httpd into the mix? Tomcat
is a perfectly fine web server on it's own.

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

iEYEARECAAYFAkx/B4cACgkQ9CaO5/Lv0PCpvgCeMYFjkUD4980tRCBaPQDKJuXa
2NMAoLv4+zQhWph8+F16t5AzOmYBi+0m
=rNhJ
-END PGP SIGNATURE-

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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 9/1/2010 6:26 PM, Konstantin Kolinko wrote:
 AFAIK, the said threshold determines when a file is too big to be hold
 in memory and should be written to disk.  So, I think that Permission
 denied actually comes from your file system.  You have to read the
 docs (or the source code), but I guess that it tries to write to
 ${catalina.base}/temp (aka $CATALINA_TMPDIR, aka java.io.tmpdir ).

Interesting. That would mean that, when the uploaded file exceeds this
threshold (but not the maximum file size allowed for uploads),
commons-fileupload writes the file first to the temp directory, then
probably hands an InputStream object to the consumer that reads from the
file instead of memory.

That sounds like a decent implementation that allows large files to be
uploaded but does not turn into a memory hog.

Paul, what are you doing with these files? Are you saving them onto the
disk? I don't believe commons-fileupload actually promises to write the
files to a particular place on your behalf: I think you have to write
the file somewhere yourself.

Is it possible that when commons-fileupload tries to write to the temp
dir, it doesn't have permission? If you're running Tomcat as a service,
it's current-working-directory might actually be '/', and
commons-fileupload might inherit that as the temp directory if you don't
tell it otherwise.

I think it's worth looking further into this problem, otherwise it might
pop-up again when you try to upload an even bigger file.

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

iEYEARECAAYFAkx/CKwACgkQ9CaO5/Lv0PDEeQCgw+eKca1nyMqLveP769uu0PeG
HrwAnjCNOz96LNpfrAWvtqJJlW6g7hbp
=8k81
-END PGP SIGNATURE-

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



Tomcat 7.0 API reference mismatch

2010-09-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tomcat Folks,

I was looking at the Tomcat 7.0 documentation this evening and I see
that the links to the various Sun/Oracle API documentation are out of
date: they reference the servlet 2.5 APIs and the JSP 2.1 APIs.

I see that Sun/Oracle doesn't yet have the Servlet 3.0 APIs up on their
site: is that the reason the appropriate APIs aren't posted on the TC 7
page?

Would it be possible to post the Servlet 3.0 APIs and JSP 2.2 APIs on
the Tomcat site until Sun/Oracle gets theirs posted?

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

iEYEARECAAYFAkx/DfUACgkQ9CaO5/Lv0PD7HACcCh+zkqtzfb5hbq5dtn1THlpp
GioAoKvZJRUlZ7OyjAsCL0PvY4QyJQIk
=Pci3
-END PGP SIGNATURE-

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



Re: FileUploadBase$IOFileUploadException

2010-09-01 Thread Paul Szynol


Hey, Chris,

I checked the temp directory in catalina.sh and also by adding this line 
to the the ContextListener class:


System.out.println(Temp dir: 
+ (event.getServletContext()
.getAttribute(javax.servlet.context.tempdir))
.toString());

The latter is a subdirectory of the former; Tomcat has read/write access 
to both places.


I do create a temporary local copy of the image on disk (by using native 
Java IO classes), so I am able to access the file system without a 
problem (ultimately, the images are stored in a database). It looks like 
fileupload is meant to store a temporary version of the image during the 
upload, presumably to minimize memory usage.  This is where the fail is 
happening, if the image exceeds the threshold size.  I've monitored both 
temporary directories during the upload, and indeed nothing is being 
written to them.


I guess I can increase the threshold size to a higher value to prevent 
the exception by avoiding the file system write altogether, but I worry 
that if the application has many users uploading large images 
concurrently, this set up will quickly lead to fatal out of memory 
errors. :(


I've sent an inquiry to the apache commons user mailing list.  I will 
follow up here when I hear back.


Thanks again for all your advice.

Best,
Paul


On 9/1/10 10:25 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 9/1/2010 6:58 PM, Paul Szynol wrote:

Ah, now I see what you mean.  So the reason the exception isn't being
thrown when I increase the threshold value is that the image isn't being
written to disk in the first place.  That makes more sense.  But the odd
part of it (in my configuration, at least) is that the file permissions
do allow fileupload to write the file...so, I guess I still don't
understand what's causing the exception.

I'm reading this: http://commons.apache.org/fileupload/using.html

Are you calling factory.setRepository(File)?

If not, you're getting whatever the default is, which is
System.getProperty(java.io.tmpdir), which might actually be / in
your case.

You should probably be doing something like this:

ServletContext app = request.getServletContext();
factory.setRepository((File)app.getAttribute(javax.servlet.context.tempdir));

ServletFileUpload upload = new ServletFileUpload(factory);

...

This will allow commons-fileupload to use the spec-defined scratch
directory for files your webapp needs to write. Be aware that the spec
makes no statements about how much stuff you can shove into that
directory, so some containers may limit you in some way (I don't believe
Tomcat has any such limits, but YMMV).

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

iEUEARECAAYFAkx/CwgACgkQ9CaO5/Lv0PC9SgCXfnK0xldzZFPal+Masbn6yM3u
SQCeK1ku59wniXGJupko/2bclOVkyjI=
=wtBx
-END PGP SIGNATURE-

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




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



RE: pick load

2010-09-01 Thread Alexandre Chapellon
With load growing I have thoose errors that appear in mod_jk logs:

[Sun Aug 29 08:28:27.976 2010] [26242:4106161040] [info]
jk_handler::mod_jk.c (2611): Aborting connection for worker=selfcare
[Sun Aug 29 12:15:45.829 2010] [27162:4097772432] [info]
ajp_service::jk_ajp_common.c (2540): (selfcare) sending request to
tomcat failed (recoverable), because of server error (attempt=1)
[Sun Aug 29 12:15:45.929 2010] [27162:4097772432] [info]
ajp_send_request::jk_ajp_common.c (1490): (selfcare) did not receive
END_RESPONSE, closing socket -1
[Sun Aug 29 12:15:45.933 2010] [27162:4097772432] [info]
ajp_service::jk_ajp_common.c (2540): (selfcare) sending request to
tomcat failed (recoverable), because of server error (attempt=2)
[Sun Aug 29 12:15:45.933 2010] [27162:4097772432] [error]
ajp_service::jk_ajp_common.c (2559): (selfcare) connecting to tomcat
failed.
[Sun Aug 29 12:15:45.933 2010] [27162:4097772432] [info]
jk_handler::mod_jk.c (2618): Service error=-3 for worker=selfcare
[Sun Aug 29 15:04:46.507 2010] [27104:4039052176] [info]
ajp_process_callback::jk_ajp_common.c (1882): Writing to client aborted
or client network problems
...skipping...

I really don't know what to tune

Le mardi 31 août 2010 à 17:49 -0500, Caldarale, Charles R a écrit :

  From: Alexandre Chapellon [mailto:alexandre.chapel...@mana.pf] 
  Subject: Re: pick load
 
  We're using an old version of highdeal billing system which 
  apparently (tat's what the support says) doens't support java6.
 
 Chris suggested *Tomcat* 6, not Java 6.  You can run Tomcat 6 on JRE 5.
 
  - 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.
 




RE: pick load

2010-09-01 Thread Alexandre Chapellon
Forget about it this doesn't seems to be related to the jk connector.
I have the same problems when direct sending requests to tomcat (errors
which do not appear under nomal load):

2010-09-01 18:06:53.459 - FAILURE - [tracing] - MANA - Exception dans
[Authentification::doAuthentification(String,String)] :
[Search::searchPartyByAddInfo(String,object)] Erreur : impossible de
recuperer les parties avec l'info additionnel accessCode = CHAP0712A : 
null
2010-09-01 18:06:53.459 - FAILURE - [tracing] - MANA -
[Authentification::performTask(HttpServletRequest,HttpServletResponse)]
Exception rencontr?e pendant l'authentification de CHAP0712A.
2010-09-01 18:06:53.467 - FAILURE - [tracing] - MANA - Exception dans
[Search::searchParty(String)] : null
2010-09-01 18:06:53.471 - FAILURE - [tracing] - MANA - Exception dans
[Client.fetchInformation(String)] :[Search::searchParty(String)]
Erreur : impossible de recuperer la partie CHAP0712A : null
java.lang.Exception: [Search::searchParty(String)] Erreur : impossible
de recuperer la partie CHAP0712A : null
at com.mana.om.Client.fetchInformation(Client.java:676)
at com.mana.selfcare.Authenticate.performTask(Authenticate.java:207)
at com.mana.selfcare.Authenticate.doPost(Authenticate.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:638)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:720)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:545)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline
$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
at org.apache.jk.common.ChannelSocket
$SocketConnection.runIt(ChannelSocket.java:897)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:534)

Le mercredi 01 septembre 2010 à 17:28 -1000, Alexandre Chapellon a
écrit :

 With load growing I have thoose errors that appear in mod_jk logs:
 
 [Sun Aug 29 08:28:27.976 2010] [26242:4106161040] [info]
 jk_handler::mod_jk.c (2611): Aborting connection for 

Tomcat Web App - Strange issue. Requires 2 restart for SSO mode to work

2010-09-01 Thread AVSUNIL

Hi,

I have a small web application deployed on Tomcat server and is is working
pretty fine, except in one mode. The web application is available through 2
modes of links - one is regular and other is Single Sign On based.

Here is the sample directory structure:
Tomcat
webapps
MyApp
WEB-INF
web.xml
jsp
myapp.jsp
MyApp.war
bin
logs
conf
web.xml 

Deployment Procedure: 
Stop the server
Copy the new war to webapps replacing the old one
remove the complete diretcory of MyApp recursively (rm -rf MyApp)
start the server

Issue:
We try both the links of application. The normal one works just fine first
time itself. The SSO link shows up the directory listings page of webapps
directory showing the MyApp.war and MyApp directory link.
Now all we need to workaround this is just stop the server again and then
start it. Surprisingly both SSO mode link and normal works totally fine.
This is recurring problem. Is there a proper permanent fix to this?

Please note the web.xml in Tomcat/conf directory has below 
servlet
servlet-namedefault/servlet-name
init-param
param-namelistings/param-name
param-valuetrue/param-value
/init-param
/servlet
welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
/welcome-file-list

Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has below
welcome-file-list
welcome-filemyapp.jsp/welcome-file
/welcome-file-list

The application has only myapp.jsp and none of index.* files

myapp.jsp is as below
htmlheadMETA
URL=%=request.getContextPath()%/who.do/headbody//html

Somehow first time when new war is deployed, old exploded diretcory is
deleted and server is started, the Tomcat might not be finding xcard.jsp or
the application specific web.xml and hence it is listings the directory
based on settings in Tomcat/conf/web.xml
Second time however it finds the web.xml and xcard.jsp and hence works.

We even tried changing deployment procedure not to delete the exploded
directory and rest of steps same. But it does not help either. If we drop
the new war while the server is running, it does not take the changes in new
war.
-- 
View this message in context: 
http://old.nabble.com/Tomcat-Web-App---Strange-issue.-Requires-2-restart-for-SSO-mode-to-work-tp29600471p29600471.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Question on SSI

2010-09-01 Thread Marc Chamberlin

 On 9/1/2010 4:25 PM, Wesley Acheson wrote:



On Thu, Sep 2, 2010 at 1:16 AM, Marc Chamberlin 
m...@marcchamberlin.com mailto:m...@marcchamberlin.com wrote:


 Thanks Wesley!!! That did the trick, and yes, shtml does not work... But
 this should be ok for our needs, our users don't create .shtml 
files, and
 this also worked for .jsp and .htm files as well as .html...   
Documentation
 on the Tomcat site should be updated to discuss this, IMHO... And it 
might
 be an interesting exercise to figure out how to make this work for 
all files

 if one is looking for exercises... ;-)


For the record, the documentation actually does say it.  You need to 
know what mime types are though.


*contentType* - A regex pattern that must be matched before SSI 
processing is applied. When crafting your own pattern, don't forget 
that a mime content type may be followed by an optional character set 
in the form mime/type; charset=set that you must take into account. 
Default is text/x-server-parsed-html(;.*)?.


Green emphisis assuming the mailing list allows html mail is mine.
Perhaps this does say it, Wesley, but I am going to argue that, like a 
lot of documentation, too much is assumed about the readers level of 
background understanding. In this instance, as an outsider, I do not 
understand the model inside the Tomcat server about just how the 
contentType parameter is going to be used, or what 
text/x-server-parsed-html(;.*)? is, does, or will do. Internet 
searches resulted in nothing informative, so to me this is a black box 
using a magic incantation and I do not have a way to grok how to 
manipulate it. Same applies to your answer of using text/html(;.*)?  
for the content type. This is perhaps a very unusual form of a reg 
expression, if I were to interpret it, I would guess it is trying to 
match a string text/html; followed by an arbitrary set of characters, 
but I cannot be certain, and perhaps the semi-colon is being used in a 
way that I am unfamiliar with... And if I am correct, I still do not 
understand what string is being matched against, though I might take a 
wild guess and guess that it is matching the content declaration in the 
meta tag of an html document... but then I got no clue what 
test/x-server-parsed-html(;.*)? is going to match against, and I 
cannot find any information about such a document type, so I remain lost...


Some mime types are more intuitive than others, but not entirely. While 
I can understand the need to associate simpler concepts, like a jpeg 
image with something to handle .jpeg files, I really cannot say I 
understand the mapping fully to understand just how that mapping is 
done. Many sites are willing to list these mime types and repeat the 
same sort of list that is found in the web.xml file, but they do not 
reveal just what is going to happen or how the mapping gets 
modeled/translated into an action.


So, IMHO what is needed is some additional links in the documentation, 
to places where concepts such as these are better defined...


Also as a side note you can have multiple mappings for one filter.So 
in production based on your requirements I'd do the following


filter-mapping
filter-namessi/filter-name
url-pattern*.html/url-
pattern
/filter-mapping

filter-mapping
filter-namessi/filter-name
url-pattern*.htm/url-
pattern
/filter-mapping

filter-mapping
filter-namessi/filter-name
url-pattern*.jsp/url-
pattern
/filter-mapping


That should fix it.  In case your wondering what mime types that are 
used in tomcat they are all listed in the web.xml in the conf 
subfolder of tomcat.
Again thanks for your taking the time to help me, and I know I got a lot 
of learning to do yet... I will add your additional filter-mappings to 
my web.xml file, as it seems to be more limiting/appropriate.


As for the list of mime types, see my above comment, a simple list is 
not sufficient for me to understand how and why a particular mime type 
item should be used... An reading the official documents on mime types 
is pretty intimidating/overwhelming... What is needed is a link to a 
simple boiled down description that allows the user to quickly grasp and 
understand these concepts..


   Marc...



Re: What is default value of CATALINA_OPTS at apache-tomcat-6.0.29?

2010-09-01 Thread takanobu watanabe
Hello Rainer,

Thanks detailed explain.
and now I use jconsole to measuring.
But when jconsole try to connect remote target host, JVM down.
Probably it is not tomcat issue,I think.
I may close this issue.
Regard,

--catalina.out--
...
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  Internal Error (os_linux_zero.cpp:157), pid=1696, tid=1735849104
#  Error: caught unhandled signal 11
#
# Java VM: OpenJDK Core VM (1.6.0_0-b11 interpreted mode linux-arm)
# An error report file with more information is saved as:
# /root/hs_err_pid1696.log
#
# If you would like to submit a bug report, please visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
---

On 31 August 2010 20:57, Rainer Jung rainer.j...@kippdata.de wrote:
 On 31.08.2010 13:14, takanobu watanabe wrote:

 Thank you very much Rainer.

 Tomcat itself doesn't need much memory and you should be able to run it
 with less than 64MB Heap (plus Perm)

 I recognized 64MB=  Am +  Bm from your advice.
 Is my recognized correct ?
 ---example catalina.sh---
 -XX:NewSize=Am -XX:MaxNewSize=Am
  -XX:PermSize=Bm -XX:MaxPermSize=Bm

 I don't actually understand the question, but here's the terminology (I hope
 the picture isn't disturbed by line breaks):

 -- Heap  Perm -
 - New - Old -
 - Eden -- Survivor1 -- Survivor2 -

 Sometimes New is also defined as Eden plus one of the two survivors,
 especially in the verbose GC output.

 The two survivors are also called From Space and To Space, the roles
 change during each GC run in New.

 Xms, Xmx: minimum and maximum heap size
 XX:NewSize, XX:MaxNewSize: minimum and maximum size of New
 XX:PermSize and XX:MaxPermSize: minimum and maximum size of Perm

 Sizes of Survivor spaces (each one) are determined by

 Size of Survivor = Size of New / (SurvivorRatio + 2)

 So if SurvivorRatio is some number N, then the Ratios are

 Eden:Survivor1:Survivor2 = N:1:1

 and New = (N+2) * One Survivor

 Regards,

 Rainer

 On 31 August 2010 19:00, Rainer Jungrainer.j...@kippdata.de  wrote:

 On 31.08.2010 10:34, takanobu watanabe wrote:

 Hello,

 What is default value of CATALINA_OPTS at apache-tomcat-6.0.29 ?
 It means No configure catalina.sh as same as value of CATALINA_OPTS
 just expand tomcat.

 Because I try to run tomcat lean physical memory condition(128Mb only
 with armv5).
 When nothing configure to catalina.sh(default),Tomcat works well.
 But when I configure below,looks like always FullGC running and could
 not access WEB service.
 ---
 CATALINA_OPTS= -verbose:gc -XX:+PrintGCTimeStamps -Xms64m -Xmx64m
 -XX:NewSize=32m -XX:MaxNewSize=32m
 -XX:SurvivorRatio=2 -XX:PermSize=16m -XX:MaxPermSize=16m
 ---
 If anyone has idea or suggest of run tomcat on lean physical memory
 condition, I would like to know.

 If you don't add explicit memory options, the default memory sizes of
 your
 JVM are used. Those might depend on the exact jvm version and also on the
 type of system you run it on (total memory, CPUs).

 The easiest way to find out the sizes for your jvm are running it without
 explicit settings and then measuring it. Measuring can be done with tools
 like jstat, jconsole or jvisualvm, or you can add a few verbose gc flags
 to
 print out the sizes of the different memory regions during each run of
 the
 GC, e.g.

 -verbose:gc -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps

 Note that the default settings will allow some of the regions to grow and
 shrink, so you need to make observations for a longer time to find out
 the
 values which are effective most of the time.

 I expect your above settings might not leave enough room in the Old
 Generation (aka Tenured), because your New Generation is somwhat large
 relative to the Old Gen. Tomcat itself doesn't need much memory and you
 should be able to run it with less than 64MB Heap (plus Perm), but what
 you
 need in the end depends on the application inside (and the concurrency
 induced by the load). I never experimented to find a minimum value
 though.

 Regards,

 Rainer

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





-- 
tknv/

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