<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>users@tomcat.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/tomcat-users/"/>
<id>http://mail-archives.apache.org/mod_mbox/tomcat-users/</id>
<updated>2009-12-09T00:28:25Z</updated>
<entry>
<title>Re: mod_proxy tomcat6 question</title>
<author><name>groupalias v &lt;group.vas@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cb65609ea0912081558h73d882bbp274cf9a807dbfb74@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb65609ea0912081558h73d882bbp274cf9a807dbfb74@mail-gmail-com%3e</id>
<updated>2009-12-08T23:58:51Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks Chris. I was beginning to realize that myself. It hit me
yesterday that session management (though I have not started to deal
with it yet) could cause me problems if the apache mount and the
webapp do not match. Also having application code that is apache
directory aware is not at all clean.

- Vas

&gt;&gt;
&gt;&gt; Obviously the URL needs to be changed  /A/jsp/hi.jsp to
&gt;&gt; /test/jsp/hi.jsp and I believe the mo_proxy can be configured to do
&gt;&gt; this.
&gt;
&gt; No, you don't want this. When doing a "forward", everything is internal
&gt; to Tomcat, so the URL should be what Tomcat expects (that is,
&gt; "/A/jsp/hi.jsp"). If you were redirecting, you'd need to use
&gt; /test/jsp/hi.jsp.
&gt;
&gt;&gt; But I am not able to find it. Can someone point me to the right
&gt;&gt; direction?
&gt;
&gt; As Andre (essentially) suggests, maybe you ought to mount /A on /A
&gt; instead of /test.
&gt;
&gt; - -chris
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.4.10 (MingW32)
&gt; Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
&gt;
&gt; iEYEARECAAYFAksezY8ACgkQ9CaO5/Lv0PAu5wCfV1gn4U9Enj+9veQKM+Sqptd5
&gt; qdUAnjM8Ax3Bqey0/j6GFe/hbUJaSsxB
&gt; =L4zf
&gt; -----END PGP SIGNATURE-----
&gt;

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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: tomcat, uPortal, error messages and confusion</title>
<author><name>&quot;Caldarale, Charles R&quot; &lt;Chuck.Caldarale@unisys.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c99C8B2929B39C24493377AC7A121E21F968063561C@USEA-EXCH8.na.uis.unisys.com%3e"/>
<id>urn:uuid:%3c99C8B2929B39C24493377AC7A121E21F968063561C@USEA-EXCH8-na-uis-unisys-com%3e</id>
<updated>2009-12-08T23:41:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; From: Egeste [mailto:egeste@egeste.net]
&gt; Subject: Re: tomcat, uPortal, error messages and confusion
&gt; 
&gt; I'm unsure whether it's an "ubuntu mangled" version - I installed
&gt; tomcat5.5 via apt-get.

It's mangled, meaning that files may not be located where they are in the standard Tomcat
distribution, and some configuration settings may have been changed from the standard.

&gt; Here is my server.xml:
&gt; http://pastebin.ca/1707274

That looks o.k.

&gt; webapps/uPortal/META-INF/context.xml:
&gt; &lt;Context crossContext="true" reloadable="false"&gt;
&gt;     &lt;Manager pathname=""
&gt; className="org.apache.catalina.session.StandardManager"/&gt;
&gt; &lt;/Context&gt;

The above is fine.  What else do you have under the webapps directory?  In particular, is
there a default (ROOT) webapp deployed?  I seem to recall seeing blank pages returned when
no default webapp is available.

&gt; web.xml
&gt; http://pastebin.ca/1707286

That's pretty much unreadable, at least by humans my age.

 - 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@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: JSSE question</title>
<author><name>Vadim Letitchevski &lt;vletitchevski@teledyne.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cE17DA276F9A0C84FAD22739DE29C389005DBA9963C@ENTMAIL01.tad.teledyne.com%3e"/>
<id>urn:uuid:%3cE17DA276F9A0C84FAD22739DE29C389005DBA9963C@ENTMAIL01-tad-teledyne-com%3e</id>
<updated>2009-12-08T23:31:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks. I will try it.
Vadim. 

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Tuesday, December 08, 2009 1:57 PM
To: Tomcat Users List
Cc: Vadim Letitchevski
Subject: Re: JSSE question

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vadim,

On 12/7/2009 1:25 PM, Vadim Letitchevski wrote:
&gt; openssl pkcs12 -export -in /etc/pki/tls/certs/localhost.crt -inkey 
&gt; /etc/pki/tls/private/localhost.key -out mycert.p12 -name tomcat 
&gt; -CAfile /etc/pki/tls/cacert.pem -caname root -chain
&gt; 
&gt; I have used the password changeit.

Note that you have created certificate in PKCS12 format, not a keystore.
You now need to take the next step in the SSL HOWTO which is to use the Java 'keytool' utility
to create a keystore.

&gt; Next I have edited server.xml to have these strings:
&gt; 
&gt;     &lt;!-- Define a server-auth SSL HTTP/1.1 Connector on port 8442 --&gt;
&gt;     &lt;Connector port="8442" maxHttpHeaderSize="8192" SSLEnabled="true"
&gt;                keystoreFile="conf/mycert.p12" keystorePass="changeit"

If you are going to use the PKCS12 (.p12) format, you will probably have to set keystoreType="PKCS12".
Check the documentation for the SSL-specific &lt;Connector&gt; attributes again.

&gt;                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
&gt;                enableLookups="false" disableUploadTimeout="true"
&gt;                scheme="https" secure="true"
&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt; 
&gt;     &lt;!-- Define a mutual-auth SSL HTTP/1.1 Connector on port 8443 --&gt;
&gt;     &lt;Connector port="8443" maxHttpHeaderSize="8192" SSLEnabled="true"
&gt;                keystoreFile="conf/mycert.p12" keystorePass="changeit"
&gt;                truststoreFile="conf/mycert.p12" truststorePass="changeit"

Although I don't think it will hurt to have both, your keystore and truststore aren't the
same thing. Check the documentation for these two attributes. Again, you may need to use truststoreType="PKCS12"
if you want to use your .p12 file.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksey6YACgkQ9CaO5/Lv0PBwWQCgj6T+m87bL49GXvON7dzIaklo
S74AnRnYM6IIuo8pMQe/bDAaSbwocXzg
=k45M
-----END PGP SIGNATURE-----

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Control character in cookie value</title>
<author><name>=?ISO-8859-1?Q?Andr=E9_Warnier?= &lt;aw@ice-sa.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1EE12D.5080005@ice-sa.com%3e"/>
<id>urn:uuid:%3c4B1EE12D-5080005@ice-sa-com%3e</id>
<updated>2009-12-08T23:28:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Itay,

you seem to ignore selective parts of the answers and tips which you are 
given, and then rediscover them selectively 3 posts later.

itay sahar wrote:
&gt; Andre,
&gt; 
&gt; I'm not sure why you worry about the other cookie value.

Thank you for your concern, but I don't worry too much.  It is not my 
application, it is yours.

  let me show you an
&gt; example
&gt; maybe then you may see something that i'm missing.
&gt; 
&gt; getCookieMaxAge()  is  31536000
&gt; cookiePath    is   /jboss-seam-jpa

That's nice ! That is the first time you show us what getCookieMaxAge() 
and cookiePath can actually contain.
So now I can go to sleep peacefully, knowing that these parts of the 
cookie do not in effect contain control characters.
You see, before now, you were the only person who could know that for sure.

&gt; 
&gt; What can be wrong here ? It works!

I am sure that your first version of the application worked fine too, as 
long as the email addresses were very short.

&gt; Are you worry about special character on cookiePath. I can make sure
&gt; in my application this won't happen right ?

Right ! The whole point of my note was to point out to you that you 
should make sure of it.
Because if you did not make sure of it, then you could have been 
unexpectedly hit by yet another control character sometime in the 
future.  But now that you have taken care of it, I am reassured and happy.


&gt; If you think something is wrong in the methods below please suggest
&gt; solution..
&gt; 

The method below looks ok, by itself.  My worries were about things used 
in the method below, but coming from somewhere else previously unknown, 
like getCookieMaxAge() and cookiePath.



&gt; Thanks!
&gt; 
&gt; 
&gt; 
&gt; On Mon, Dec 7, 2009 at 10:42 PM, itay sahar &lt;itay.sahar@gmail.com&gt; wrote:
&gt; 
&gt;&gt; sure!
&gt;&gt;  protected void setCookieValueIfEnabled(String value)
&gt;&gt;    {
&gt;&gt;       FacesContext ctx = FacesContext.getCurrentInstance();
&gt;&gt;
&gt;&gt;       if ( isCookieEnabled() &amp;&amp; ctx != null)
&gt;&gt;       {
&gt;&gt;          HttpServletResponse response = (HttpServletResponse)
&gt;&gt; ctx.getExternalContext().getResponse();
&gt;&gt;          Cookie cookie = new Cookie( getCookieName(), value );
&gt;&gt;          cookie.setMaxAge( getCookieMaxAge() );
&gt;&gt;          cookie.setPath(cookiePath);
&gt;&gt;          response.addCookie(cookie);
&gt;&gt;       }
&gt;&gt;    }
&gt;&gt;
&gt;&gt; On Mon, Dec 7, 2009 at 10:26 PM, André Warnier &lt;aw@ice-sa.com&gt; wrote:
&gt;&gt;
&gt;&gt;&gt; itay sahar wrote:
&gt;&gt;&gt;
&gt;&gt;&gt;&gt; sure!
&gt;&gt;&gt;&gt; protected void clearCookieValue()
&gt;&gt;&gt;&gt;   {
&gt;&gt;&gt;&gt;      Cookie cookie = getCookie();
&gt;&gt;&gt;&gt;      if ( cookie!=null )
&gt;&gt;&gt;&gt;      {
&gt;&gt;&gt;&gt;         HttpServletResponse response = (HttpServletResponse)
&gt;&gt;&gt;&gt; FacesContext.getCurrentInstance().getExternalContext().getResponse();
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;         cookie.setValue(null);
&gt;&gt;&gt;&gt;         cookie.setPath(cookiePath);
&gt;&gt;&gt;&gt;         cookie.setMaxAge(0);
&gt;&gt;&gt;&gt;         response.addCookie(cookie);
&gt;&gt;&gt;&gt;      }
&gt;&gt;&gt;&gt;   }
&gt;&gt;&gt;&gt;
&gt;&gt;&gt; That's not the code setting the cookie, it is code clearing a cookie
&gt;&gt;&gt; value. But nevertheless..
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;  But look like problem is fixed. I extended the encodeToken method and
&gt;&gt;&gt;&gt; change
&gt;&gt;&gt;&gt; it to be
&gt;&gt;&gt;&gt; return Base64.encodeBytes(sb.toString().getBytes(),
&gt;&gt;&gt;&gt; Base64.DONT_BREAK_LINES);
&gt;&gt;&gt;&gt; And now it works (like a charm)!
&gt;&gt;&gt;&gt;
&gt;&gt;&gt; And may I point you to a remark from quite a few posts ago, which went
&gt;&gt;&gt; like :
&gt;&gt;&gt; ...
&gt;&gt;&gt; --quote--
&gt;&gt;&gt;
&gt;&gt;&gt; Except that some Base64 encoders, in some cases, will "wrap" the output
&gt;&gt;&gt; string at 76 bytes, by inserting a CR/LF pair, which are both "control
&gt;&gt;&gt; characters".  (Note that the output string of Base64 is longer than the
&gt;&gt;&gt; input string, since it encodes 3 consecutive input bytes into 4 output
&gt;&gt;&gt; bytes.)
&gt;&gt;&gt; My guess is that this is what happens here, and that could trigger the
&gt;&gt;&gt; exception above.
&gt;&gt;&gt; Maybe this Base64.encodeBytes() method has an optional argument which
&gt;&gt;&gt; would tell it to not wrap the output value ?
&gt;&gt;&gt; --end of quote--
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;&gt; but i'm not sure it solve all the
&gt;&gt;&gt;&gt; scenarios/possibilities.
&gt;&gt;&gt; No, as also already pointed out, considering the code you posted before, a
&gt;&gt;&gt; control character could also creep into cookiePath or getCookieMaxAge().
&gt;&gt;&gt;
&gt;&gt;&gt; Also read what Mark posted previously, about possible "=" signs getting
&gt;&gt;&gt; into the Base64 encoded value (at the end, for padding).
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;
&gt;&gt;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt;&gt;&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt; 


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Control character in cookie value</title>
<author><name>itay sahar &lt;itay.sahar@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c1f8e68710912081414h34730dd7i9827450d342d1553@mail.gmail.com%3e"/>
<id>urn:uuid:%3c1f8e68710912081414h34730dd7i9827450d342d1553@mail-gmail-com%3e</id>
<updated>2009-12-08T22:14:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Andre,

