You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Thomas Hoffmann (Speed4Trade)" <Th...@Speed4Trade.com> on 2007/05/21 16:40:09 UTC

Tomcat-Question: Inefficient searching for jsp-files?

Hello,
i am using Tomcat 5.5.23. When i request a simple jsp-file
my file-monitor shows me, that tomcat is searching from root.
This is a problem for website with a lot of traffic.
A screenshot is attached to this mail.

The Context-Entry looks like 
<Context docBase="D:\inetpub\wwwroot\tyres4trade" path="" privileged="true"
 workdir="...." reloadable="fals" />

Thanks for suggestions,
Thomas


Re: AW: Tomcat-Question: Inefficient searching for jsp-files?

Posted by Tim Funk <fu...@joedog.org>.
I don't think tomcat(explicitly) is doing this. It could be any of the 
following:
1) When the file is found a full path check is done to prevent sneaky 
people from trying ../../ tricks - so I you might see the JVM and how it 
implments File.getAbsolutePath) on a file
2) It could be IIS doing the checks and not tomcat
3) It could be the IIS jk plugin - but I'm not sure about that possibility.
4) ???

My vote is for #1

-Tim

Thomas Hoffmann (Speed4Trade) wrote:
> Hi,
> my contect-configuratation looks like:
> <Context docBase="D:\inetpub\wwwroot\tyres4trade" path="" 
>  privileged="true"  workdir="...." reloadable="fals" />
> 
> when i request e.g. test.jsp from browser my file-monitor show
> the following harddisc-accesses:
> d:\
> d:\inetpub
> d:\inetpub\wwwroot
> d:\inetpub\wwwroot\tyres4trade
> d:\inetpub\wwwroot\tyres4trade\test.jsp
> d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found)
> <tomcat-root>\tomcat 5.5\work\org\apache\jsp\test_jsp.class
> 
> i ask myself why does tomcat start to search from d:\ instead of docBase?


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


Re: AW: Tomcat-Question: Inefficient searching for jsp-files?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas,

Thomas Hoffmann (Speed4Trade) wrote:
> when i request e.g. test.jsp from browser my file-monitor show
> the following harddisc-accesses:
> d:\
> d:\inetpub
> d:\inetpub\wwwroot
> d:\inetpub\wwwroot\tyres4trade
> d:\inetpub\wwwroot\tyres4trade\test.jsp
> d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found)
> <tomcat-root>\tomcat 5.5\work\org\apache\jsp\test_jsp.class
> 
> i ask myself why does tomcat start to search from d:\ instead of docBase?

Have you tried observing any other programs when they load files? How
about a non-Tomcat Java process that attempts to load a file with a
specific path.

It's possible that Tomcat is reading the directories to make sure they
exist, so it can give you a good error message (if they don't).

If you re-request the same file, does it re-check? What if you request a
file that /does/ exist, and then re-request it? Does it re-check from
the root?

This is probably a question for the developer list.

- -chris

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

iD8DBQFGUhkM9CaO5/Lv0PARAi6vAJ9610+CKsRnVKIkWwxK1+M8NzL76ACffGk3
anQncmWDSPnmK3Ta14v4oHo=
=0hEG
-----END PGP SIGNATURE-----

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


AW: Tomcat-Question: Inefficient searching for jsp-files?

Posted by "Thomas Hoffmann (Speed4Trade)" <Th...@Speed4Trade.com>.
Hi,
my contect-configuratation looks like:
<Context docBase="D:\inetpub\wwwroot\tyres4trade" path="" 
 privileged="true"  workdir="...." reloadable="fals" />

when i request e.g. test.jsp from browser my file-monitor show
the following harddisc-accesses:
d:\
d:\inetpub
d:\inetpub\wwwroot
d:\inetpub\wwwroot\tyres4trade
d:\inetpub\wwwroot\tyres4trade\test.jsp
d:\inetpub\wwwroot\tyres4trade\localhost\test.jsp (not found)
<tomcat-root>\tomcat 5.5\work\org\apache\jsp\test_jsp.class

i ask myself why does tomcat start to search from d:\ instead of docBase?


-----Ursprüngliche Nachricht-----
Von: Rashmi Rubdi [mailto:rashmi.sub@gmail.com] 
Gesendet: Montag, 21. Mai 2007 19:56
An: Tomcat Users List
Betreff: Re: Tomcat-Question: Inefficient searching for jsp-files?


On 5/21/07, Thomas Hoffmann (Speed4Trade) <Th...@speed4trade.com> wrote:
> Hello,
> i am using Tomcat 5.5.23. When i request a simple jsp-file
> my file-monitor shows me, that tomcat is searching from root. This is 
> a problem for website with a lot of traffic. A screenshot is attached 
> to this mail.

All attachments are filtered out automatically.

Please post the URL of the screen shot and/or other relevant information such as log file contents etc.


> The Context-Entry looks like
> <Context docBase="D:\inetpub\wwwroot\tyres4trade" path="" 
> privileged="true"  workdir="...." reloadable="fals" />
>
> Thanks for suggestions,
> Thomas

-Regards
Rashmi

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


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


Re: Tomcat-Question: Inefficient searching for jsp-files?

Posted by Rashmi Rubdi <ra...@gmail.com>.
On 5/21/07, Thomas Hoffmann (Speed4Trade)
<Th...@speed4trade.com> wrote:
> Hello,
> i am using Tomcat 5.5.23. When i request a simple jsp-file
> my file-monitor shows me, that tomcat is searching from root.
> This is a problem for website with a lot of traffic.
> A screenshot is attached to this mail.

All attachments are filtered out automatically.

Please post the URL of the screen shot and/or other relevant
information such as log file contents etc.


> The Context-Entry looks like
> <Context docBase="D:\inetpub\wwwroot\tyres4trade" path="" privileged="true"
>  workdir="...." reloadable="fals" />
>
> Thanks for suggestions,
> Thomas

-Regards
Rashmi

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