Discussion:
Problem with Tomcat 4.1.29 and german umlaut url-encoding
Thilo Krawietz
2004-08-25 08:39:53 UTC
Permalink
Hi folks,

i actually face some strange phenomenon concerning tomcat and
URL-encoding of german umlauts. As you may know,
some browsers encode german umlauts for usage in the URL with %xx
sequences for proper transportation.

The problem i have now is, that i got a web application which allows the
download of PDF-files, which may contain spaces and german umlauts.
If i request a file like that, for instance "Tür Testzwecke.pdf", this
request comes to Tomcat as "F%FCr%20Testzwecke.pdf"

Tomcat then decodes the spaces (%20) correctly, but it does not decode
the "%FC" and looks for a file "F%fcr Testzwecke.pdf", which of course
does not exist and causes a 404 error.
Since the tomcat is a 4.1.29 out-of-the-box install with no
customization, i am quite confused about this, since i would expect
Tomcat to decode spaces and umlauts correctly.

Did anybody face this problem before or does somebody have a clue about
this?

thanks for your help in advance,

Thilo
Jitesh Sinha
2004-08-25 10:20:55 UTC
Permalink
Hello,

I am getting following exception during the startup of my local server which
is Tomcat 4.1.
Any idea why it will come and how to remove it?

2004-08-25 15:46:19 StandardManager[/manager] IOException while loading
persisted sessions: java.io.EOFException
java.io.EOFException
at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2
150)
at
java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.j
ava:2619)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:726)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
at
org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStr
eam.java:103)
at
org.apache.catalina.session.StandardManager.load(StandardManager.java:379)
at
org.apache.catalina.session.StandardManager.start(StandardManager.java:626)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3570)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.
java:529)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
a:585)
at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
:647)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:1008)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
at org.apache.commons.digester.Digester.parse(Digester.java:1514)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:335)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452
)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)


Thanks,
-Jitesh
Shakeel Ahmad
2004-08-25 11:07:32 UTC
Permalink
Hi, can I disable GC thread in Tomcat.
Dale, Matt
2004-08-25 11:15:13 UTC
Permalink
You can't disable garbage collection or java won't run. Please rephrase your question.

-----Original Message-----
From: Shakeel Ahmad [mailto:***@globalnorthstar.com]
Sent: 25 August 2004 12:08
To: Tomcat Users List
Subject: Tomcat JVM GC


Hi, can I disable GC thread in Tomcat.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Shakeel Ahmad
2004-08-25 11:44:28 UTC
Permalink
Its known that JVM schedular runs gc thread depending upon some concrete
values, now I want to set such parameters, or my heap sizes so that the JVM
schedular, ignores gc thread. We have 1.3G Ram on our server and our heap
never goes beyond 400-450M, now the gc thread is a hurdle in our system , we
want that it made the gc thread ignored, keep in mind we are running at
1024-1024M on JVM heap.

-----Original Message-----
From: Dale, Matt [mailto:***@beCogent.com]
Sent: Wednesday, August 25, 2004 4:15 PM
To: Tomcat Users List
Subject: RE: Tomcat JVM GC



You can't disable garbage collection or java won't run. Please rephrase your
question.

-----Original Message-----
From: Shakeel Ahmad [mailto:***@globalnorthstar.com]
Sent: 25 August 2004 12:08
To: Tomcat Users List
Subject: Tomcat JVM GC


Hi, can I disable GC thread in Tomcat.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Mats Henrikson
2004-08-25 11:46:11 UTC
Permalink
Post by Shakeel Ahmad
Its known that JVM schedular runs gc thread depending upon some concrete
values, now I want to set such parameters, or my heap sizes so that the JVM
schedular, ignores gc thread. We have 1.3G Ram on our server and our heap
You are mistaken, you do not want it to ignore the gc thread, as you
would then very fast run out of heap space, you just want to tune the
garbage collector a little.

To do this, read this page until you understand it:

http://java.sun.com/docs/hotspot/gc1.4.2/

Then you can use the GC Portal tool to help you define the optimal GC
configuration for your application:

http://java.sun.com/developer/technicalArticles/Programming/GCPortal/

Of course, it could turn out that in order to improve your performance
you might have to rewrite parts of your application to be less wasteful
with objects.