I'm not sure why you worry about the other cookie value. let me show you an
example
maybe then you may see something that i'm missing.

getCookieMaxAge()  is  31536000
cookiePath    is   /jboss-seam-jpa

What can be wrong here ? It works!
Are you worry about special character on cookiePath. I can make sure
in my application this won't happen right ?
If you think something is wrong in the methods below please suggest
solution..

Thanks!



On Mon, Dec 7, 2009 at 10:42 PM, itay sahar &lt;itay.sahar@gmail.com&gt; wrote:

&gt; sure!
&gt;  protected void setCookieValueIfEnabled(String value)
&gt;    {
&gt;       FacesContext ctx = FacesContext.getCurrentInstance();
&gt;
&gt;       if ( isCookieEnabled() &amp;&amp; ctx != null)
&gt;       {
&gt;          HttpServletResponse response = (HttpServletResponse)
&gt; ctx.getExternalContext().getResponse();
&gt;          Cookie cookie = new Cookie( getCookieName(), value );
&gt;          cookie.setMaxAge( getCookieMaxAge() );
&gt;          cookie.setPath(cookiePath);
&gt;          response.addCookie(cookie);
&gt;       }
&gt;    }
&gt;
&gt; On Mon, Dec 7, 2009 at 10:26 PM, André Warnier &lt;aw@ice-sa.com&gt; wrote:
&gt;
&gt;&gt; itay sahar wrote:
&gt;&gt;
&gt;&gt;&gt; sure!
&gt;&gt;&gt; protected void clearCookieValue()
&gt;&gt;&gt;   {
&gt;&gt;&gt;      Cookie cookie = getCookie();
&gt;&gt;&gt;      if ( cookie!=null )
&gt;&gt;&gt;      {
&gt;&gt;&gt;         HttpServletResponse response = (HttpServletResponse)
&gt;&gt;&gt; FacesContext.getCurrentInstance().getExternalContext().getResponse();
&gt;&gt;&gt;
&gt;&gt;&gt;         cookie.setValue(null);
&gt;&gt;&gt;         cookie.setPath(cookiePath);
&gt;&gt;&gt;         cookie.setMaxAge(0);
&gt;&gt;&gt;         response.addCookie(cookie);
&gt;&gt;&gt;      }
&gt;&gt;&gt;   }
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt; That's not the code setting the cookie, it is code clearing a cookie
&gt;&gt; value. But nevertheless..
&gt;&gt;
&gt;&gt;
&gt;&gt;  But look like problem is fixed. I extended the encodeToken method and
&gt;&gt;&gt; change
&gt;&gt;&gt; it to be
&gt;&gt;&gt; return Base64.encodeBytes(sb.toString().getBytes(),
&gt;&gt;&gt; Base64.DONT_BREAK_LINES);
&gt;&gt;&gt; And now it works (like a charm)!
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt; And may I point you to a remark from quite a few posts ago, which went
&gt;&gt; like :
&gt;&gt; ...
&gt;&gt; --quote--
&gt;&gt;
&gt;&gt; Except that some Base64 encoders, in some cases, will "wrap" the output
&gt;&gt; string at 76 bytes, by inserting a CR/LF pair, which are both "control
&gt;&gt; characters".  (Note that the output string of Base64 is longer than the
&gt;&gt; input string, since it encodes 3 consecutive input bytes into 4 output
&gt;&gt; bytes.)
&gt;&gt; My guess is that this is what happens here, and that could trigger the
&gt;&gt; exception above.
&gt;&gt; Maybe this Base64.encodeBytes() method has an optional argument which
&gt;&gt; would tell it to not wrap the output value ?
&gt;&gt; --end of quote--
&gt;&gt;
&gt;&gt;
&gt;&gt; &gt; but i'm not sure it solve all the
&gt;&gt; &gt; scenarios/possibilities.
&gt;&gt;
&gt;&gt; No, as also already pointed out, considering the code you posted before, a
&gt;&gt; control character could also creep into cookiePath or getCookieMaxAge().
&gt;&gt;
&gt;&gt; Also read what Mark posted previously, about possible "=" signs getting
&gt;&gt; into the Base64 encoded value (at the end, for padding).
&gt;&gt;
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;
&gt;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt;&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt;&gt;
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: mod_proxy tomcat6 question</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1ECD90.7010501@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1ECD90-7010501@christopherschultz-net%3e</id>
<updated>2009-12-08T22:05:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vas,

On 12/6/2009 5:17 PM, groupalias v wrote:
&gt; ProxyPass               /test/ ajp://127.0.0.1:8009/A/

[snip]

&gt; I am able to call www.example.com/test/jsp/hi.jsp. The problem happens
&gt; when I call a servlet like --  www.example.com/test/hello
&gt; The hello is a servlet that sends back hi.jsp by using the following code --
&gt; 
&gt; RequestDispatcher req = request.getRequestDispatcher("/jsp/hi.jsp");
&gt; req.forward(request, response);
&gt; 
&gt; where request and response and the HttpServletRequest and Response respectively.
&gt; 
&gt; I get the following error -- The resource /A/jsp/hi.jsp is not available.
&gt; 
&gt; Obviously the URL needs to be changed  /A/jsp/hi.jsp to
&gt; /test/jsp/hi.jsp and I believe the mo_proxy can be configured to do
&gt; this.

No, you don't want this. When doing a "forward", everything is internal
to Tomcat, so the URL should be what Tomcat expects (that is,
"/A/jsp/hi.jsp"). If you were redirecting, you'd need to use
/test/jsp/hi.jsp.

&gt; But I am not able to find it. Can someone point me to the right
&gt; direction?

As Andre (essentially) suggests, maybe you ought to mount /A on /A
instead of /test.

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

iEYEARECAAYFAksezY8ACgkQ9CaO5/Lv0PAu5wCfV1gn4U9Enj+9veQKM+Sqptd5
qdUAnjM8Ax3Bqey0/j6GFe/hbUJaSsxB
=L4zf
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: JSSE question</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1ECBA6.1030509@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1ECBA6-1030509@christopherschultz-net%3e</id>
<updated>2009-12-08T21:56:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vadim,

On 12/7/2009 1:25 PM, Vadim Letitchevski wrote:
&gt; openssl pkcs12 -export -in /etc/pki/tls/certs/localhost.crt -inkey /etc/pki/tls/private/localhost.key
-out mycert.p12 -name tomcat -CAfile /etc/pki/tls/cacert.pem -caname root -chain
&gt; 
&gt; I have used the password changeit.

Note that you have created certificate in PKCS12 format, not a keystore.
You now need to take the next step in the SSL HOWTO which is to use the
Java 'keytool' utility to create a keystore.

&gt; Next I have edited server.xml to have these strings:
&gt; 
&gt;     &lt;!-- Define a server-auth SSL HTTP/1.1 Connector on port 8442 --&gt;
&gt;     &lt;Connector port="8442" maxHttpHeaderSize="8192" SSLEnabled="true"
&gt;                keystoreFile="conf/mycert.p12" keystorePass="changeit"

If you are going to use the PKCS12 (.p12) format, you will probably have
to set keystoreType="PKCS12". Check the documentation for the
SSL-specific &lt;Connector&gt; attributes again.

&gt;                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
&gt;                enableLookups="false" disableUploadTimeout="true"
&gt;                scheme="https" secure="true"
&gt;                clientAuth="false" sslProtocol="TLS" /&gt;
&gt; 
&gt;     &lt;!-- Define a mutual-auth SSL HTTP/1.1 Connector on port 8443 --&gt;
&gt;     &lt;Connector port="8443" maxHttpHeaderSize="8192" SSLEnabled="true"
&gt;                keystoreFile="conf/mycert.p12" keystorePass="changeit"
&gt;                truststoreFile="conf/mycert.p12" truststorePass="changeit"

Although I don't think it will hurt to have both, your keystore and
truststore aren't the same thing. Check the documentation for these two
attributes. Again, you may need to use truststoreType="PKCS12" if you
want to use your .p12 file.

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

iEYEARECAAYFAksey6YACgkQ9CaO5/Lv0PBwWQCgj6T+m87bL49GXvON7dzIaklo
S74AnRnYM6IIuo8pMQe/bDAaSbwocXzg
=k45M
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Question on META-INF/context.xml</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1ECA17.1060802@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1ECA17-1060802@christopherschultz-net%3e</id>
<updated>2009-12-08T21:50:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Run,

On 12/8/2009 4:39 PM, pprun wrote:
&gt; I will remove docBase and path attributes. 

Did Eclipse put them in there?

&gt; I do use some hard-coded "Repromed" in the css and javascript reference, for
&gt; example: 
&gt; inside /Repromed/login.jsp i used &lt;link href="/Repromed/css/repromed.css"
&gt; rel="stylesheet" /&gt;
&gt; 
&gt; I tried to replace it with relative URI for example &lt;link
&gt; href="./css/repromed.css" rel="stylesheet" /&gt;
&gt; 
&gt; But it becomes a problem when the login page is shown in case of session
&gt; timeout.

[snip]

&gt; Is there a way to get around it?

Try:

&lt;link rel="stylesheet"
     href="&lt;%= request.getContextPath() %&gt;/css/repromed.css"&gt;

Now, do this with all your links. Better yet:

&lt;link rel="stylesheet"
     href="&lt;%= request.getContextPath() %&gt;&lt;%=
request.encodeURL("/css/repromed.css") %&gt;"&gt;

This will make your webapp work when you are using sessions but your
clients don't support cookies.

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

iEYEARECAAYFAkseyhcACgkQ9CaO5/Lv0PCJewCfc6K0m/RXKdoOMwjos9F35l09
A9YAniNWBneqr4VeULkfXTIazw9PSRHE
=ELAt
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Feedback on Tomcat Client Deployer</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1EC917.6060407@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1EC917-6060407@christopherschultz-net%3e</id>
<updated>2009-12-08T21:45:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tero,

On 12/8/2009 3:38 PM, Tero Karttunen wrote:
&gt; I have something that must be a pretty standard J2EE application
&gt; server environment: I am running (at least) three Tomcat instances
&gt; sharing a common Catalina home with mod_jk load balancer in front.

I hope you're using CATALINA_BASE along with that. :)

&gt; I
&gt; have not set up clustering, because my GWT-based applications maintain
&gt; state information client-side and do not utilize server-side J2EE Web
&gt; Application context sessions.

This is a nice strategy that should scale very well.

&gt; In this configuration I regularly need to deploy or re-deploy new
&gt; applications to all the Tomcat instances, and I was surprised to find
&gt; out that the support for this out-of-box was quite poor. All I could
&gt; find was Tomcat Client Deployer package, and all the documentation I
&gt; could find was the chapter four in the Tomcat user guide.

What is the "Tomcat user guide" and what is covered in chapter 4?

&gt; I apologize
&gt; in advance if I have missed out something; prove me wrong!

Tomcat comes with a webapp called "manager" which can deploy, un-deploy,
and re-deploy web applications using either the (basic) web interface
provided) or a client such as wget using simple GET and POST requests.

There is a "task" available for Apache ant that can do deployments for
you, too. It is documented here (apologies for the URL wrapping, if any
occurs):

http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant

&gt; Firstly, the build.xml file does not suffice for documentation for the
&gt; ant-tasks! I had to RTFS to find out the needed parameters for the
&gt; deploy task ("localWar" and "config")

You're right: the ant tasks are almost completely undocumented. Would
you consider submitting a patch for the documentation?

&gt; Secondly, the example ant-script is only suitable for deploying to one
&gt; Tomcat manager instance at a time, which is a major limitation. I have
&gt; to write my own ant script for deployment to multiple manager
&gt; instances.

Right. This is not an industrial-strength tool: it's just to get you by.
You are welcome to script whatever your environment requires. Again,
patches are welcome.

&gt; But this is not all - I am also going to need to integrate mod_jk
&gt; Status Worker ant tasks to my script, because I need to temporarily
&gt; disable workers while I undeploy and re-deploy applications to them.
&gt; (Otherwise the users may get unnecessary errors.) No problem here - I
&gt; can use "updateworker" task, but here is a major issue:
&gt; 
&gt;         I am unable to find tomcat-jkstatus-ant.jar binaries anywhere!

All the ant tasks should be in the same JAR file.

&gt; The mod_jk binaries directory
&gt; /dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28 only has
&gt; the Apache HTTPD module available for downloading. Moreover, the ant
&gt; example uses pathelement location ../dist/tomcat-jkstatus-ant.jar
&gt; which seems incomprehensible to me.

