Author Login
Post Reply
users Digest 2 Sep 2010 23:28:20 -0000 Issue 9838
Topics (messages 216518 through 216542):
Re: URL rewrite
216518 by: Felix Schumacher
Re: pick load
216519 by: Alexandre Chapellon
216534 by: Christopher Schultz
Re: [OT] FileUploadBase$IOFileUploadException
216520 by: Paul Szynol
Re:
java.net.BindException: Address already in use
216521 by: Paul Bourget
216538 by: Christopher Schultz
Re: Question on SSI
216522 by: Wesley Acheson
216523 by: Wesley Acheson
216537 by: Christopher Schultz
Host Manager.
216524 by: Wesley Acheson
216526 by: Caldarale, Charles R
216528 by: Jordan Michaels
216529 by: Wesley Acheson
216533 by: Wesley Acheson
216535 by: Jeffrey Janner
216536 by: Caldarale, Charles R
216540 by: Christopher Schultz
Re: FileUploadBase$IOFileUploadException
216525 by: André Warnier
216527 by: Paul Szynol
Phantom Sessions
216530 by: Paul Szynol
216531 by: Caldarale, Charles R
216532 by: Paul Szynol
216539 by: Christopher Schultz
216541 by: Paul Szynol
216542 by: Pid
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@(protected)
To unsubscribe, e-mail: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
users_216518.ezm (zipped)Am Donnerstag, den 02.09.2010, 09:49 -0700 schrieb Mohit Anchlia:
> On Thu, Sep 2, 2010 at 9:35 AM, michel <compukat@(protected):
> >
> > ----- Original Message ----- From: "Mohit Anchlia" <mohitanchlia@(protected)>
> > To: "Tomcat Users List" <users@(protected)>
> > Sent: Thursday, September 02, 2010 12:25 PM
> > Subject: Re: URL rewrite
> >
> >
> >> On Wed, Sep 1, 2010 at 6:21 PM, Hassan Schroeder
> >> <hassan.schroeder@(protected):
> >>>>
> >>>> 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
> >>>
> >> Is URL rewrite module inbuilt or is there something that need to get
> >> loaded
> >
> >
> >
> >
> >
> > http://code.google.com/p/urlrewritefilter/
> >
> Looks like it needs a servlet for tomcat. Is there something like
> mod_rewrite where any request coming in tomcat and without having to
> have servlet can be changed?
You could configure your webapps as multi-level contexts as described on
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html.
So if your context file was named a.xml you could rename it to
"b#a.xml".
Bye
Felix
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@(protected)
> > For additional commands, e-mail: users-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>

Attachment:
users_216519.ezm (zipped)Le jeudi 02 septembre 2010 à 11:22 -0400, Christopher Schultz a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alexandre,
>
> On 9/2/2010 12:08 AM, Alexandre Chapellon wrote:
> > Forget about it this doesn't seems to be related to the jk connector.
>
> Right: the jk connector can be tweaked separately. You appear to have
> other problems.
>
> > 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)
>
> That looks like an application error to me.
Yes to me too, but what's weired is that thoose errors enver appears
under normal load... this really drives me crazy!
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkx/wTMACgkQ9CaO5/Lv0PDXFgCgrMYix3jPszsSdOotB2qyZ9+i
> DBIAnjm44KkSTGLwRtl6GswN/njUC5bD
> =ZDt3
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>