Regards,
--
Mats Henrikson
Unix Systems Programmer
Systems Development & Support
Oxford University Computing Services
Shakeel Ahmad
2004-08-25 13:17:03 UTC
Permalink
Actually we have our own gc mechanism which has a proven record of doing
things for our application, it never lets our application go out of memory,
but it works at high level, now with this robust design we have only issues
from JVM's original gc work. Our calculations have proven that if JVM's gc
does not work automatically then our real time nodes can work more
effectively.

-----Original Message-----
From: Mats Henrikson [mailto:***@herald.ox.ac.uk]
Sent: Wednesday, August 25, 2004 4:46 PM
To: Tomcat Users List
Subject: RE: Tomcat JVM GC
Post by Shakeel Ahmad
Its known that JVM schedular runs gc thread depending upon some concrete
values, now I want to set such parameters, or my heap sizes so that the JVM
schedular, ignores gc thread. We have 1.3G Ram on our server and our heap
You are mistaken, you do not want it to ignore the gc thread, as you
would then very fast run out of heap space, you just want to tune the
garbage collector a little.

To do this, read this page until you understand it:

http://java.sun.com/docs/hotspot/gc1.4.2/

Then you can use the GC Portal tool to help you define the optimal GC
configuration for your application:

http://java.sun.com/developer/technicalArticles/Programming/GCPortal/

Of course, it could turn out that in order to improve your performance
you might have to rewrite parts of your application to be less wasteful
with objects.

Regards,
--
Mats Henrikson
Unix Systems Programmer
Systems Development & Support
Oxford University Computing Services


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Dale, Matt
2004-08-25 11:43:36 UTC
Permalink
The garbage collection is variable depending on your JVM parameters.

Here are a couple of links to help you understand a bit more about how the Garbage Collections work.

http://java.sun.com/developer/technicalArticles/Programming/turbo/

http://java.sun.com/docs/hotspot/gc1.4.2/

I would also recommend downloading jvmstat from sun as visualgc gives you a graphical visualation of the heap and garbage collections, allowing you to see exactly where the bottle necks are. You first step should probably be have a play with the different collectors or Agressive Heap.

Ta
Matt

-----Original Message-----
From: Shakeel Ahmad [mailto:***@globalnorthstar.com]
Sent: 25 August 2004 12:44
To: Tomcat Users List
Subject: RE: Tomcat JVM GC


Its known that JVM schedular runs gc thread depending upon some concrete
values, now I want to set such parameters, or my heap sizes so that the JVM
schedular, ignores gc thread. We have 1.3G Ram on our server and our heap
never goes beyond 400-450M, now the gc thread is a hurdle in our system , we
want that it made the gc thread ignored, keep in mind we are running at
1024-1024M on JVM heap.

-----Original Message-----
From: Dale, Matt [mailto:***@beCogent.com]
Sent: Wednesday, August 25, 2004 4:15 PM
To: Tomcat Users List
Subject: RE: Tomcat JVM GC



You can't disable garbage collection or java won't run. Please rephrase your
question.

-----Original Message-----
From: Shakeel Ahmad [mailto:***@globalnorthstar.com]
Sent: 25 August 2004 12:08
To: Tomcat Users List
Subject: Tomcat JVM GC


Hi, can I disable GC thread in Tomcat.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Dale, Matt
2004-08-25 13:30:43 UTC
Permalink
You should still look at the articles that I posted my reply. If you really want to use your own garbage collection then you will have to first fix the size of the certain areas within the heap. There is no way to turn off the jvm's own garbage collection, when it cannot allocate space for an object it will do a garbage collection. If there is still not enough space then it will expand the pool so that there is space, up until the maximum allowed for that pool.

If you fix the size of the pools and always do a gc before the pool runs out of memory then you will be fine. If you've fixed the pools and you run out of memory then your own gc algorithm must be deficient and the JVM will do a gc anyway.

I suspect that with the vast array of GC parameters available you should be able to find some that will work as well as or better than your own but thats just my opinion.

-----Original Message-----
From: Shakeel Ahmad [mailto:***@globalnorthstar.com]
Sent: 25 August 2004 14:17
To: Tomcat Users List
Subject: RE: Tomcat JVM GC