This is probably due to its location in the Tomcat source distribution.
Perhaps this components is not frequently used and so it's not very
mature. It would be great if you could post some of these issues to the
tomcat-dev mailing list, log bugs in the bug tracker, and (please!)
submit patches to fix the problems. Tomcat only gets better with
community participation.

&gt; My humble suggestions are:
&gt; 1) Please document the TCD ant task parameters so that the user does
&gt; not have to resort to source code
&gt; 2) Please make it easier to locate tomcat-jkstatus-ant.jar

Good suggestions.

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

iEYEARECAAYFAkseyRcACgkQ9CaO5/Lv0PAInwCaAuEi/B8UL5ca9cIuiFpVvIUH
zywAnju17niHUzUtPt0Red9kkTgX6Mt2
=0+oZ
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Question on META-INF/context.xml</title>
<author><name>pprun &lt;runping_huang@hotmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c26701279.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26701279-post@talk-nabble-com%3e</id>
<updated>2009-12-08T21:39:43Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Thank you very much for such quick response.

I will remove docBase and path attributes. 

I do use some hard-coded "Repromed" in the css and javascript reference, for
example: 
inside /Repromed/login.jsp i used &lt;link href="/Repromed/css/repromed.css"
rel="stylesheet" /&gt;

I tried to replace it with relative URI for example &lt;link
href="./css/repromed.css" rel="stylesheet" /&gt;

But it becomes a problem when the login page is shown in case of session
timeout.

Let's say user visited secure page /Repromed/adv/upload.jsp, then session
timed out, login.jsp is shown, 
reference to style sheet becomes &lt;link href="/Repromed/adv/css/repromed.css"
rel="stylesheet" /&gt;

Is there a way to get around it? 

Thanks


Caldarale, Charles R wrote:
&gt; 
&gt;&gt; From: pprun [mailto:runping_huang@hotmail.com]
&gt;&gt; Subject: Question on META-INF/context.xml
&gt;&gt; 
&gt;&gt; Inside I specified META-INF/context.xml as following:
&gt;&gt; 
&gt;&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt;&gt; &lt;Context docBase="Repromed" path="/Repromed" reloadable="true"
&gt; 
&gt; Remove the docBase and path attributes - they're not allowed when the
&gt; &lt;Context&gt; element is in META-INF/context.xml
&gt; 
&gt;&gt; I don't know how to convert Repromed.war to ROOT.war.
&gt; 
&gt; Usually, all you have to do is change the name of the .war file.  This is
&gt; assuming you have not hard-coded "Repromed" within the webapp; if you
&gt; have, you'll need to fix that.
&gt; 
&gt;&gt; How to change the META-INF/context.xml?
&gt; 
&gt; No changes are needed to either META-INF/context.xml or WEB-INF/web.xml.
&gt; 
&gt;  - Chuck
&gt; 
&gt; 
&gt; THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
&gt; MATERIAL and is thus for use only by the intended recipient. If you
&gt; received this in error, please contact the sender and delete the e-mail
&gt; and its attachments from all computers.
&gt; 
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt; 
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/Question-on-META-INF-context.xml-tp26700904p26701279.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Question on META-INF/context.xml</title>
<author><name>&quot;Caldarale, Charles R&quot; &lt;Chuck.Caldarale@unisys.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c99C8B2929B39C24493377AC7A121E21F9680635382@USEA-EXCH8.na.uis.unisys.com%3e"/>
<id>urn:uuid:%3c99C8B2929B39C24493377AC7A121E21F9680635382@USEA-EXCH8-na-uis-unisys-com%3e</id>
<updated>2009-12-08T21:21:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; From: pprun [mailto:runping_huang@hotmail.com]
&gt; Subject: Question on META-INF/context.xml
&gt; 
&gt; Inside I specified META-INF/context.xml as following:
&gt; 
&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &lt;Context docBase="Repromed" path="/Repromed" reloadable="true"

Remove the docBase and path attributes - they're not allowed when the &lt;Context&gt; element
is in META-INF/context.xml

&gt; I don't know how to convert Repromed.war to ROOT.war.

Usually, all you have to do is change the name of the .war file.  This is assuming you have
not hard-coded "Repromed" within the webapp; if you have, you'll need to fix that.

&gt; How to change the META-INF/context.xml?

No changes are needed to either META-INF/context.xml or WEB-INF/web.xml.

 - 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@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Question on META-INF/context.xml</title>
<author><name>pprun &lt;runping_huang@hotmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c26700904.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26700904-post@talk-nabble-com%3e</id>
<updated>2009-12-08T21:16:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi, 

I am a novice to tomcat. I created WAR project in Eclipse called "Repromed".
Inside I specified META-INF/context.xml as following:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Context docBase="Repromed" path="/Repromed" reloadable="true"
source="org.eclipse.jst.j2ee.server:Repromed"&gt;
	&lt;Resource name="jdbc/rpsDB" 
	          auth="Container" 
	          type="javax.sql.DataSource"
              maxActive="100" 
              maxIdle="30" 
              maxWait="10000"
              removeAbandoned="true"
              removeAbandonedTimeout="60"
              logAbandoned="true"
              testOnBorrow="true" 
			  validationQuery="/* ping */ SELECT 1" 
              username="tomcat_user" 
              password="web01" 
              driverClassName="org.gjt.mm.mysql.Driver"
              url="jdbc:mysql://localhost:3306/repromed_master"/&gt;
               		   
   	&lt;Realm  className="org.apache.catalina.realm.DataSourceRealm" 
            dataSourceName="jdbc/rpsDB"
            userTable="users" 
            userNameCol="user_name"  
            userCredCol="user_pass" 
            userRoleTable="user_roles"  
            roleNameCol="role_name" 
            digest="MD5" 
            localDataSource="true"/&gt;
	&lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
	&lt;WatchedResource&gt;META-INF/context.xml&lt;/WatchedResource&gt;
&lt;/Context&gt;

During the implementation, I was requested to deploy this Repromed.war as
the ROOT application to the localhost. I don't know how to convert
Repromed.war to ROOT.war. How to change the META-INF/context.xml? In
addition, do I need to change anything in the web.xml. 


Thank you for the help in advance. 

run


-- 
View this message in context: http://old.nabble.com/Question-on-META-INF-context.xml-tp26700904p26700904.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Feedback on Tomcat Client Deployer</title>
<author><name>Tero Karttunen &lt;karttunen.mailinglist@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cf13d530a0912081238p2e0b5826ge6e1375e7a621380@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf13d530a0912081238p2e0b5826ge6e1375e7a621380@mail-gmail-com%3e</id>
<updated>2009-12-08T20:38:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I have something that must be a pretty standard J2EE application
server environment: I am running (at least) three Tomcat instances
sharing a common Catalina home with mod_jk load balancer in front. I
have not set up clustering, because my GWT-based applications maintain
state information client-side and do not utilize server-side J2EE Web
Application context sessions.

In this configuration I regularly need to deploy or re-deploy new
applications to all the Tomcat instances, and I was surprised to find
out that the support for this out-of-box was quite poor. All I could
find was Tomcat Client Deployer package, and all the documentation I
could find was the chapter four in the Tomcat user guide. I apologize
in advance if I have missed out something; prove me wrong!

Firstly, the build.xml file does not suffice for documentation for the
ant-tasks! I had to RTFS to find out the needed parameters for the
deploy task ("localWar" and "config"), and there seems to be an
ant-task "JkStatusUpdate" that is completely undocumented. It seems to
be related to Tomcat-5.5 (according to source code comments) so I have
left it alone for now.

Secondly, the example ant-script is only suitable for deploying to one
Tomcat manager instance at a time, which is a major limitation. I have
to write my own ant script for deployment to multiple manager
instances.

But this is not all - I am also going to need to integrate mod_jk
Status Worker ant tasks to my script, because I need to temporarily
disable workers while I undeploy and re-deploy applications to them.
(Otherwise the users may get unnecessary errors.) No problem here - I
can use "updateworker" task, but here is a major issue:

        I am unable to find tomcat-jkstatus-ant.jar binaries anywhere!

The mod_jk binaries directory
/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28 only has
the Apache HTTPD module available for downloading. Moreover, the ant
example uses pathelement location ../dist/tomcat-jkstatus-ant.jar
which seems incomprehensible to me.

I downloaded the source package in order to compile the jar file
myself, but it was not trivial and would have required some effort. I
resigned to googling for the package elsewhere in some unofficial
location (http://www.java2s.com/Code/Jar/STUVWXYZ/tomcat-jkstatus-ant.jar.htm).

My humble suggestions are:
1) Please document the TCD ant task parameters so that the user does
not have to resort to source code
2) Please make it easier to locate tomcat-jkstatus-ant.jar

Let me apologize again if I am on the wrong track, because you are
producing excellent software that contantly exceeds my expectations!
It is only because of this very high standard that I am giving this
feedback, because so far the support for application deployment has
not been as extensive as the rest of your software.

Best Regards,
Tero Karttunen

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1EAB6C.7060004@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1EAB6C-7060004@christopherschultz-net%3e</id>
<updated>2009-12-08T19:39:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

AndrÃ©,

On 12/8/2009 1:54 PM, AndrÃ© Warnier wrote:
&gt; Independently of the other answers, just 2 notes :
&gt; 
&gt; 1) probably the reason why nobody wants to give you another answer than
&gt; to read the specs, is that when you will have read the specs about the
&gt; URL wildcards, you will not only have your answer, but also be somewhat
&gt; puzzled yourself as to why the specs writers had to go and re-invent yet
&gt; another way of doing wildcards all for themselves.

Yeah, I'm surprised they didn't go with either standard globbing rules
(* = anything, ? = any one thing) or with regular expressions (which can
be somewhat inaccessible). The whole "it looks like a glob but it's only
a very special case of a glob" is pretty irritating.

I just checked, and this foolishness is still in effect for the proposed
3.0 specification.

&gt; The additional benefit is that the next time someone on this list asks a
&gt; question that is clearly non-sensical and/or in contravention of the
&gt; specs, you will be able to tell them : "read the servlet specs".
&gt; Makes you immediately sound like a pro.

Or an ass. Sometimes the two are interchangeable. :)

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

iEYEARECAAYFAkseq2wACgkQ9CaO5/Lv0PDlIACaAmVnLpWIohItFZ+P957/ZePB
yxAAn12zWcCYScA0FJEjbPpe15guEt8Q
=87sb
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat, uPortal, error messages and confusion</title>
<author><name>Egeste &lt;egeste@egeste.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c750B803F-AB25-43DA-AF41-B8B6A3260192@egeste.net%3e"/>
<id>urn:uuid:%3c750B803F-AB25-43DA-AF41-B8B6A3260192@egeste-net%3e</id>
<updated>2009-12-08T19:38:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm unsure whether it's an "ubuntu mangled" version - I installed  
tomcat5.5 via apt-get.

uname -a:
Linux ******* 2.6.18-92.1.18.el5.028stab060.8PAE #1 SMP Mon Feb 9  
22:32:30 MSK 2009 i686 GNU/Linux

Here is my server.xml:
http://pastebin.ca/1707274

webapps/uPortal/META-INF/context.xml:
&lt;Context crossContext="true" reloadable="false"&gt;
    &lt;Manager pathname=""  
className="org.apache.catalina.session.StandardManager"/&gt;
&lt;/Context&gt;

web.xml
http://pastebin.ca/1707286

-Steve

On Dec 7, 2009, at 3:18 PM, Caldarale, Charles R wrote:

&gt;&gt; From: Egeste [mailto:egeste@egeste.net]
&gt;&gt; Subject: tomcat, uPortal, error messages and confusion
&gt;&gt;
&gt;&gt; in communication with the uPortal mailing list, I was advised to seek
&gt;&gt; advice from this group regarding the following thread:
&gt;
&gt; Is this a real Tomcat, or a Ubuntu-mangled version?
&gt;
&gt; Please post your server.xml file, which should be in Tomcat's conf  
&gt; directory (unless the Ubuntu distribution moved it somewhere else).
&gt;
&gt; Also post the META-INF/context.xml and WEB-INF/web.xml for your  
&gt; uPortal webapp, if they exist.
&gt;
&gt; - Chuck
&gt;
&gt;
&gt; THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE  
&gt; PROPRIETARY MATERIAL and is thus for use only by the intended  
&gt; recipient. If you received this in error, please contact the sender  
&gt; and delete the e-mail and its attachments from all computers.
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt;
&gt;


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>=?ISO-8859-1?Q?Andr=E9_Warnier?= &lt;aw@ice-sa.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1EA0FF.8040503@ice-sa.com%3e"/>
<id>urn:uuid:%3c4B1EA0FF-8040503@ice-sa-com%3e</id>
<updated>2009-12-08T18:54:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Jonathan Mast wrote:
&gt; I actually spent an hour and half trying to find the Servlet 2.5 specs and
&gt; researching this question in general.  The only thing on Sun's site for
&gt; Servlet 2.5 was the Javadocs, not the actual specs.  In fact I even found
&gt; other people who had the same issue of not being able to find the Specs as a
&gt; PDF.
&gt; 
&gt; I have would be tickled to death to be able to read the specs straight from
&gt; the source, but since I couldn't find the source, I figured I would ask
&gt; another source of information, ie this list.