Attachment:
users_216534.ezm (zipped)-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexandre,
On 9/2/2010 1:49 PM, Alexandre Chapellon wrote:
> Yes to me too, but what's weired is that thoose errors enver appears
> under normal load... this really drives me crazy!
I would bet that there's an exception being caught and re-thrown without
the original exception being logged. Check the code around where that
exception is being thrown (Client.java:676) and see if it's in a catch
block. If so, try logging the original exception, or chaining the root
cause to the new exception like this:
throw new Exception("Erreur: impossible de recuperer la partie CHAP0712A
: " + whatever, originalException);
This will help you figure out what's really happening.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyAGMcACgkQ9CaO5/Lv0PBMqgCgove+TKLYTcsd9JWQy3gTff4b
qgMAn0F7jknSIJ1+xrtseRkRZtpMmKKp
=9CDH
-----END PGP SIGNATURE-----

Attachment:
users_216520.ezm (zipped)
Hey, Chris,
Thanks for your note.
java.io.tmpdir has the same value as the temp dir set up in catalina.sh,
which is a subdirectory of Tomcat, and which Tomcat is permitted to
access (r and w).
Your point about writing to disk twice is well taken. As far as I can
tell, fileupload doesn't give you a handle to the tmp file, but I'll
take a closer look to see if there is a way to utilize the stored data
before it's deleted--that would speed things up indeed.
Thanks for the suggestion.
Best wishes,
Paul
On 9/2/10 10:43 AM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Paul,
>
> On 9/1/2010 11:27 PM, Paul Szynol wrote:
>> 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.
> You didn't mention what the former and latter are ;)
>
> Again, unless you configure commons-fileupload to use Tomcat's tempdir,
> it'll default to java.io.tmpdir, which you didn't report. What is that
> set to?
>
>> 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).
> If commons-fileupload is willing to store the file on the disk for you,
> why not let it do that and provide an InputStream to your db-writing
> code? Otherwise, you might end up writing the same file to the disk
> /twice/ before putting it into the database (and back to the disk a
> third time).
>
>> It looks like fileupload is meant to store a temporary version of the
>> image during the upload, presumably to minimize memory usage.
> I believe so. Under a certain size, it will just use memory and leave
> the disk alone.
>
>> 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.
> Can you post your code for commons-fileupload usage? That might help.
>
>> 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. :(
> Exactly why this feature exists. ;) You could also limit the number of
> simultaneous uploads, and then make sure your upload concurrency limit *
> maximum image size is affordable under your memory constraints.
>
>> I've sent an inquiry to the apache commons user mailing list. I will
>> follow up here when I hear back.
> Sound good.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkx/uBMACgkQ9CaO5/Lv0PDCEwCfUJ0S+oTiLCujI5NLIxk1Awel
> iAYAn08cN5LCkmshK4AseeEPPKg+4/gG
> =hgED
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment:
users_216521.ezm (zipped)I am not clear on the question as I inserted the log file in the early
emails.
Paul
Paul Bourget
Isabella Products
-----Original Message-----
From: Christopher Schultz [mailto:chris@(protected)]
Sent: Tuesday, August 31, 2010 3:21 PM
To: Tomcat Users List
Subject: Re:
java.net.BindException: Address already in use
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul,
On 8/31/2010 3:07 PM, Paul Bourget wrote:
> I compared the server.xml file to the one used on the production
servers
> and it was the same except for the ip addresses. During bootup I get
> the failure but when I run the "Catalina.sh start" command, tomcat
> starts up fine.
So, it only fails on system boot? Okay, what happens at system boot,
then?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkx9VjUACgkQ9CaO5/Lv0PCNSgCgoUQF9ZAbv79Zavy/PAyIqPuV
fswAoJ/n4ysGbLyaZQz1HkCdIIOfSGtC
=lHMM
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

Attachment:
users_216538.ezm (zipped)-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul,
On 9/2/2010 2:41 PM, Paul Bourget wrote:
> I am not clear on the question as I inserted the log file in the early
> emails.
I meant: what does your system /perform/ on boot... not what are the
effects. For example: what startup script launches Tomcat? What does it
look like? Where did you get it?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyAH7MACgkQ9CaO5/Lv0PAACwCgg1Wumn2Up2YwMYdmvAG84To/
fKEAn1IPim2Ri4ffimyxhURQPPA/JoUF
=ciVL
-----END PGP SIGNATURE-----