Actually we have our own gc mechanism which has a proven record of doing
things for our application, it never lets our application go out of memory,
but it works at high level, now with this robust design we have only issues
from JVM's original gc work. Our calculations have proven that if JVM's gc
does not work automatically then our real time nodes can work more
effectively.

-----Original Message-----
From: Mats Henrikson [mailto:***@herald.ox.ac.uk]
Sent: Wednesday, August 25, 2004 4:46 PM
To: Tomcat Users List
Subject: RE: Tomcat JVM GC
Post by Shakeel Ahmad
Its known that JVM schedular runs gc thread depending upon some concrete
values, now I want to set such parameters, or my heap sizes so that the
JVM
Post by Shakeel Ahmad
schedular, ignores gc thread. We have 1.3G Ram on our server and our heap
You are mistaken, you do not want it to ignore the gc thread, as you
would then very fast run out of heap space, you just want to tune the
garbage collector a little.

To do this, read this page until you understand it:

http://java.sun.com/docs/hotspot/gc1.4.2/

Then you can use the GC Portal tool to help you define the optimal GC
configuration for your application:

http://java.sun.com/developer/technicalArticles/Programming/GCPortal/

Of course, it could turn out that in order to improve your performance
you might have to rewrite parts of your application to be less wasteful
with objects.

Regards,
--
Mats Henrikson
Unix Systems Programmer
Systems Development & Support
Oxford University Computing Services


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Shakeel Ahmad
2004-08-25 13:57:15 UTC
Permalink
Ok, thanks let me work around on your ideas, and let you know in couple of
days, I really appreciate your prompt replies.

-----Original Message-----
From: Dale, Matt [mailto:***@beCogent.com]
Sent: Wednesday, August 25, 2004 6:31 PM
To: Tomcat Users List
Subject: RE: Tomcat JVM GC



You should still look at the articles that I posted my reply. If you really
want to use your own garbage collection then you will have to first fix the
size of the certain areas within the heap. There is no way to turn off the
jvm's own garbage collection, when it cannot allocate space for an object it
will do a garbage collection. If there is still not enough space then it
will expand the pool so that there is space, up until the maximum allowed
for that pool.

If you fix the size of the pools and always do a gc before the pool runs out
of memory then you will be fine. If you've fixed the pools and you run out
of memory then your own gc algorithm must be deficient and the JVM will do a
gc anyway.

I suspect that with the vast array of GC parameters available you should be
able to find some that will work as well as or better than your own but
thats just my opinion.

-----Original Message-----
From: Shakeel Ahmad [mailto:***@globalnorthstar.com]
Sent: 25 August 2004 14:17
To: Tomcat Users List
Subject: RE: Tomcat JVM GC


Actually we have our own gc mechanism which has a proven record of doing
things for our application, it never lets our application go out of memory,
but it works at high level, now with this robust design we have only issues
from JVM's original gc work. Our calculations have proven that if JVM's gc
does not work automatically then our real time nodes can work more
effectively.

-----Original Message-----
From: Mats Henrikson [mailto:***@herald.ox.ac.uk]
Sent: Wednesday, August 25, 2004 4:46 PM
To: Tomcat Users List
Subject: RE: Tomcat JVM GC
Post by Shakeel Ahmad
Its known that JVM schedular runs gc thread depending upon some concrete
values, now I want to set such parameters, or my heap sizes so that the
JVM
Post by Shakeel Ahmad
schedular, ignores gc thread. We have 1.3G Ram on our server and our heap
You are mistaken, you do not want it to ignore the gc thread, as you
would then very fast run out of heap space, you just want to tune the
garbage collector a little.

To do this, read this page until you understand it:

http://java.sun.com/docs/hotspot/gc1.4.2/

Then you can use the GC Portal tool to help you define the optimal GC
configuration for your application:

http://java.sun.com/developer/technicalArticles/Programming/GCPortal/

Of course, it could turn out that in order to improve your performance
you might have to rewrite parts of your application to be less wasteful
with objects.

Regards,
--
Mats Henrikson
Unix Systems Programmer
Systems Development & Support
Oxford University Computing Services


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Loading...