Independently of the other answers, just 2 notes :

1) probably the reason why nobody wants to give you another answer than 
to read the specs, is that when you will have read the specs about the 
URL wildcards, you will not only have your answer, but also be somewhat 
puzzled yourself as to why the specs writers had to go and re-invent yet 
another way of doing wildcards all for themselves.
You would thus probably not believe it if we just told you, so it is 
better if you read the original specs. They are, after all, the specs, 
and Tomcat has to abide by them.

2) Even apart from that, and even for non-specifically-Java types like 
me, the specs are more or less readable, and the parts that are readable 
are very enlightening for anyone having to deal with Tomcat (or servlet 
servers in general).  So the gurus here are actually trying to do you a 
favor by forcing you to go read them.
The additional benefit is that the next time someone on this list asks a 
question that is clearly non-sensical and/or in contravention of the 
specs, you will be able to tell them : "read the servlet specs".
Makes you immediately sound like a pro.
;-)


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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>Kris Schneider &lt;kschneider@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c3d242a3d0912081039y230fcd26u6118ce79e817c44f@mail.gmail.com%3e"/>
<id>urn:uuid:%3c3d242a3d0912081039y230fcd26u6118ce79e817c44f@mail-gmail-com%3e</id>
<updated>2009-12-08T18:39:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Tue, Dec 8, 2009 at 1:32 PM, Jonathan Mast
&lt;jhmast.developer@gmail.com&gt; wrote:
&gt; I actually spent an hour and half trying to find the Servlet 2.5 specs and
&gt; researching this question in general.  The only thing on Sun's site for
&gt; Servlet 2.5 was the Javadocs, not the actual specs.  In fact I even found
&gt; other people who had the same issue of not being able to find the Specs as a
&gt; PDF.
&gt;
&gt; I have would be tickled to death to be able to read the specs straight from
&gt; the source, but since I couldn't find the source, I figured I would ask
&gt; another source of information, ie this list.

http://java.sun.com/products/servlet/reference/api/index.html

-- 
Kris Schneider

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>Hassan Schroeder &lt;hassan.schroeder@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4eedb92a0912081038w46bfefdcnd83529c4a1fb2919@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4eedb92a0912081038w46bfefdcnd83529c4a1fb2919@mail-gmail-com%3e</id>
<updated>2009-12-08T18:38:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Tue, Dec 8, 2009 at 10:32 AM, Jonathan Mast
&lt;jhmast.developer@gmail.com&gt; wrote:
&gt; I actually spent an hour and half trying to find the Servlet 2.5 specs and
&gt; researching this question in general.  The only thing on Sun's site for
&gt; Servlet 2.5 was the Javadocs, not the actual specs.  In fact I even found
&gt; other people who had the same issue of not being able to find the Specs as a
&gt; PDF.

??? Google: 'servlet spec download'

Hint: it's the first hit.

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

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>Jonathan Mast &lt;jhmast.developer@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cf5af14000912081032h603f99d5t21a6751cdab85e67@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf5af14000912081032h603f99d5t21a6751cdab85e67@mail-gmail-com%3e</id>
<updated>2009-12-08T18:32:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I actually spent an hour and half trying to find the Servlet 2.5 specs and
researching this question in general.  The only thing on Sun's site for
Servlet 2.5 was the Javadocs, not the actual specs.  In fact I even found
other people who had the same issue of not being able to find the Specs as a
PDF.

I have would be tickled to death to be able to read the specs straight from
the source, but since I couldn't find the source, I figured I would ask
another source of information, ie this list.

On Tue, Dec 8, 2009 at 12:25 PM, André Warnier &lt;aw@ice-sa.com&gt; wrote:

&gt; Christopher Schultz wrote:
&gt;
&gt;&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt;&gt; Hash: SHA1
&gt;&gt;
&gt;&gt; Jonathan,
&gt;&gt;
&gt;&gt; On 12/8/2009 11:48 AM, Jonathan Mast wrote:
&gt;&gt;
&gt;&gt;&gt; Are URL Patterns ending in a wild card allowed by the Servlet Spec?
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt; You could check. You've been on this list long enough to know that the
&gt;&gt; spec itself is available
&gt;&gt;
&gt; +1
&gt; and quite readable.
&gt; + ... 0.5
&gt;
&gt;  Maybe it's time to read it.
&gt; +1
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: tomcat server start up without looking dependency jars</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E96C9.6050404@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E96C9-6050404@christopherschultz-net%3e</id>
<updated>2009-12-08T18:11:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ahmed,

On 12/5/2009 7:17 AM, ahmed kasim wrote:
&gt; I have few jars which need to get loaded only when the war file is 
&gt; getting loaded or when the request comes, to be more clear I have 
&gt; some jar which is having connection to DB, if I specify in my 
&gt; context.xml file it is getting loaded when the server getting
&gt; started up initially, so I want to avoid this and make it when my war
&gt; file gets loaded the db connection should get loaded.
&gt; 
&gt; &lt;Resource name="jdbc/DB2DS" auth="Container" 
&gt; type="javax.sql.DataSource" 
&gt; driverClassName="com.ibm.db2.jcc.DB2Driver" 
&gt; url="jdbc:db2://localhost:50000/SPARK" username="db2admin" 
&gt; password="db2@dmin" maxActive="20" maxIdle="10" maxWait="-1"/&gt;

So, this resource is being specified in context.xml? Which one? If it's
conf/context.xml then it's the default configuration for all contexts,
including ROOT, which is (nearly) always deployed, so you should expect
your database connection to be established whether you have deployed
"your" webapp or not.

If you've placed that &lt;Resource&gt; definition in your webapp's
META-INF/context.xml file, then the resource should not be created until
webapp deployment.

&gt; I have three jar file specified for Resource

What does this mean? &lt;Resource&gt; elements do not reference JAR files
directly.

&gt; if i place jar file

Where?

&gt; it is getting loaded and server starts up looking for connection
&gt; with db.

What is getting loaded? The "JAR file" or the context.xml file?

&gt; How can I avoid server starting time look up and make it available 
&gt; only when I deploy the war file.

Make sure your &lt;Resource&gt; definition is in your webapp's private
context.xml file. The location of the JAR file should be in
$CATALINA_HOME/lib for Tomcat 6.0, which I presume you are using.

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

iEYEARECAAYFAkselskACgkQ9CaO5/Lv0PDB3gCgps+AvNnwyKzfxvewxFVnnp4H
vqYAnjII5yNrUyiToUUnDDPrbFsZOojp
=68c3
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Control character in cookie value</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E94E2.9050306@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E94E2-9050306@christopherschultz-net%3e</id>
<updated>2009-12-08T18:03:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Itay,

On 12/4/2009 7:41 PM, itay sahar wrote:
&gt; I'm using seam on tomcat 6.0.20 and encounter problem in my security module.
&gt; 
&gt; Basically, i try to add cookie with base64 encoding of the username which is
&gt; email address.
&gt; The encoding works and no exception is thrown. But when seam try adding the
&gt; cookie an exception is thrown:

[snip]

&gt; javax.servlet.ServletException: #{identity.login}:
&gt; java.lang.IllegalArgumentException: Control character in cookie value,
&gt; consider BASE64 encoding your value

It looks like you are using an EL expression that either cannot properly
be executed or is not allowed: "#{identity.login}" appears to be your
original code, and not the data you intended to encode.

Are you sure you are looking for the right problem? All the other
messages in this thread refer to "username" and "password" and yet the
error appears to be due to the above value, not the username and password.

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

iEYEARECAAYFAkselOIACgkQ9CaO5/Lv0PBtogCeMhu89xqVh8s29FbH5Y0rJd6J
0EkAmwdeMPnlUHzHiPC+Dr2yxyHmHLOP
=9avA
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>=?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= &lt;aw@ice-sa.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E8C16.40400@ice-sa.com%3e"/>
<id>urn:uuid:%3c4B1E8C16-40400@ice-sa-com%3e</id>
<updated>2009-12-08T17:25:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Christopher Schultz wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt; 
&gt; Jonathan,
&gt; 
&gt; On 12/8/2009 11:48 AM, Jonathan Mast wrote:
&gt;&gt; Are URL Patterns ending in a wild card allowed by the Servlet Spec?
&gt; 
&gt; You could check. You've been on this list long enough to know that the
&gt; spec itself is available 
+1
and quite readable.
+ ... 0.5
  Maybe it's time to read it.