Attachment:
users_216522.ezm (zipped)On Thu, Sep 2, 2010 at 6:45 AM, Marc Chamberlin <marc@(protected):
>
> 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.
Maybe if you could come up with some concrete suggestions then I think
the project owners may be intrested. I'm not talking for them though
whatever I say is just what I think.
>
> 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.
Take the following jsp as an example
<%@(protected)"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
</body>
</html>
The content type is defined in the above jsp as text/html. Thats the
mime type that will be sent back to a browser. Not all jsp's however
need to return text/html this is equally valid. And has a very
different response in a browser.
<%@(protected)"
pageEncoding="UTF-8"%>
<?xml version="1.0"?>
<root><text id="message">Hello from an xml file</text></root>
Or in the case of a servlet the contentType may be defined by
response.setContentType().
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletResponse.html#setContentType%28java.lang.String%29
The final piece of the puzzle is understanding what tomcat does when
you don't set a content type such as serving a static file. Firstly it
looks in the web.xml of your application to see if it should match a
mime type to a file extension. Then it looks in its web.xml in its
conf directory. If you read the web.xml in its conf directory you
should see:
<!--
<mime-mapping>
<extension>shtml</extension>
<mime-type>text/x-server-parsed-html</mime-type>
</mime-mapping>
-->
This indicates that (when uncommented) the mime type returned to the
browser for a request to *.shtml will have the mime type of
text/x-server-parsed-html now I've no idea if thats standard or not
but it was used back in the apache httpd server 1.3 days.
http://httpd.apache.org/docs/1.3/mod/mod_include.html
>
> 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 the standard mime type of most webpages are in. The only
reason I added the (;.*)? is it was in the initial expression and it
had to do something. ?? Right!??
>
> 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...
TBH me either, I've just looked it up though. It appears that mime
type can have a ; symbol after them followed by the name of the
applications that should handle them. I never knew that, So the
example I see at
http://sylpheeddoc.sourceforge.net/en/manual/manual-14.html is
application/pdf; xpdf so it appears that the expression is text/html
followed by a ; followed by 1 or more characters where the expression
group a ; followed by 1 character may occur at zero or more times.
>
> 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...
Whats being matched is what would be served to the browser if the
included file was served.
For example jsp's often begin.
>
> 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-name>ssi</filter-name>
>> <url-pattern>*.html</url-
>> pattern>
>> </filter-mapping>
>>
>> <filter-mapping>
>> <filter-name>ssi</filter-name>
>> <url-pattern>*.htm</url-
>> pattern>
>> </filter-mapping>
>>
>> <filter-mapping>
>> <filter-name>ssi</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..
Okay my takes on mime type is as follows. Their just an accepted
string that the browser can match against which says what the file
contains. Applications which are installed on your system are free to
(and do) add handlers for new mime types.
In the jsp example above I could have served the contentType as
"application/wesley+great+idea". And if I installed an application on
your system that listens to this any file you download from the
browser which declared that mime type would be handled by that
application. (for the record its a terrible idea not a great one)
Honestly its that simple. Once you get your head arround that you
should see there are some "standard" mime types that are handled in a
certain way. The meaning of them is well understood and they may be
handled by multiple applications. The file extension is pretty
meaningless. After all the xml example above doesn't have a .xml
extension when you view it in a browser it has a .jsp one.
So mime types basically do boil down to lists in the very end. Some
are understood and tomcat makes an effort to list the ones it knows
about.
Hope this is helpful Marc. Honestly if theres anything useful I
suggest you suggest how the docs can be improved.
Wes

Attachment:
users_216523.ezm (zipped)On Thu, Sep 2, 2010 at 9:22 PM, Wesley Acheson <wesley.acheson@(protected):
Far too much.
Anyway I'm also interested in the ; mime types if anyone has any better
reference.
Also what does tomcat do if serving a static file with an unlisted
extension?