+1

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>=?ISO-8859-1?Q?Andr=E9_Warnier?= &lt;aw@ice-sa.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E8BA5.8070905@ice-sa.com%3e"/>
<id>urn:uuid:%3c4B1E8BA5-8070905@ice-sa-com%3e</id>
<updated>2009-12-08T17:23:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Jonathan Mast wrote:
&gt; Are URL Patterns ending in a wild card allowed by the Servlet Spec?
&gt; 
&gt; I have this pattern setup with the intention of binding every url that
&gt; begins with "foo" to a serlvet
&gt; &lt;servlet-mapping&gt;
&gt;     &lt;servlet-name&gt;MultiFooService&lt;/servlet-name&gt;
&gt;     &lt;url-pattern&gt;/foo*&lt;/url-pattern&gt;
&gt; &lt;/servlet-mapping&gt;
&gt; 
&gt; But http://localhost/foo1, ...foo2, ...foo&lt;ANYTHING&gt; gives me a 404
&gt; 
&gt; Only http://localhost/foo* actually resolves to the servlet.
&gt; 
&gt; Do I have the syntax wrong?  I seen examples like
&gt; &lt;url-pattern&gt;/*.jsp&lt;/url-pattern&gt;, so is there some different notation
&gt; required for wildcards at the end of the pattern?
&gt; 
&gt; Tomcat 6.0.20
&gt; 
I think you really need to read the corresponding section of the servlet 
specs for that, because these URL patterns are not the same as filespec 
patterns, and not regexpes either.  Their interpretation is really 
java-servlet-specs-specific.
Don't ask why.




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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Understanding url-patterns</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E8AE2.4090209@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E8AE2-4090209@christopherschultz-net%3e</id>
<updated>2009-12-08T17:20:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan,

On 12/8/2009 11:48 AM, Jonathan Mast wrote:
&gt; Are URL Patterns ending in a wild card allowed by the Servlet Spec?

You could check. You've been on this list long enough to know that the
spec itself is available and quite readable. Maybe it's time to read it.

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

iEYEARECAAYFAkseiuIACgkQ9CaO5/Lv0PDi1ACgjDxY0U6PR6b/9zxisLvcIKi5
ADAAn164hq8uQC3UEL/oxh8/qSPFv/pe
=VQ9w
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Understanding url-patterns</title>
<author><name>Jonathan Mast &lt;jhmast.developer@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cf5af14000912080848k3484a811oa2d00d4942bc0801@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf5af14000912080848k3484a811oa2d00d4942bc0801@mail-gmail-com%3e</id>
<updated>2009-12-08T16:48:43Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Are URL Patterns ending in a wild card allowed by the Servlet Spec?

I have this pattern setup with the intention of binding every url that
begins with "foo" to a serlvet
&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;MultiFooService&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/foo*&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

But http://localhost/foo1, ...foo2, ...foo&lt;ANYTHING&gt; gives me a 404

Only http://localhost/foo* actually resolves to the servlet.

Do I have the syntax wrong?  I seen examples like
&lt;url-pattern&gt;/*.jsp&lt;/url-pattern&gt;, so is there some different notation
required for wildcards at the end of the pattern?

Tomcat 6.0.20


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: the Tomcat generates more than one session id with the same http request, please help me</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E76ED.6080309@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E76ED-6080309@christopherschultz-net%3e</id>
<updated>2009-12-08T15:55:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike,

On 12/8/2009 2:02 AM, Looijmans, Mike wrote:
&gt; Seems like a propietary way of storing the session ID

Actually, it's well-defined by the servlet specification.

&gt;&gt; -----Original Message----- From: Peter Chen
&gt;&gt; But I don't know the part 
&gt;&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD", is it
&gt;&gt; also used to pass parameter?

Try:

String url = request.encodeURL("getParts.jsp[") + "?" + [your params]

Then, just:

&lt;param name="filename" value="&lt;%= url %&gt;"&gt;

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

iEYEARECAAYFAksedu0ACgkQ9CaO5/Lv0PBkNwCdFcoX0yL4Kel9LLU8JWBNOUMh
bJAAn3TDk1ttFS2WnRY7KfN6T+eWeeh9
=Ump8
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Apache Tomcat Windows Installer Insecure Password Vulnerability</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E750E.4@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E750E-4@christopherschultz-net%3e</id>
<updated>2009-12-08T15:47:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pid,

On 12/7/2009 5:23 AM, Pid wrote:
&gt; On 07/12/2009 04:53, Saw Chee Hong wrote:
&gt;&gt; Currently mytomcat version was 5.0.27. I have check the 
&gt;&gt; â€˜tomcat-users.xmlâ€™ file and it doesnâ€™t consist the â€˜adminâ€™ user in
&gt;&gt; the file.
&gt; 
&gt; Then you are not at risk from *this particular* issue.

+1

&gt;&gt; Does this mean that my tomcat is safe?
&gt; 
&gt; No idea.  That's too open ended a question - we can't tell what else
&gt; you've done to it.

+1

Please note that Tomcat 5.0 is no longer supported. There could be
unpatched security vulnerabilities in your version that will /never be
fixed/ due to its "unsupported" status.

You should upgrade to Tomcat 6.0 at your earliest convenience.

... and make sure you re-check the tomcat-users.xml file. Better yet,
delete it and don't use it ;)

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

iEYEARECAAYFAksedQ4ACgkQ9CaO5/Lv0PAjnACffIS/MQbAbHuLrelAsQgPC7eI
ZIIAoIQhj1ymXRINljjQIUU9GsWW56Ja
=NKvu
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How To Get MBean Server of Apache Tomcat.</title>
<author><name>Cyrille Le Clerc &lt;cleclerc@xebia.fr&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c1db564170912080744j340c60e0l718e987a5373d16f@mail.gmail.com%3e"/>
<id>urn:uuid:%3c1db564170912080744j340c60e0l718e987a5373d16f@mail-gmail-com%3e</id>
<updated>2009-12-08T15:44:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
   Hello Ben,

   You are right, Tomcat, with these standard JVM JMX parameters,
creates a new MBeanServer that is not the platform mbean server and
that does not contain the JVM Mbeans (1). I didn't take the time to
figure out wether it was the JVM or Tomcat behavior.

   On production, we use Hyperic declaring two servers : a "JVM
server" and a "Apache Tomcat 6.0 Server". I must admit it is not the
most elegant but it does the job :-)

   For my JMX troubleshooting on Tomcat, I use JVisualVM (with the
MBeans plugin) and a few JSP pages I drop in my web apps :
http://cyrille-leclerc.googlecode.com/svn/trunk/cyrille/src/main/webapp/tools/jmx/mbeans.jsp
http://cyrille-leclerc.googlecode.com/svn/trunk/cyrille/src/main/webapp/tools/jmx/mbean.jsp
http://cyrille-leclerc.googlecode.com/svn/trunk/cyrille/src/main/webapp/tools/jmx/platformMbeans.jsp
   I mostly use the two firsts jsps as I mostly monitor Tomcat and
application specific MBeans, not very much JVM MBeans (except via
Hyperic).

   Hope this helps,

   Cyrille
--
Cyrille Le Clerc
cleclerc@xebia.fr
http://blog.xebia.fr

(1) : java.lang:type=Runtime, java.lang:type=OperatingSystem,
java.lang:type=Threading, java.lang:type=Memory

On Tue, Dec 8, 2009 at 4:07 PM, Ben Katz &lt;ben.katz@gmail.com&gt; wrote:
&gt; Hi Cyrille,
&gt;
&gt; Thanks for you reply.
&gt; I have actually done what you suggested but that does not relate to the
&gt; problem.
&gt;
&gt; To better Illustrate I will give this example:
&gt;
&gt; If I run the code below from a servlet in Tomcat I will get a list of
&gt; domains:
&gt;        String[] domains =
&gt; ManagementFactory.getPlatformMBeanServer().getDomains();
&gt;
&gt;        for (int i =0; i &lt; domains.length;i++)
&gt;        {
&gt;            System.out.println(domains[i]);
&gt;        }
&gt;
&gt; If I run the same code from a generic java application I will get a
&gt; different list of domains.
&gt;
&gt; This means that the platform MBean server is different inside Tomcat.
&gt; What I would like to do is to reach that server, probably by replacing
&gt; "ManagementFactory.getPlatformMBeanServer().getDomains();" with something
&gt; else.
&gt;
&gt; Thanks again,
&gt; Ben.
&gt;
&gt;
&gt; On Tue, Dec 8, 2009 at 15:00, Cyrille Le Clerc &lt;cleclerc@xebia.fr&gt; wrote:
&gt;
&gt;&gt;   Hello Ben,
&gt;&gt;
&gt;&gt;   Tomcat relies on the out-of-the-box feature of the JVM to make the
&gt;&gt; MBeanServer accessible to other processes (possibly located on other
&gt;&gt; servers).
&gt;&gt;
&gt;&gt;   You have to add the following parameters to the Tomcat startup
&gt;&gt; command line :
&gt;&gt;    -Dcom.sun.management.jmxremote \
&gt;&gt;    -Dcom.sun.management.jmxremote.port=6969 \
&gt;&gt;    -Dcom.sun.management.jmxremote.ssl=false \
&gt;&gt;    -Dcom.sun.management.jmxremote.authenticate=false
&gt;&gt;
&gt;&gt; JMX listen port 6969 is configurable.
&gt;&gt;
&gt;&gt; All details at http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
&gt;&gt;
&gt;&gt; Hope this helps,
&gt;&gt;
&gt;&gt; Cyrille
&gt;&gt;
&gt;&gt; --
&gt;&gt; Cyrille Le Clerc
&gt;&gt; cleclerc@xebia.fr
&gt;&gt; http://blog.xebia.fr
&gt;&gt;
&gt;&gt; On Tue, Dec 8, 2009 at 1:34 PM, Ben Katz &lt;ben.katz@gmail.com&gt; wrote:
&gt;&gt; &gt;
&gt;&gt; &gt; Hi,
&gt;&gt; &gt; I use ManagementFactory.getPlatformMBeanServer() from within Apache
&gt;&gt; Tomcat
&gt;&gt; &gt; and from a regular JAR file (outside the scope of apache).
&gt;&gt; &gt; I think (And correct me if im wrong) I'm getting different MBean Servers.
&gt;&gt; &gt; My question is - How Do I reach the Tomcat mbean server from outside or
&gt;&gt; &gt; alternatively, how do I register the MBeans from inside apache with the
&gt;&gt; &gt; "outside world" MBean server.
&gt;&gt; &gt; The first option (Reach the Tomcat mbean server from the outside) is
&gt;&gt; &gt; preferable.
&gt;&gt; &gt; Thanks!!
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt;&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt;&gt;
&gt;&gt;
&gt;

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Logging with Log4J</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E73D3.7030500@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E73D3-7030500@christopherschultz-net%3e</id>
<updated>2009-12-08T15:42:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bart,

On 12/5/2009 7:55 AM, Bart Vandewoestyne wrote:
&gt;&gt;&gt; log4j.appender.myAppender.File=testbart.log
&gt;&gt;
&gt;&gt; I would have done:
&gt;&gt; log4j.appender.myAppender.File=/var/log/tomcat/mywebapp.log
&gt;&gt;
&gt;&gt; Make sure that the user running Tomcat has rights to write to that
&gt;&gt; file/directory.
&gt; 
&gt; OK.  I also figured out that it works if i specify the absolute
&gt; path /var/log/tomcat/mywebapp.log
&gt; 
&gt; I thought that if i only specify the filename, by default it
&gt; would arrive in /var/log/tomcat/ but apparently this is not the
&gt; case.

Why would you think that the file would magically appear in
/var/log/tomcat? There is no default log file location for log4j, nor
for any logging mechanism that I know of. The best you could hope for is
the current working directory of the process, which could be anything.
It's always best to fully-specify path names.

&gt; Anyway, my problem seems solved. All i have to do now is continue
&gt; reading the Log4J docs to better understand and configure my
&gt; logging :-)

Enjoy!

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

iEYEARECAAYFAksec9MACgkQ9CaO5/Lv0PDXMgCeNOq1OiKDb+r+6EenGHwZ1M8m
WiIAoKDCdo3ZBhqIQIVGcsP2/nhVQzYs
=h4Tp
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: mysterious SQLException: Access denied for user</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E7358.7050009@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E7358-7050009@christopherschultz-net%3e</id>
<updated>2009-12-08T15:40:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lloyd,

Moving this discussion on-list.

On 12/4/2009 7:35 PM, DIGLLOYD INC wrote:
&gt; I have been running a server just fine for 16 month. It is
&gt; running Tomcat 6.0.20, using the following JDBCRealm:

Before we continue, let's just say up front that using JDBCRealm is not
recommended. It had some synchronization problems in the past, and
fixing them basically means that its operation is serialized, since it
uses only one Connection to the database. Considering switching to
DataSourceRealm instead.

&gt;  &lt;Realm className="org.apache.catalina.realm.JDBCRealm"
&gt;       connectionName="tomcat_auth"
&gt;       connectionPassword="xxxxxx"
&gt;       connectionURL="jdbc:mysql://192.168.1.12/diglloyd"
&gt;       driverName="com.mysql.jdbc.Driver"
&gt;       userTable="UserAuth" userNameCol="username" userCredCol="password"
&gt;       userRoleTable="UserRole" roleNameCol="role" digest="MD5" /&gt;

That looks okay to me. You should upgrade from MD5 if at all possible
(yes, I know that changing password digests sucks, I've done it twice...
it takes years to complete) because MD5 is not very secure these days.

&gt; I've made a new server, duplicating the setup, but with one change: I'm
&gt; running MySQL 5.1.41 instead of 5.0.51b (different IP address, I've
&gt; adjusted the connectionURL accordingly).
&gt; 
&gt; I've set up the new database with user 'tomcat_auth', to be used for
&gt; authenticating users. For now, I've done a 'grant all' to rule out silly
&gt; errors. 

What do you get when you run:

mysql&gt; SHOW GRANTS FOR tomcat_auth@localhost;

What is the host from which tomcat_auth is connecting? Tomcat maintains
different permissions for users connecting from different hosts. For
instance, tomcat_auth may be allowed from localhost, but not from
192.168.1.10.

&gt; But with the new setup using MySQL 5.1.41, Tomcat always reports this
&gt; exception shown below.   However, I can connect locally and remotely as
&gt; user 'tomcat_auth' via the 'mysql' command line, do a 'select', etc.

Hmm... you can connect remotely? What is the command line that you use
for that? "mysql -h 192.168.1.12 -u tomcat_auth -p"? Does that work from
the machine on which Tomcat is installed but not properly connecting?

&gt; So
&gt; clearly something is wrong on the tomcat end, yet that configuration is
&gt; identical to the other server.

So, the only difference is the IP address used in the connection URL?

&gt; Any help would be MUCH appreciated.
&gt; 
&gt; Dec 4, 2009 3:15:40 PM org.apache.catalina.realm.JDBCRealm getPassword
&gt; SEVERE: Exception performing authentication
&gt; java.sql.SQLException: Access denied for user
&gt; 'tomcat_auth'@'192.168.1.13' (using password: YES)

So, the password is being used (that's good: it's correct, right?). It
also says you're connecting as tomcat_auth@192.168.1.13. What does this
command return:

mysql&gt; SHOW GRANTS FOR tomcat_auth@192.168.1.13;

or

mysql&gt; SHOW GRANTS FOR tomcat_auth;

&gt; at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
&gt; at com.mysql.jdbc.ConnectionImpl.&lt;init&gt;(ConnectionImpl.java:718)
&gt; at com.mysql.jdbc.JDBC4Connection.&lt;init&gt;(JDBC4Connection.java:46)
&gt; [...]
&gt; at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)

Looks like it's failing to connect (rather than failing to access a
specific table or column).

Let's see what the grants look like.

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

iEYEARECAAYFAksec1gACgkQ9CaO5/Lv0PDoSgCeJnVVu/A1hK+b+lpqX7luGCAz
IO4An2gnQOq2m1p7dXWRLRKRjNd/YR0T
=a3z4
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Tomcat Crashes out of continuous servicing of stuck request</title>
<author><name>Christopher Schultz &lt;chris@christopherschultz.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E7130.8070601@christopherschultz.net%3e"/>
<id>urn:uuid:%3c4B1E7130-8070601@christopherschultz-net%3e</id>
<updated>2009-12-08T15:30:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nishant,

Mailing the list is fine: there's no need to mail me separately.

On 12/6/2009 11:19 PM, Hadole, Nishant IN BOM SISL wrote:
&gt; Tomcat crashes means, the free memory starts declining dramatically 
&gt; to zero, and server stops responding to new requests.

Does the JVM and/or Tomcat actually crash? That's an important
difference: if Tomcat simply stops responding to requests, that's likely
to be a different problem than an actual crash.

&gt; I am sure with little modifications, this can be handled in code
&gt; itself, and this is not a concern at all.

Eh... okay, if you say so.

&gt; I am more interested in knowing whether there exists any 
&gt; configuration for such cases, which stops processing after some 
&gt; predefined time-out.

No.

&gt; I know that this can be done for KEEPALIVE requests. What @ requests
&gt; in SERVICE stage.

I'm not sure what you mean, here.

&gt; The screenshot for Tomcat Manager is attached for the same.

The screenshot indicates that you have 756MiB free of a 1016MiB heap.
That looks good to me. It also indicates that your "jvehelp" servlet
seems to be taking forever to do its work. Perhaps you should take a
thread dump and figure out what your servlet is doing when it stalls?

Only one thread is in the "keepalive wait" state, and it has been there
for 6.5 seconds. What is your keepalive timeout? Is it set to an
appropriate amount?

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

iEYEARECAAYFAksecS8ACgkQ9CaO5/Lv0PCH+gCffSPXVFy7KAdXKCrS3hCOr+GW
IvkAn1gSQR6dt5JFIWi2JXMXX3fAPBH7
=2YaM
-----END PGP SIGNATURE-----

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How To Get MBean Server of Apache Tomcat.</title>
<author><name>Ben Katz &lt;ben.katz@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c17031d100912080707x1f0b3889s728478650b954e2@mail.gmail.com%3e"/>
<id>urn:uuid:%3c17031d100912080707x1f0b3889s728478650b954e2@mail-gmail-com%3e</id>
<updated>2009-12-08T15:07:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Cyrille,

Thanks for you reply.
I have actually done what you suggested but that does not relate to the
problem.

To better Illustrate I will give this example:

If I run the code below from a servlet in Tomcat I will get a list of
domains:
        String[] domains =
ManagementFactory.getPlatformMBeanServer().getDomains();

        for (int i =0; i &lt; domains.length;i++)
        {
            System.out.println(domains[i]);
        }

If I run the same code from a generic java application I will get a
different list of domains.

This means that the platform MBean server is different inside Tomcat.
What I would like to do is to reach that server, probably by replacing
"ManagementFactory.getPlatformMBeanServer().getDomains();" with something
else.

Thanks again,
Ben.


On Tue, Dec 8, 2009 at 15:00, Cyrille Le Clerc &lt;cleclerc@xebia.fr&gt; wrote:

&gt;   Hello Ben,
&gt;
&gt;   Tomcat relies on the out-of-the-box feature of the JVM to make the
&gt; MBeanServer accessible to other processes (possibly located on other
&gt; servers).
&gt;
&gt;   You have to add the following parameters to the Tomcat startup
&gt; command line :
&gt;    -Dcom.sun.management.jmxremote \
&gt;    -Dcom.sun.management.jmxremote.port=6969 \
&gt;    -Dcom.sun.management.jmxremote.ssl=false \
&gt;    -Dcom.sun.management.jmxremote.authenticate=false
&gt;
&gt; JMX listen port 6969 is configurable.
&gt;
&gt; All details at http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
&gt;
&gt; Hope this helps,
&gt;
&gt; Cyrille
&gt;
&gt; --
&gt; Cyrille Le Clerc
&gt; cleclerc@xebia.fr
&gt; http://blog.xebia.fr
&gt;
&gt; On Tue, Dec 8, 2009 at 1:34 PM, Ben Katz &lt;ben.katz@gmail.com&gt; wrote:
&gt; &gt;
&gt; &gt; Hi,
&gt; &gt; I use ManagementFactory.getPlatformMBeanServer() from within Apache
&gt; Tomcat
&gt; &gt; and from a regular JAR file (outside the scope of apache).
&gt; &gt; I think (And correct me if im wrong) I'm getting different MBean Servers.
&gt; &gt; My question is - How Do I reach the Tomcat mbean server from outside or
&gt; &gt; alternatively, how do I register the MBeans from inside apache with the
&gt; &gt; "outside world" MBean server.
&gt; &gt; The first option (Reach the Tomcat mbean server from the outside) is
&gt; &gt; preferable.
&gt; &gt; Thanks!!
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How To Get MBean Server of Apache Tomcat.</title>
<author><name>Cyrille Le Clerc &lt;cleclerc@xebia.fr&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c1db564170912080500j7bca468fv26ba4995a24d9676@mail.gmail.com%3e"/>
<id>urn:uuid:%3c1db564170912080500j7bca468fv26ba4995a24d9676@mail-gmail-com%3e</id>
<updated>2009-12-08T13:00:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
   Hello Ben,

   Tomcat relies on the out-of-the-box feature of the JVM to make the
MBeanServer accessible to other processes (possibly located on other
servers).

   You have to add the following parameters to the Tomcat startup
command line :
    -Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=6969 \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Dcom.sun.management.jmxremote.authenticate=false

JMX listen port 6969 is configurable.

All details at http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

Hope this helps,

Cyrille

--
Cyrille Le Clerc
cleclerc@xebia.fr
http://blog.xebia.fr

On Tue, Dec 8, 2009 at 1:34 PM, Ben Katz &lt;ben.katz@gmail.com&gt; wrote:
&gt;
&gt; Hi,
&gt; I use ManagementFactory.getPlatformMBeanServer() from within Apache Tomcat
&gt; and from a regular JAR file (outside the scope of apache).
&gt; I think (And correct me if im wrong) I'm getting different MBean Servers.
&gt; My question is - How Do I reach the Tomcat mbean server from outside or
&gt; alternatively, how do I register the MBeans from inside apache with the
&gt; "outside world" MBean server.
&gt; The first option (Reach the Tomcat mbean server from the outside) is
&gt; preferable.
&gt; Thanks!!

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



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How To Get MBean Server of Apache Tomcat.</title>
<author><name>Ben Katz &lt;ben.katz@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c17031d100912080434y4ed11262ha5ba00a7ac53df45@mail.gmail.com%3e"/>
<id>urn:uuid:%3c17031d100912080434y4ed11262ha5ba00a7ac53df45@mail-gmail-com%3e</id>
<updated>2009-12-08T12:34:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,
I use ManagementFactory.getPlatformMBeanServer() from within Apache Tomcat
and from a regular JAR file (outside the scope of apache).
I think (And correct me if im wrong) I'm getting different MBean Servers.
My question is - How Do I reach the Tomcat mbean server from outside or
alternatively, how do I register the MBeans from inside apache with the
"outside world" MBean server.
The first option (Reach the Tomcat mbean server from the outside) is
preferable.
Thanks!!


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: the Tomcat generates more than one session id with the same http request, please help me</title>
<author><name>&quot;Looijmans, Mike&quot; &lt;mike.looijmans@oce.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c948126CDFED9634D8B12AF27F009EDC501CC49D2@oce-exbe03-v.oce.net%3e"/>
<id>urn:uuid:%3c948126CDFED9634D8B12AF27F009EDC501CC49D2@oce-exbe03-v-oce-net%3e</id>
<updated>2009-12-08T10:03:51Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The reason is that "other" browsers use a media player component that
reconnects to the server. The "session" is linked to the browser
instance. As a result, the session is lost when the mediaplayer connects
to get the audio data.
 
Whap happens in "other" browsers is the equivalent of storing a
bookmark, closing the browser, starting a new browser and retrieving the
bookmark. This will not work in your application because you depend on
the session to remain the same.
 
The solution is to either NOT depend on the session for the audio data
retrieval, OR to include the session ID in the url itself. Which
solution you choose and how you wish to implement that solution is
entirely up to you. We'll be glad to help you regardless oft he
implementation you pick. Just don't expect your application to function
without modification, it is not Tomcat's nor the browser's "fault" that
it does not work, it is something you need to address in your web
application.
 
M.

	 

	But if I change to use IE6/IE7/IE8, this problem never happened.
Does someone know the reason? thanks.

	 



This message and attachment(s) are intended solely for use by the addressee and may contain
information that is privileged, confidential or otherwise exempt from disclosure under applicable
law.

If you are not the intended recipient or agent thereof responsible for delivering this message
to the intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.

If you have received this communication in error, please notify the sender immediately by
telephone and with a 'reply' message.

Thank you for your co-operation.



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: the Tomcat generates more than one session id with the same http request, please help me</title>
<author><name>&quot;Peter Chen&quot; &lt;peter.chen@aicent.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cB2890A379358CB4DA64B0450B7739C8A04BB8BC6@chnbjxb01.bj.aicent.com%3e"/>
<id>urn:uuid:%3cB2890A379358CB4DA64B0450B7739C8A04BB8BC6@chnbjxb01-bj-aicent-com%3e</id>
<updated>2009-12-08T10:02:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Sorry, figures in the E-mail I just sent can¡¯t be seen.

I modified figures as attachments, and resend the mail.

 

 

 

 

I show these three audio files on the JSP page, just as following show.(See attachment figure1.png)

 

 

The script I used to show these audio files is like this: )See attachment figure2.png)

 

&lt;script language="JavaScript"&gt;

document.write('    &lt;object width="320" height="45" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"&gt;');

document.write('        &lt;param name="filename" value="getParts.jsp;jsessionid=87ACD9BD3590FBE1051F33B2AA7AE488?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
/&gt;');

document.write('        &lt;PARAM NAME="AUTOSTART" value="false"&gt;');

document.write('        &lt;embed width="320" height="45" type="application/x-mplayer2" src="getParts.jsp;jsessionid=87ACD9BD3590FBE1051F33B2AA7AE488?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
AutoStart="0"&gt;');

document.write('        &lt;/embed&gt;');

document.write('    &lt;/object&gt;');

&lt;/script&gt;

 

 

I select the icon of Ashanti.WAV, and press the right key of mouse, and it show the menu like
this: (See attachment figure3.png)

 

After I pressed the menu item ¡°Properties¡±, a dialog box will show, and we see the Location
of the audio file.

 

We can see that, jsessionid= 87ACD9BD3590FBE1051F33B2AA7AE488, but after I pressed the ¡°play¡±
button of the audio file, it doesn¡¯t work. That is, this file can¡¯t be played.

 

I traced in the log file, and found the real session id is 1FADDAF2B01872E5E8ECEB72C72BF98C.

 

Each time I pressed the play button, there are two lines added in the log, like this: 

TRACE 091208 17:19:25,476 http-8080-8      sessionid:1FADDAF2B01872E5E8ECEB72C72BF98C 

WARN  091208 17:19:25,476 http-8080-8      message from session is null!

 

So I can make sure that, there is something wrong with the session information.

 

 

I have tested this for lots of times with the browser FireFox3.5, and it always works like
this.

 

 

But if I change to use IE6/IE7/IE8, this problem never happened. Does someone know the reason?
thanks.

 

 

 

________________________________

From: Peter Chen [mailto:peter.chen@aicent.com] 
Sent: 2009Äê12ÔÂ8ÈÕ 17:54
To: Tomcat Users List
Subject: RE: the Tomcat generates more than one session id with the same http request, please
help me

 

I show these three audio files on the JSP page, just as following show.



 

The script I used to show these audio files is like this:

 

&lt;script language="JavaScript"&gt;

document.write('    &lt;object width="320" height="45" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"&gt;');

document.write('        &lt;param name="filename" value="getParts.jsp;jsessionid=87ACD9BD3590FBE1051F33B2AA7AE488?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
/&gt;');

document.write('        &lt;PARAM NAME="AUTOSTART" value="false"&gt;');

document.write('        &lt;embed width="320" height="45" type="application/x-mplayer2" src="getParts.jsp;jsessionid=87ACD9BD3590FBE1051F33B2AA7AE488?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
AutoStart="0"&gt;');

document.write('        &lt;/embed&gt;');

document.write('    &lt;/object&gt;');

&lt;/script&gt;

 

 

I select the icon of Ashanti.WAV, and press the right key of mouse, and it show the menu like
this:



 

 

 

After I pressed the menu item ¡°Properties¡±, a dialog box will show, and we see the Location
of the audio file.



 

 

We can see that, jsessionid= 87ACD9BD3590FBE1051F33B2AA7AE488, but after I pressed the ¡°play¡±
button of the audio file, it doesn¡¯t work. That is, this file can¡¯t be played.

 

I traced in the log file, and found the real session id is 1FADDAF2B01872E5E8ECEB72C72BF98C.

 

Each time I pressed the play button, there are two lines added in the log, like this: 

TRACE 091208 17:19:25,476 http-8080-8      sessionid:1FADDAF2B01872E5E8ECEB72C72BF98C 

WARN  091208 17:19:25,476 http-8080-8      message from session is null!

 

So I can make sure that, there is something wrong with the session information.

 

 

I have tested this for lots of times with the browser FireFox3.5, and it always works like
this.

 

 

But if I change to use IE6/IE7/IE8, this problem never happened. Does someone know the reason?
thanks.

 

 

 

 

-----Original Message-----
From: Looijmans, Mike [mailto:mike.looijmans@oce.com] 
Sent: 2009Äê12ÔÂ8ÈÕ 15:03
To: Tomcat Users List
Subject: RE: the Tomcat generates more than one session id with the same http request, please
help me

 

Seems like a propietary way of storing the session ID, I'm not much into JSP stuff so I really
don't know. Someone else here may be able to explain.

 

You can store whatever you need in parameters, either by putting into URLs or by creating
(hidden) controls on web forms. This is the preferred method of parameter passing, as it allows
multiple instances (e.g. browser tabs) to coexist. You should only store things in a session
that are related to the connection and user (e.g. user credentials, preferences and such),
but absolutely not the page he's navigating now.

 

You can also add a "path" to the URL, e.g.

 

getparts.jsp/137063/4

 

Then "getPathInfo()" will return "137063/4" in getparts.jsp.

 

M

 

&gt; -----Original Message-----

&gt; From: Peter Chen [mailto:peter.chen@aicent.com] 

&gt; Sent: dinsdag 08 december 2009 07:49

&gt; To: Tomcat Users List

&gt; Subject: RE: the Tomcat generates more than one session id 

&gt; with the same http request, please help me

&gt; 

&gt; Thanks for Mike's reply.

&gt; 

&gt; I searched on the Internet, and I got a method, the detail is 

&gt; as follows:

&gt; &lt;script language="JavaScript"&gt;

&gt; document.write('    &lt;object width="320" height="45" 

&gt; classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"&gt;');

&gt; document.write('        &lt;param name="filename" 

&gt; value="getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1A

&gt; D?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;i

&gt; ndex=4" /&gt;');

&gt; document.write('        &lt;PARAM NAME="AUTOSTART" value="false"&gt;');

&gt; document.write('        &lt;embed width="320" height="45" 

&gt; type="application/x-mplayer2" 

&gt; src="getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD?

&gt; timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;ind

&gt; ex=4" AutoStart="0"&gt;');

&gt; document.write('        &lt;/embed&gt;');

&gt; document.write('    &lt;/object&gt;');

&gt; &lt;/script&gt;

&gt; 

&gt; The most important sentence is 

&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD?time

&gt; stamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"

&gt; 

&gt; I know the URL like 

&gt; "getParts.jsp?timestamp=1260252638867&amp;contentid=137063&amp;timemar

&gt; k=20091110&amp;index=4", this URL is used to pass parameters from 

&gt; one Jsp to another one. And we can get parameters with 

&gt; sentences like "request.getParameter("timestamp"); 

&gt; request.getParameter("contentid ")".

&gt; 

&gt; But I don't know the part 

&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD", 

&gt; is it also used to pass parameter?

&gt; 

&gt; If so, how to get the parameter? Thanks.

&gt; 

&gt; 

&gt; 

&gt; -----Original Message-----

&gt; From: Looijmans, Mike [mailto:mike.looijmans@oce.com]

&gt; Sent: 2009Äê12ÔÂ7ÈÕ 16:39

&gt; To: Tomcat Users List

&gt; Subject: RE: the Tomcat generates more than one session id 

&gt; with the same http request, please help me

&gt; 

&gt; Put the session ID in the URL and it will work on all systems.

&gt; 

&gt; Alternatively, don't use sessions for the audio file.

&gt;  

&gt; 

&gt; &gt; -----Original Message-----

&gt; &gt; From: Peter Chen [mailto:peter.chen@aicent.com]

&gt; &gt; Sent: maandag 07 december 2009 09:22

&gt; &gt; To: users@tomcat.apache.org

&gt; &gt; Subject: the Tomcat generates more than one session id with 

&gt; the same 

&gt; &gt; http request, please help me

&gt; &gt; 

&gt; &gt; Hi, all

&gt; &gt; 

&gt; &gt;  

&gt; &gt; 

&gt; &gt; I am testing a website with the server Tomcat.  I am using Tomcat 

&gt; &gt; 5.5.26, and I found one problem.

&gt; &gt; 

&gt; &gt;  

&gt; &gt; 

&gt; &gt; The website is used to display audio files. After I log in the 

&gt; &gt; website, I can see the icon of the audio file. But after I 

&gt; press the 

&gt; &gt; button "play", it has different results with different browsers.

&gt; &gt; 

&gt; &gt; When I use firefox3.5.5 and Google Chrome 3.0, I found the 

&gt; Tomcat will 

&gt; &gt; create more than one session id, and it can not be played.

&gt; &gt; 

&gt; &gt; But if I use IE6.0/IE7.0/IE8.0, I found there is only one 

&gt; session id, 

&gt; &gt; and it plays well.

&gt; &gt; 

&gt; &gt;  

&gt; &gt; 

&gt; &gt; I don't know the reason, has someone met this problem 

&gt; before,  please 

&gt; &gt; help me to solve this problem, thanks.

&gt; &gt; 

&gt; &gt; 

&gt; 

&gt; This message and attachment(s) are intended solely for use by 

&gt; the addressee and may contain information that is privileged, 

&gt; confidential or otherwise exempt from disclosure under applicable law.

&gt; 

&gt; If you are not the intended recipient or agent thereof 

&gt; responsible for delivering this message to the intended 

&gt; recipient, you are hereby notified that any dissemination, 

&gt; distribution or copying of this communication is strictly prohibited.

&gt; 

&gt; If you have received this communication in error, please 

&gt; notify the sender immediately by telephone and with a 'reply' message.

&gt; 

&gt; Thank you for your co-operation.

&gt; 

&gt; 

&gt; 

&gt; ---------------------------------------------------------------------

&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

&gt; For additional commands, e-mail: users-help@tomcat.apache.org

&gt; 

&gt; 

&gt; ---------------------------------------------------------------------

&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

&gt; For additional commands, e-mail: users-help@tomcat.apache.org

&gt; 

&gt; 

&gt; 

 

This message and attachment(s) are intended solely for use by the addressee and may contain
information that is privileged, confidential or otherwise exempt from disclosure under applicable
law.

 

If you are not the intended recipient or agent thereof responsible for delivering this message
to the intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.

 

If you have received this communication in error, please notify the sender immediately by
telephone and with a 'reply' message.

 

Thank you for your co-operation.



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: the Tomcat generates more than one session id with the same http request, please help me</title>
<author><name>&quot;Peter Chen&quot; &lt;peter.chen@aicent.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cB2890A379358CB4DA64B0450B7739C8A04BB8BB6@chnbjxb01.bj.aicent.com%3e"/>
<id>urn:uuid:%3cB2890A379358CB4DA64B0450B7739C8A04BB8BB6@chnbjxb01-bj-aicent-com%3e</id>
<updated>2009-12-08T09:54:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I show these three audio files on the JSP page, just as following show.

 

 

The script I used to show these audio files is like this:

 

&lt;script language="JavaScript"&gt;

document.write('    &lt;object width="320" height="45" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"&gt;');

document.write('        &lt;param name="filename" value="getParts.jsp;jsessionid=87ACD9BD3590FBE1051F33B2AA7AE488?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
/&gt;');

document.write('        &lt;PARAM NAME="AUTOSTART" value="false"&gt;');

document.write('        &lt;embed width="320" height="45" type="application/x-mplayer2" src="getParts.jsp;jsessionid=87ACD9BD3590FBE1051F33B2AA7AE488?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
AutoStart="0"&gt;');

document.write('        &lt;/embed&gt;');

document.write('    &lt;/object&gt;');

&lt;/script&gt;

 

 

I select the icon of Ashanti.WAV, and press the right key of mouse, and it show the menu like
this:

 

 

 

 

After I pressed the menu item ¡°Properties¡±, a dialog box will show, and we see the Location
of the audio file.

 

 

 

We can see that, jsessionid= 87ACD9BD3590FBE1051F33B2AA7AE488, but after I pressed the ¡°play¡±
button of the audio file, it doesn¡¯t work. That is, this file can¡¯t be played.

 

I traced in the log file, and found the real session id is 1FADDAF2B01872E5E8ECEB72C72BF98C.

 

Each time I pressed the play button, there are two lines added in the log, like this: 

TRACE 091208 17:19:25,476 http-8080-8      sessionid:1FADDAF2B01872E5E8ECEB72C72BF98C 

WARN  091208 17:19:25,476 http-8080-8      message from session is null!

 

So I can make sure that, there is something wrong with the session information.

 

 

I have tested this for lots of times with the browser FireFox3.5, and it always works like
this.

 

 

But if I change to use IE6/IE7/IE8, this problem never happened. Does someone know the reason?
thanks.

 

 

 

 

-----Original Message-----
From: Looijmans, Mike [mailto:mike.looijmans@oce.com] 
Sent: 2009Äê12ÔÂ8ÈÕ 15:03
To: Tomcat Users List
Subject: RE: the Tomcat generates more than one session id with the same http request, please
help me

 

Seems like a propietary way of storing the session ID, I'm not much into JSP stuff so I really
don't know. Someone else here may be able to explain.

 

You can store whatever you need in parameters, either by putting into URLs or by creating
(hidden) controls on web forms. This is the preferred method of parameter passing, as it allows
multiple instances (e.g. browser tabs) to coexist. You should only store things in a session
that are related to the connection and user (e.g. user credentials, preferences and such),
but absolutely not the page he's navigating now.

 

You can also add a "path" to the URL, e.g.

 

getparts.jsp/137063/4

 

Then "getPathInfo()" will return "137063/4" in getparts.jsp.

 

M

 

&gt; -----Original Message-----

&gt; From: Peter Chen [mailto:peter.chen@aicent.com] 

&gt; Sent: dinsdag 08 december 2009 07:49

&gt; To: Tomcat Users List

&gt; Subject: RE: the Tomcat generates more than one session id 

&gt; with the same http request, please help me

&gt; 

&gt; Thanks for Mike's reply.

&gt; 

&gt; I searched on the Internet, and I got a method, the detail is 

&gt; as follows:

&gt; &lt;script language="JavaScript"&gt;

&gt; document.write('    &lt;object width="320" height="45" 

&gt; classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"&gt;');

&gt; document.write('        &lt;param name="filename" 

&gt; value="getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1A

&gt; D?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;i

&gt; ndex=4" /&gt;');

&gt; document.write('        &lt;PARAM NAME="AUTOSTART" value="false"&gt;');

&gt; document.write('        &lt;embed width="320" height="45" 

&gt; type="application/x-mplayer2" 

&gt; src="getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD?

&gt; timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;ind

&gt; ex=4" AutoStart="0"&gt;');

&gt; document.write('        &lt;/embed&gt;');

&gt; document.write('    &lt;/object&gt;');

&gt; &lt;/script&gt;

&gt; 

&gt; The most important sentence is 

&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD?time

&gt; stamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"

&gt; 

&gt; I know the URL like 

&gt; "getParts.jsp?timestamp=1260252638867&amp;contentid=137063&amp;timemar

&gt; k=20091110&amp;index=4", this URL is used to pass parameters from 

&gt; one Jsp to another one. And we can get parameters with 

&gt; sentences like "request.getParameter("timestamp"); 

&gt; request.getParameter("contentid ")".

&gt; 

&gt; But I don't know the part 

&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD", 

&gt; is it also used to pass parameter?

&gt; 

&gt; If so, how to get the parameter? Thanks.

&gt; 

&gt; 

&gt; 

&gt; -----Original Message-----

&gt; From: Looijmans, Mike [mailto:mike.looijmans@oce.com]

&gt; Sent: 2009Äê12ÔÂ7ÈÕ 16:39

&gt; To: Tomcat Users List

&gt; Subject: RE: the Tomcat generates more than one session id 

&gt; with the same http request, please help me

&gt; 

&gt; Put the session ID in the URL and it will work on all systems.

&gt; 

&gt; Alternatively, don't use sessions for the audio file.

&gt;  

&gt; 

&gt; &gt; -----Original Message-----

&gt; &gt; From: Peter Chen [mailto:peter.chen@aicent.com]

&gt; &gt; Sent: maandag 07 december 2009 09:22

&gt; &gt; To: users@tomcat.apache.org

&gt; &gt; Subject: the Tomcat generates more than one session id with 

&gt; the same 

&gt; &gt; http request, please help me

&gt; &gt; 

&gt; &gt; Hi, all

&gt; &gt; 

&gt; &gt;  

&gt; &gt; 

&gt; &gt; I am testing a website with the server Tomcat.  I am using Tomcat 

&gt; &gt; 5.5.26, and I found one problem.

&gt; &gt; 

&gt; &gt;  

&gt; &gt; 

&gt; &gt; The website is used to display audio files. After I log in the 

&gt; &gt; website, I can see the icon of the audio file. But after I 

&gt; press the 

&gt; &gt; button "play", it has different results with different browsers.

&gt; &gt; 

&gt; &gt; When I use firefox3.5.5 and Google Chrome 3.0, I found the 

&gt; Tomcat will 

&gt; &gt; create more than one session id, and it can not be played.

&gt; &gt; 

&gt; &gt; But if I use IE6.0/IE7.0/IE8.0, I found there is only one 

&gt; session id, 

&gt; &gt; and it plays well.

&gt; &gt; 

&gt; &gt;  

&gt; &gt; 

&gt; &gt; I don't know the reason, has someone met this problem 

&gt; before,  please 

&gt; &gt; help me to solve this problem, thanks.

&gt; &gt; 

&gt; &gt; 

&gt; 

&gt; This message and attachment(s) are intended solely for use by 

&gt; the addressee and may contain information that is privileged, 

&gt; confidential or otherwise exempt from disclosure under applicable law.

&gt; 

&gt; If you are not the intended recipient or agent thereof 

&gt; responsible for delivering this message to the intended 

&gt; recipient, you are hereby notified that any dissemination, 

&gt; distribution or copying of this communication is strictly prohibited.

&gt; 

&gt; If you have received this communication in error, please 

&gt; notify the sender immediately by telephone and with a 'reply' message.

&gt; 

&gt; Thank you for your co-operation.

&gt; 

&gt; 

&gt; 

&gt; ---------------------------------------------------------------------

&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

&gt; For additional commands, e-mail: users-help@tomcat.apache.org

&gt; 

&gt; 

&gt; ---------------------------------------------------------------------

&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

&gt; For additional commands, e-mail: users-help@tomcat.apache.org

&gt; 

&gt; 

&gt; 

 

This message and attachment(s) are intended solely for use by the addressee and may contain
information that is privileged, confidential or otherwise exempt from disclosure under applicable
law.

 

If you are not the intended recipient or agent thereof responsible for delivering this message
to the intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.

 

If you have received this communication in error, please notify the sender immediately by
telephone and with a 'reply' message.

 

Thank you for your co-operation.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: directory path</title>
<author><name>=?ISO-8859-1?Q?Andr=E9_Warnier?= &lt;aw@ice-sa.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c4B1E19B6.2020604@ice-sa.com%3e"/>
<id>urn:uuid:%3c4B1E19B6-2020604@ice-sa-com%3e</id>
<updated>2009-12-08T09:17:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
File Send wrote:
&gt; Hi Team,
&gt; 
&gt;   I have started using Tomcat 5.5.27 recently and now I would like to
&gt; integrate with Axis for web service development.However, I could see many
&gt; web-inf and lib folders so I am confused where I should keep my library
&gt; files. I thought of using this location C:\Documents and Settings\minglau\My
&gt; Documents\Tomcat5.5\apache-tomcat-5.5.27\webapps. However, it does not seem
&gt; to be appropriate. Another thing - I also wrote jsp and kept it at
&gt; C:\Documents and Settings\minglau\My
&gt; Documents\Tomcat5.5\apache-tomcat-5.5.27\webapps\ROOT location but its not
&gt; getting detected from browser by typing the url
&gt; http://localhost:8080/xyz.jsp. Can any one please suggest the answers for
&gt; these two issues. 

One tip : de-install Tomcat, and re-install it to some sensible 
location, like c:\tomcat.
If nothing else, it will save you a lot of typing, and save time to 
other people on this list trying to follow your posts.

Other than that, what really happens when you enter 
"http://localhost:8080/xyz.jsp" in the browser's URL bar ?

"not getting detected" is not really helpful here.


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



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: the Tomcat generates more than one session id with the same http request, please help me</title>
<author><name>&quot;Looijmans, Mike&quot; &lt;mike.looijmans@oce.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3c948126CDFED9634D8B12AF27F009EDC501C888A1@oce-exbe03-v.oce.net%3e"/>
<id>urn:uuid:%3c948126CDFED9634D8B12AF27F009EDC501C888A1@oce-exbe03-v-oce-net%3e</id>
<updated>2009-12-08T07:02:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Seems like a propietary way of storing the session ID, I'm not much into JSP stuff so I really
don't know. Someone else here may be able to explain.

You can store whatever you need in parameters, either by putting into URLs or by creating
(hidden) controls on web forms. This is the preferred method of parameter passing, as it allows
multiple instances (e.g. browser tabs) to coexist. You should only store things in a session
that are related to the connection and user (e.g. user credentials, preferences and such),
but absolutely not the page he's navigating now.

You can also add a "path" to the URL, e.g.

getparts.jsp/137063/4

Then "getPathInfo()" will return "137063/4" in getparts.jsp.

M

&gt; -----Original Message-----
&gt; From: Peter Chen [mailto:peter.chen@aicent.com] 
&gt; Sent: dinsdag 08 december 2009 07:49
&gt; To: Tomcat Users List
&gt; Subject: RE: the Tomcat generates more than one session id 
&gt; with the same http request, please help me
&gt; 
&gt; Thanks for Mike's reply.
&gt; 
&gt; I searched on the Internet, and I got a method, the detail is 
&gt; as follows:
&gt; &lt;script language="JavaScript"&gt;
&gt; document.write('    &lt;object width="320" height="45" 
&gt; classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"&gt;');
&gt; document.write('        &lt;param name="filename" 
&gt; value="getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1A
&gt; D?timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;i
&gt; ndex=4" /&gt;');
&gt; document.write('        &lt;PARAM NAME="AUTOSTART" value="false"&gt;');
&gt; document.write('        &lt;embed width="320" height="45" 
&gt; type="application/x-mplayer2" 
&gt; src="getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD?
&gt; timestamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;ind
&gt; ex=4" AutoStart="0"&gt;');
&gt; document.write('        &lt;/embed&gt;');
&gt; document.write('    &lt;/object&gt;');
&gt; &lt;/script&gt;
&gt; 
&gt; The most important sentence is 
&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD?time
&gt; stamp=1260252638867&amp;contentid=137063&amp;timemark=20091110&amp;index=4"
&gt; 
&gt; I know the URL like 
&gt; "getParts.jsp?timestamp=1260252638867&amp;contentid=137063&amp;timemar
&gt; k=20091110&amp;index=4", this URL is used to pass parameters from 
&gt; one Jsp to another one. And we can get parameters with 
&gt; sentences like "request.getParameter("timestamp"); 
&gt; request.getParameter("contentid ")".
&gt; 
&gt; But I don't know the part 
&gt; "getParts.jsp;jsessionid=B01FF12CBC92F9BA1682E9A883A3A1AD", 
&gt; is it also used to pass parameter?
&gt; 
&gt; If so, how to get the parameter? Thanks.
&gt; 
&gt; 
&gt; 
&gt; -----Original Message-----
&gt; From: Looijmans, Mike [mailto:mike.looijmans@oce.com]
&gt; Sent: 2009å¹´12æœˆ7æ—¥ 16:39
&gt; To: Tomcat Users List
&gt; Subject: RE: the Tomcat generates more than one session id 
&gt; with the same http request, please help me
&gt; 
&gt; Put the session ID in the URL and it will work on all systems.
&gt; 
&gt; Alternatively, don't use sessions for the audio file.
&gt;  
&gt; 
&gt; &gt; -----Original Message-----
&gt; &gt; From: Peter Chen [mailto:peter.chen@aicent.com]
&gt; &gt; Sent: maandag 07 december 2009 09:22
&gt; &gt; To: users@tomcat.apache.org
&gt; &gt; Subject: the Tomcat generates more than one session id with 
&gt; the same 
&gt; &gt; http request, please help me
&gt; &gt; 
&gt; &gt; Hi, all
&gt; &gt; 
&gt; &gt;  
&gt; &gt; 
&gt; &gt; I am testing a website with the server Tomcat.  I am using Tomcat 
&gt; &gt; 5.5.26, and I found one problem.
&gt; &gt; 
&gt; &gt;  
&gt; &gt; 
&gt; &gt; The website is used to display audio files. After I log in the 
&gt; &gt; website, I can see the icon of the audio file. But after I 
&gt; press the 
&gt; &gt; button "play", it has different results with different browsers.
&gt; &gt; 
&gt; &gt; When I use firefox3.5.5 and Google Chrome 3.0, I found the 
&gt; Tomcat will 
&gt; &gt; create more than one session id, and it can not be played.
&gt; &gt; 
&gt; &gt; But if I use IE6.0/IE7.0/IE8.0, I found there is only one 
&gt; session id, 
&gt; &gt; and it plays well.
&gt; &gt; 
&gt; &gt;  
&gt; &gt; 
&gt; &gt; I don't know the reason, has someone met this problem 
&gt; before,  please 
&gt; &gt; help me to solve this problem, thanks.
&gt; &gt; 
&gt; &gt; 
&gt; 
&gt; This message and attachment(s) are intended solely for use by 
&gt; the addressee and may contain information that is privileged, 
&gt; confidential or otherwise exempt from disclosure under applicable law.
&gt; 
&gt; If you are not the intended recipient or agent thereof 
&gt; responsible for delivering this message to the intended 
&gt; recipient, you are hereby notified that any dissemination, 
&gt; distribution or copying of this communication is strictly prohibited.
&gt; 
&gt; If you have received this communication in error, please 
&gt; notify the sender immediately by telephone and with a 'reply' message.
&gt; 
&gt; Thank you for your co-operation.
&gt; 
&gt; 
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt; 
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
&gt; For additional commands, e-mail: users-help@tomcat.apache.org
&gt; 
&gt; 
&gt; 

This message and attachment(s) are intended solely for use by the addressee and may contain
information that is privileged, confidential or otherwise exempt from disclosure under applicable
law.

If you are not the intended recipient or agent thereof responsible for delivering this message
to the intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.

If you have received this communication in error, please notify the sender immediately by
telephone and with a 'reply' message.

Thank you for your co-operation.

</pre>
</div>
</content>
</entry>
<entry>
<title>RE: the Tomcat generates more than one session id with the same http request, please help me</title>
<author><name>&quot;Peter Chen&quot; &lt;peter.chen@aicent.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200912.mbox/%3cB2890A379358CB4DA64B0450B7739C8A04BB8AE2@chnbjxb01.bj.aicent.com%3e"/>
<id>urn:uuid:%3cB2890A379358CB4DA64B0450B7739C8A04BB8AE2@chnbjxb01-bj-aicent-com%3e</id>
<updated>2009-12-08T07:00:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi pid,

I used a JavaBean to pass the parameter, the sentence is like this:
&lt;jsp:useBean id="bean" scope="session" class="com.xxx.bean.MessageBean" /&gt;
And the scope is session, in the Jsp page, I use this JavaBean like this:
Message msg = bean.getMessage();

And in the object of Message, I stored a MMS(Multimedia Message Service, include video and
audio files), and I will get this MMS¡¡file later on.

But after testing, I found that, sometimes I executed the sentence "Message msg = bean.getMessage();",
and the variable msg return null.
But most time, it works well, and return a correct object.

Could you tell me the reason? Or is something I have done wrong?


-----Original Message-----
From: Pid [mailto:pid@pidster.com] 
Sent: 2009Äê12ÔÂ7ÈÕ 18:21
To: users@tomcat.apache.org
Subject: Re: the Tomcat generates more than one session id with the same http request, please
help me

On 07/12/2009 08:22, Peter Chen wrote:
&gt; Hi, all
&gt;
&gt;
&gt;
&gt; I am testing a website with the server Tomcat.  I am using Tomcat
&gt; 5.5.26, and I found one problem.
&gt;
&gt;
&gt;
&gt; The website is used to display audio files. After I log in the website,
&gt; I can see the icon of the audio file. But after I press the button
&gt; "play", it has different results with different browsers.
&gt;
&gt; When I use firefox3.5.5 and Google Chrome 3.0, I found the Tomcat will
&gt; create more than one session id, and it can not be played.

What bearing does the session have on this?
Are you storing data in it?

&gt; But if I use IE6.0/IE7.0/IE8.0, I found there is only one session id,
&gt; and it plays well.
&gt;
&gt; I don't know the reason, has someone met this problem before,  please
&gt; help me to solve this problem, thanks.

Are you properly encoding all link URLs on each page with 
HttpServletResponse.encodeURL()?


p



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


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



</pre>
</div>
</content>
</entry>
</feed>