Attachment:
users_216537.ezm (zipped)-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Wesley,
On 9/2/2010 3:30 PM, Wesley Acheson wrote:
> On Thu, Sep 2, 2010 at 9:22 PM, Wesley Acheson <wesley.acheson@(protected):
> Far too much.
:)
You're very kind to explain everything in detail.
> Anyway I'm also interested in the ; mime types if anyone has any better
> reference.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 (and 3.7.1)
The stuff after the ";" is called a "parameter" and for text/* types,
the character encoding should be specified using the "charset"
parameter. Without the "charset" parameter, the default is supposed to
be "ISO-8859-1".
> Also what does tomcat do if serving a static file with an unlisted
> extension?
The default appears to be "text/plain", though I can't find that in the
HTTP spec, the servlet specification, or the Tomcat source code.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyAHxkACgkQ9CaO5/Lv0PDDAgCeI+fHDmQEAVokWU+yVvm0bo7y
awEAn2SPrZa5EjNgL0snep9MAvLiJXXS
=AnkW
-----END PGP SIGNATURE-----

Attachment:
users_216524.ezm (zipped)Few Questions
Is there is no documentation for the host-manager?
If I remember correctly from this list it doesn't persist its settings is
that correct?
How many people would be interested in it persisting its settings, by
editing the appropriate files.
Final question.
Is that in theory possible? to add the folder structure and the appropiate
context.xml files. Would it interfere too badly with tomcat while it was
running?
I really like the idea of the host manager. If it persisted its features I
may actually have used it.
Regards,
Wes

Attachment:
users_216526.ezm (zipped)> From: Wesley Acheson [mailto:wesley.acheson@(protected)]
> Subject: Host Manager.
> Is there is no documentation for the host-manager?
Very little that I've found. You can learn a bit about it by looking at its WEB-INF/web.xml file.
> If I remember correctly from this list it doesn't persist
> its settings is that correct?
Correct.
> How many people would be interested in it persisting its
> settings, by editing the appropriate files.
I would be interested. Note that there's only one file to edit: conf/server.xml.
> Is that in theory possible?
It's all software...
> to add the folder structure and the appropiate
> context.xml files.
That's not necessary - the conf/Catalina/[host]/... files are already created automatically as webapps are deployed under the new <Host>. Only conf/server.xml needs to be updated.
> Would it interfere too badly with tomcat while
> it was running?
No, Tomcat only reads server.xml during startup. Whatever update mechanism is used must insure that the file is never in an unparsable state (e.g., don't update in place, instead create a new file and then rename it).
- 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.

Attachment:
users_216528.ezm (zipped)I'd be interested as well. I've actually been meaning to get to this
myself and submit a patch to make the changes persist, but my schedule
has been too hectic for any extra-curricular work recently. If you don't
(and I'm hoping you will)... I will get to it eventually. ;)
-Jordan
On 09/02/2010 01:06 PM, Caldarale, Charles R wrote:
>> From: Wesley Acheson [mailto:wesley.acheson@(protected)]
>> Subject: Host Manager.
>
>> Is there is no documentation for the host-manager?
>
> Very little that I've found. You can learn a bit about it by looking at its WEB-INF/web.xml file.
>
>> If I remember correctly from this list it doesn't persist
>> its settings is that correct?
>
> Correct.
>
>> How many people would be interested in it persisting its
>> settings, by editing the appropriate files.
>
> I would be interested. Note that there's only one file to edit: conf/server.xml.
>
>> Is that in theory possible?
>
> It's all software...
>
>> to add the folder structure and the appropiate
>> context.xml files.
>
> That's not necessary - the conf/Catalina/[host]/... files are already created automatically as webapps are deployed under the new<Host>. Only conf/server.xml needs to be updated.
>
>> Would it interfere too badly with tomcat while
>> it was running?
>
> No, Tomcat only reads server.xml during startup. Whatever update mechanism is used must insure that the file is never in an unparsable state (e.g., don't update in place, instead create a new file and then rename it).
>
> - 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment:
users_216529.ezm (zipped)On Thu, Sep 2, 2010 at 10:42 PM, Jordan Michaels <jordan@(protected):
> I'd be interested as well. I've actually been meaning to get to this myself
> and submit a patch to make the changes persist, but my schedule has been too
> hectic for any extra-curricular work recently. If you don't (and I'm hoping
> you will)... I will get to it eventually. ;)
>
> -Jordan
>
>
> On 09/02/2010 01:06 PM, Caldarale, Charles R wrote:
>
>> From: Wesley Acheson [mailto:wesley.acheson@(protected)]
>>> Subject: Host Manager.
>>>
>>
>> Is there is no documentation for the host-manager?
>>>
>>
>> Very little that I've found. You can learn a bit about it by looking at
>> its WEB-INF/web.xml file.
>>
>> If I remember correctly from this list it doesn't persist
>>> its settings is that correct?
>>>
>>
>> Correct.
>>
>> How many people would be interested in it persisting its
>>> settings, by editing the appropriate files.
>>>
>>
>> I would be interested. Note that there's only one file to edit:
>> conf/server.xml.
>>
>> Is that in theory possible?
>>>
>>
>> It's all software...
>>
>> to add the folder structure and the appropiate
>>> context.xml files.
>>>
>>
>> That's not necessary - the conf/Catalina/[host]/... files are already
>> created automatically as webapps are deployed under the new<Host>. Only
>> conf/server.xml needs to be updated.
>>
>> Would it interfere too badly with tomcat while
>>> it was running?
>>>
>>
>> No, Tomcat only reads server.xml during startup. Whatever update
>> mechanism is used must insure that the file is never in an unparsable state
>> (e.g., don't update in place, instead create a new file and then rename it).
>>
>> - Chuck
>>
>> I don't have a huge amount of time right now but yeah as far as I
understand it, it shouldn't be tooooooo difficult. I do have another side
project (in php) which Is probably more urgent to me.
However I was thinking about doing this. Really I'm not sure what way the
community is supposed to feed in its desires at the moment. So I thought
maybe the best way was to ensure there was some interest here before
committing myself.
Wes

Attachment:
users_216533.ezm (zipped)On Thu, Sep 2, 2010 at 10:06 PM, Caldarale, Charles R <
Chuck.Caldarale@(protected):
> > From: Wesley Acheson [mailto:wesley.acheson@(protected)]
>
> > How many people would be interested in it persisting its
> > settings, by editing the appropriate files.
>
> I would be interested. Note that there's only one file to edit:
> conf/server.xml.
>
Honestly I thought there was more than one going from this
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
>
> > Is that in theory possible?
>
> It's all software...
>
> > to add the folder structure and the appropiate
> > context.xml files.
>
> That's not necessary - the conf/Catalina/[host]/... files are already
> created automatically as webapps are deployed under the new <Host>. Only
> conf/server.xml needs to be updated.
>
>
>
I've just created a host using the host manager. And deployed a war. I don't
see such a file. just the manager.xml
> > Would it interfere too badly with tomcat while
> > it was running?
>
> No, Tomcat only reads server.xml during startup. Whatever update mechanism
> is used must insure that the file is never in an unparsable state (e.g.,
> don't update in place, instead create a new file and then rename it).
>
>
Understood for server.xml is the same true of the context files though?

Attachment:
users_216535.ezm (zipped)I'd be happy if it just wrote out a new file based on the settings at
the time I said save -- damn the comments.
At least then, it's a pretty straight-forward bit of save code.
But, if you're one of those who has to save the commentary that's
already there, then have fun.
Jeff
> -----Original Message-----
> From: Wesley Acheson [mailto:wesley.acheson@(protected)]
> Sent: Thursday, September 02, 2010 2:40 PM
> To: Tomcat Users List
> Subject: Host Manager.
>
> Few Questions
>
> Is there is no documentation for the host-manager?
>
> If I remember correctly from this list it doesn't persist its settings
> is
> that correct?
>
> How many people would be interested in it persisting its settings, by
> editing the appropriate files.
>
> Final question.
>
> Is that in theory possible? to add the folder structure and the
> appropiate
> context.xml files. Would it interfere too badly with tomcat while it
> was
> running?
>
> I really like the idea of the host manager. If it persisted its
> features I
> may actually have used it.
>
> Regards,
>
> Wes
__________________________________________________________________________
Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.
If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.

Attachment:
users_216536.ezm (zipped)> From: Wesley Acheson [mailto:wesley.acheson@(protected)]
> Subject: Re: Host Manager.
> Honestly I thought there was more than one going from this
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
The files should be created automatically - but only when needed.
> I've just created a host using the host manager.
> And deployed a war. I don't see such a file.
See what such file?
> just the manager.xml
Where is that located? When I tried it (6.0.29), the host-manager copied its manager.xml template to conf/Catalina/[newHost]/manager.xml, and put this in it:
<Context docBase="${catalina.home}/webapps/manager"
privileged="true" antiResourceLocking="false" antiJARLocking="false">
</Context>
It also automatically created the new appBase directory for the new host. I did click the _Start_ button on the line for the new <Host>; don't know if that was needed or not.
> Understood for server.xml is the same true of the context files though?
Since they've never been seen before (brand new <Host>), it won't matter. But there really aren't any for the host-manager to create, other than the one for the manager app, so webapps can be deployed under the new <Host>.
- 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.

Attachment:
users_216540.ezm (zipped)-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeffrey,
On 9/2/2010 5:40 PM, Jeffrey Janner wrote:
> I'd be happy if it just wrote out a new file based on the settings at
> the time I said save -- damn the comments.
> At least then, it's a pretty straight-forward bit of save code.
> But, if you're one of those who has to save the commentary that's
> already there, then have fun.
It doesn't seem unreasonable to persist the comments: they're XML
elements, too. If you can write code to parse and insert elements into
an XML tree, you can afford to keep the comments in there, too.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyAIbUACgkQ9CaO5/Lv0PCh0ACdFLsEc5231/hM8bD1Ajx9AOq7
+hcAoIkwLr+vFJ0+sO6SYa67bAfvv1qc
=amdL
-----END PGP SIGNATURE-----

Attachment:
users_216525.ezm (zipped)Paul Szynol wrote:
>
> Chris, I agree. "Exceeds threshold size" or something along those lines
> would be a lot more helpful.
> Paul
>
I believe that you missed Konstantin's message, and that consequently you may have a false
sense of security and a false sense of having found the correct solution and a false sense
that the error message was inaccurate.
In http://commons.apache.org/fileupload/using.html, they show these settings :
// Set factory constraints
factory.setSizeThreshold(yourMaxMemorySize);
factory.setRepository(yourTempDirectory);
...
// Set overall request size constraint
upload.setSizeMax(yourMaxRequestSize);
From this, and from your original message, I gather that the way it works is :
- FileUpload will first try to upload the whole request in memory (for performance).
But if the request size exceeds the value set by .setSizeThreshold() (or 1 MB by default),
it will instead create a temporary file on disk to store the request.
- when it starts doing this (writing to disk), it is going to create this temporary file
in the directory indicated by .setRepository(). If this is not explicitly set, it will
default to "/".
So what happened on your first iteration, was that when the size exceeded the default of 1
MB, it tried to create a temporary file in "/", and failed because Tomcat does not have
permission to write there. From there came the (accurate) error message.
Now that you have increased the .setSizeThreshold() size, it does not reach it anymore, so
it does not create a temporary file, so you do not see the message anymore.
But it is a false solution, because now you have potentially very large files being
loaded in memory, and when that limit will some day be exceeded, you will get the
permissions message again.

Attachment:
users_216527.ezm (zipped)
Hey, André,
Thanks for your note.
After his second email, I understood better Konstantin's point (there
are subsequent exchanges, after the one you're quoting), and I agree
with you and him that the exception seems related to a file system
permission issue.
> - when it starts doing this (writing to disk), it is going to create
> this temporary file in the directory indicated by .setRepository().
> If this is not explicitly set, it will default to "/".
>
> So what happened on your first iteration, was that when the size
> exceeded the default of 1 MB, it tried to create a temporary file in
> "/", and failed because Tomcat does not have permission to write
> there. From there came the (accurate) error message.
So, interestingly, I actually tried the opposite and simply removed the
setRepository() call altogether, to let fileupload use its default value
(which I had avoided doing for the reasons you list). I am no longer
getting the exception. I think that means the default value for
setRepository is not "/", but javax.servlet.context.tempdir or
java.io.tmpdir or another temp directory.
I still don't quite understand why setting the temp directory expressly
failed (as Tomcat had permission to write to it), and I haven't checked
the default temp directories yet to see if that is in fact where the
temp file is now being written (it should be written somewhere, since
the images have exceeded the threshold size). But this seems to confirm
that, as you both suggested, the exception results from a file system
permission.
Best wishes,
Paul

Attachment:
users_216530.ezm (zipped)
I've recently noticed "phantom" session objects on one of my Tomcat
webapps. These sessions have no IP addresses and their sole URI request
is always for "/". I am not sure if this is a sign of a problem, or how
to trace it--has anyone else encountered something similar?
Best wishes,
Paul

Attachment:
users_216531.ezm (zipped)> From: Paul Szynol [mailto:paul.szynol@(protected)
> Subject: Phantom Sessions
> I've recently noticed "phantom" session objects on one of
> my Tomcat webapps.
Tomcat version?
What are you using to observe these sessions?
- 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.

Attachment:
users_216532.ezm (zipped)
I don't have the minor version information, but it's Tomcat 6. Each
session object is added to a ConcurrentHashMap when SessionListener's
sessionCreated() is invoked.
Best,
Paul
On 9/2/10 5:01 PM, Caldarale, Charles R wrote:
>> From: Paul Szynol [mailto:paul.szynol@(protected)
>> Subject: Phantom Sessions
>> I've recently noticed "phantom" session objects on one of
>> my Tomcat webapps.
> Tomcat version?
>
> What are you using to observe these sessions?
>
> - 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment:
users_216539.ezm (zipped)-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul,
On 9/2/2010 5:10 PM, Paul Szynol wrote:
> I don't have the minor version information, but it's Tomcat 6. Each
> session object is added to a ConcurrentHashMap when SessionListener's
> sessionCreated() is invoked.
You likely have a default page (responds to requests for "/") that is a
JSP without a session="false" header. That means that the session is, by
default, created.
That means anyone visiting your website and then wandering away --
including robots, screen-scrapers, and search indexers -- gets a session
that sticks around for a long time and does nothing.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyAIB0ACgkQ9CaO5/Lv0PCJ7gCghs2t7oG73AT5AsOu9BmqhweT
DI0An3/aSTrqL+btt9fBHSOZnC2kfLsy
=1k2w
-----END PGP SIGNATURE-----

Attachment:
users_216541.ezm (zipped)
Hi, Chris,
Thanks for your response. I do get those requests, but it seems they
always generate standard user agent information, which I then store in
the associated session object. These session objects don't have any
user agent information--that's why I am wondering if they're generated
internally.
Best,
Paul
On 9/2/10 6:07 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Paul,
>
> On 9/2/2010 5:10 PM, Paul Szynol wrote:
>> I don't have the minor version information, but it's Tomcat 6. Each
>> session object is added to a ConcurrentHashMap when SessionListener's
>> sessionCreated() is invoked.
> You likely have a default page (responds to requests for "/") that is a
> JSP without a session="false" header. That means that the session is, by
> default, created.
>
> That means anyone visiting your website and then wandering away --
> including robots, screen-scrapers, and search indexers -- gets a session
> that sticks around for a long time and does nothing.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkyAIB0ACgkQ9CaO5/Lv0PCJ7gCghs2t7oG73AT5AsOu9BmqhweT
> DI0An3/aSTrqL+btt9fBHSOZnC2kfLsy
> =1k2w
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment:
users_216542.ezm (zipped)On 02/09/2010 23:20, Paul Szynol wrote:
>
> Hi, Chris,
>
> Thanks for your response. I do get those requests, but it seems they
> always generate standard user agent information, which I then store in
> the associated session object. These session objects don't have any
> user agent information--that's why I am wondering if they're generated
> internally.
Not all bots are well behaved.
How many are being created?
p
> Best,
> Paul
>
>
> On 9/2/10 6:07 PM, Christopher Schultz wrote:
> Paul,
>
> On 9/2/2010 5:10 PM, Paul Szynol wrote:
>>>> I don't have the minor version information, but it's Tomcat 6. Each
>>>> session object is added to a ConcurrentHashMap when SessionListener's
>>>> sessionCreated() is invoked.
> You likely have a default page (responds to requests for "/") that is a
> JSP without a session="false" header. That means that the session is, by
> default, created.
>
> That means anyone visiting your website and then wandering away --
> including robots, screen-scrapers, and search indexers -- gets a session
> that sticks around for a long time and does nothing.
>
> -chris
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)

Attachment:
0x62590808.asc (zipped)
Attachment:
signature.asc (zipped)