Re: Mod_jk working for failover

2011-06-07 Thread Manuel Fernández Panzuela
my setup:

# Define list of workers that will be used for mapping requests
worker.list=loadbalancer43,status

# Definicion de plantilla
worker.template43.port=8009
worker.template43.type=ajp13
worker.template43.lbfactor=1
worker.template43.ping_timeout=1000
worker.template43.socket_timeout=10
worker.template43.ping_mode=A
worker.template43.connection_pool_timeout=600

# NODO 43 m1g1
worker.43m1g1.reference=worker.template43
worker.43m1g1.host=xx.xx.xx.xx

# NODO 43 m2g1
worker.43m2g1.reference=worker.template43
worker.43m2g1.host=xx.xx.xx.xx


# Balanceador correspodiente a todos los grupos
worker.loadbalancer43.type=lb
worker.loadbalancer43.balance_workers=43m1g1,43m2g1
worker.loadbalancer43.sticky_session=1


Now is balancing between 4 instances, but I need to work against 43m1g1 node.
If 43m1g1 node fails, then petitions will be redirects to 43m2g1 node.

Thank you




2011/6/7 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Manuel.
>
> On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote:
> > I want to work with mod_jk in failover mode. I do not want to balancing
> > petitions until the node 1 is unavailable. If principal node (node 1) is
> > down, then petitions will be redirected to node 2.
> >
> > How I can do it?
>
> What have you tried so far?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I
> 6osAmgLvY4GYifndETBYP3z5JbznRYal
> =Jp0Z
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Query regarding an issue been faced in TOMCAT

2011-06-07 Thread André Warnier

Bill Miller wrote:

It's also possible that there were no more iNodes available for that directory. It will 
give false "volume full" type of errors when it's actually just too many 
files/folders within a directory.

(This used to happen a LOT in the ancient DOS days in the root directory... max 
file count=255!!)


You mean Devonian Operating System, right ?

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



Re: cluster - does not implement StandardManager

2011-06-07 Thread Marcel dit le Belge

Hi Christopher,

The problem was in the context.xml under the web app, where the manager was
commented out.
Thanks

Marcel


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Marcel,
> 
> On 6/6/2011 4:38 PM, Marcel dit le Belge wrote:
>> I try to implement a cluster (tomcat 7, 2 instances) but I get some
>> problem.
> 
> Which exact version of Tomcat 7?
> 
>> When I start tomcat, I get this debug : 
>> 
>> I don't have specific context.xml under the application.
> 
> Why not?
> 
>> Manager [ org.apache.catalina.session.StandardManager[/myapp]] does
>> not implement ClusterManager, addition to cluster has been aborted.
> 
> Can you post your entire startup log?
> 
> What happens if you *do* have a context.xml bundled with your webapp
> under META-INF/context.xml. You can just put "" in there and
> nothing else.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk3ufq8ACgkQ9CaO5/Lv0PAhrgCgk1VPB7WgpiKstY1Qzj2qTRZ3
> /D0AoKSRgYPbRkqPKf+cfctaWCRQxAiH
> =PAPZ
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/cluster---does-not-implement-StandardManager-tp31786913p31796498.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Query regarding an issue been faced in TOMCAT

2011-06-07 Thread Bill Miller
It's also possible that there were no more iNodes available for that directory. 
It will give false "volume full" type of errors when it's actually just too 
many files/folders within a directory.

(This used to happen a LOT in the ancient DOS days in the root directory... max 
file count=255!!)

Bill

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: June 7, 2011 3:48 PM
To: Tomcat Users List
Subject: Re: Query regarding an issue been faced in TOMCAT

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Srilalitha,

On 6/7/2011 4:54 AM, Srilalitha Bijumalla wrote:
> This issue got solved when we deleted some folders from a directory
> which was mapped to tomcat in conf.

So, you *did* run out of disk space.

> But we are still not able to analyse why this issue has occurred,
> Disk space was available and permissions were also provided and
> tomcat was not started from backup directory
> 
> Need to find how the folders linked in conf could create a low disk
> space error

It would happen if you had the following situation:

$ mount
ext4fs on / type ext4fs (rw)
ext4fs on /global/backup (rw)
ext4fs on /global/backup/tomcat-5.5.23 (rw)

$ df -h
Filesystem   Size   Used  Avail  Use%  Mounted on
ext4fs50G20G30G   40%  /
ext4fs50G20G30G   40%  /global/backup
ext4fs50G50G50G  100%  /global/backup/tomcat-5.5.23

Check all your filesystem mappings. Something tells me the computer is
right, here.

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

iEYEARECAAYFAk3ugHAACgkQ9CaO5/Lv0PA4tACgwuqYa2RLqBnlszoZmqkUiWBc
KU0Anj6yIfynq5hNoyFnP7wbOcHtYJHs
=KbGd
-END PGP SIGNATURE-

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


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



Re: async requests on cluster

2011-06-07 Thread Seth Lenzi


OK, thanks for the info!

-S


On 6/7/2011 5:34 PM, Mark Thomas wrote:

On 07/06/2011 21:46, Seth Lenzi wrote:

The isAsyncSupported() method of the SerlvletRequest object returns
false when you uncomment the  element in the
server.xml file (Tomcat 7.0.14). Basically, enabling clustering seems to
break support for asynchronous servlets... Is there something else that
needs to be done to enable async requests to work on a cluster?


That would be a bug. Looking at it now, the fix should make it into the
next 7.0.x release (7.0.16). I'll be starting on that release once this
issue is fixed.

Mark



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



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



Re: async requests on cluster

2011-06-07 Thread Mark Thomas
On 07/06/2011 21:46, Seth Lenzi wrote:
> The isAsyncSupported() method of the SerlvletRequest object returns
> false when you uncomment the  className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> element in the
> server.xml file (Tomcat 7.0.14). Basically, enabling clustering seems to
> break support for asynchronous servlets... Is there something else that
> needs to be done to enable async requests to work on a cluster?

That would be a bug. Looking at it now, the fix should make it into the
next 7.0.x release (7.0.16). I'll be starting on that release once this
issue is fixed.

Mark



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



async requests on cluster

2011-06-07 Thread Seth Lenzi
The isAsyncSupported() method of the SerlvletRequest object returns 
false when you uncomment the className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> element in the 
server.xml file (Tomcat 7.0.14). Basically, enabling clustering seems to 
break support for asynchronous servlets... Is there something else that 
needs to be done to enable async requests to work on a cluster?


-S

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



Re: specifying the content-type

2011-06-07 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bernd,

On 6/7/2011 2:23 PM, Lentes, Bernd wrote:

Christopher Schultz wrote:

How did you do it? If you use , it should override any Content-Type
sent in the HTTP response headers

Yes, we used this. But 
http://de.selfhtml.org/html/kopfdaten/meta.htm#zeichenkodierung (unfortunally 
only in german) says
"Im Konfliktfall, also wenn der Webserver im HTTP-Header eine hiervon abweichende Angabe 
sendet, wird üblicherweise die Angabe des HTTP-Headers verwendet.", which means that, if you 
have the META in the HTML-file and also the content-type in the HTTP-Header, mostly the HTTP-Header 
"wins".


You're right. I had it wrong: the HTTP header overrides the content of
the document.


Well, it /should/.  According to the HTTP RFC.
However, many IE versions (which unfortunately is still the most-widely used browser in 
corporate environments) don't give a damn about the Content-type sent by the server, if it 
conflicts with their own sniffing of the content.

http://lmgtfy.com?q=ie+and+content-type




Our developers try now to use the
response.setContentType("text/html"); method to configure the
content-type in the HTTP-Header.

This is the proper way to do things. Using  does not hurt.


.. at least if both are consistent.

Meanwhile, and as long as your developers are fixing this, you may want to suggest to them 
that they also add a character set indication to the Content-type, like :


Content-type: text/html;charset=UTF-8

using for example : response.setContentType("text/html; charset=UTF-8");

(if of course the pages you do send back are encoded using that character 
set/encoding).
And also add it to your  tag, like so :


That will save you other problems down the line, if any of these pages can also submit any 
data back to the server, like in



So to maximise your chances of everything working correctly in a country where not 
everyone speaks only English, the following elements should agree :

- the type (text/html) and charset indicated by the server in the Content-type 
header
- the type and charset indicated in the  tag in the page itself
- the way the page itself was created on the server (with a UTF-8 aware editor, and saved 
as UTF-8 without BOM)

In addition, if the page contains a  tag, make sure it has the following 
attribute :


The reason for all the above is that HTTP and HTML for historical reasons tend to default 
to ISO-8859-1 as a character set, while everything to do with Java (like Tomcat) tends to 
default to Unicode/UTF-8.  And by not being very precise and consistent, you always run 
the risk of mixing them up, which for languages like German leads to very difficult to 
debug data corruption problems, the least of which is losanges with "?" in them in your 
pages, instead of umlauts.




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



Re: Query regarding an issue been faced in TOMCAT

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Srilalitha,

On 6/7/2011 4:54 AM, Srilalitha Bijumalla wrote:
> This issue got solved when we deleted some folders from a directory
> which was mapped to tomcat in conf.

So, you *did* run out of disk space.

> But we are still not able to analyse why this issue has occurred,
> Disk space was available and permissions were also provided and
> tomcat was not started from backup directory
> 
> Need to find how the folders linked in conf could create a low disk
> space error

It would happen if you had the following situation:

$ mount
ext4fs on / type ext4fs (rw)
ext4fs on /global/backup (rw)
ext4fs on /global/backup/tomcat-5.5.23 (rw)

$ df -h
Filesystem   Size   Used  Avail  Use%  Mounted on
ext4fs50G20G30G   40%  /
ext4fs50G20G30G   40%  /global/backup
ext4fs50G50G50G  100%  /global/backup/tomcat-5.5.23

Check all your filesystem mappings. Something tells me the computer is
right, here.

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

iEYEARECAAYFAk3ugHAACgkQ9CaO5/Lv0PA4tACgwuqYa2RLqBnlszoZmqkUiWBc
KU0Anj6yIfynq5hNoyFnP7wbOcHtYJHs
=KbGd
-END PGP SIGNATURE-

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



Re: Query regarding an issue been faced in TOMCAT

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mikolaj,

On 6/3/2011 8:33 AM, Mikolaj Rydzewski wrote:
> On Fri, 3 Jun 2011 17:58:06 +0530, Srilalitha Bijumalla wrote:
> 
>> java.io.FileNotFoundException:
>> /global/backup/apache-tomcat-5.5.23/logs/catalina.2011-05-31.log (No
>> space left on device)
> 
> Either there's no space left or there are insufficient permissions.
> Maybe tomcat is unable to create logfile, but incorrectly recognizes it
> as a no space left error.

It could also be a filesystem quota problem.

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

iEYEARECAAYFAk3uf3EACgkQ9CaO5/Lv0PDYfgCfcqNwRPZxi1JBUmKpcgp//o92
QLgAoMNu/RxwuhJVnU0pyirXo5Lw8UCK
=u9PP
-END PGP SIGNATURE-

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



Re: Application crash after Migrate to different ESX

2011-06-07 Thread הילה
Excellent. thanks a lot for all of your help :)


2011/6/7 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> הילה,
>
> On 6/6/2011 4:35 PM, הילה wrote:
> > I use Tomcat's JDBC pool (tomcat-jdbc.jar)
>
> Okay.
>
> > sorry, I haven't quite understood why shouldn't I use the
> > ValidationInterval="3" (30 seconds) string on my configuration..
> > On tomcat's documentation, it says that testonborrow=true and
> > validationQuery=SELECT 1 were part of the DBCP , and the
> > ValidationInterval=3 is introduced in the Tomcat's JDBC pool.
>
> DBCP implements a different kind of connection validation by running a
> background thread. tomcat-pool has different semantics that do not
> launch a background thread.
>
> Feel free to use validationInterval set to whatever value you'd like.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEUEARECAAYFAk3ufjUACgkQ9CaO5/Lv0PBwTACYvwblavTu/2YARBtPr/ILogXo
> NgCeIyhyJMD1TF8yUjUoHGlzW0WhZN8=
> =oqS5
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: cluster - does not implement StandardManager

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marcel,

On 6/6/2011 4:38 PM, Marcel dit le Belge wrote:
> I try to implement a cluster (tomcat 7, 2 instances) but I get some problem.

Which exact version of Tomcat 7?

> When I start tomcat, I get this debug : 
> 
> I don't have specific context.xml under the application.

Why not?

> Manager [ org.apache.catalina.session.StandardManager[/myapp]] does
> not implement ClusterManager, addition to cluster has been aborted.

Can you post your entire startup log?

What happens if you *do* have a context.xml bundled with your webapp
under META-INF/context.xml. You can just put "" in there and
nothing else.

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

iEYEARECAAYFAk3ufq8ACgkQ9CaO5/Lv0PAhrgCgk1VPB7WgpiKstY1Qzj2qTRZ3
/D0AoKSRgYPbRkqPKf+cfctaWCRQxAiH
=PAPZ
-END PGP SIGNATURE-

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



Re: Application crash after Migrate to different ESX

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

הילה,

On 6/6/2011 4:35 PM, הילה wrote:
> I use Tomcat's JDBC pool (tomcat-jdbc.jar)

Okay.

> sorry, I haven't quite understood why shouldn't I use the
> ValidationInterval="3" (30 seconds) string on my configuration..
> On tomcat's documentation, it says that testonborrow=true and
> validationQuery=SELECT 1 were part of the DBCP , and the
> ValidationInterval=3 is introduced in the Tomcat's JDBC pool.

DBCP implements a different kind of connection validation by running a
background thread. tomcat-pool has different semantics that do not
launch a background thread.

Feel free to use validationInterval set to whatever value you'd like.

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

iEUEARECAAYFAk3ufjUACgkQ9CaO5/Lv0PBwTACYvwblavTu/2YARBtPr/ILogXo
NgCeIyhyJMD1TF8yUjUoHGlzW0WhZN8=
=oqS5
-END PGP SIGNATURE-

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



Re: error-page for http 500 error code does not work

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kevin,

On 6/7/2011 8:56 AM, Kevin Claver wrote:
> Through further investigation, I now believe the JSF framework I'm
> using is absorbing the error, and the framework's error page is what
> is throwing the 500 error.  I wonder if the 500 error thrown by the
> framework's error page should fall through to the custom error page
> servlet I've created?

As I said, if the error page suffers an error, you can't really show the
error page.

> The JSF framework is the Sun Visual Web Pack that is no longer
> supported on the Oracle Netbeans IDE.  I posted on the forum for
> Netbeans in the hopes that someone can tell me how to disable the
> default exception handler for the Visual Web Pack.

Post back whatever you find. I'm sure it will help someone in the future
(who bothers to search the archives before posting).

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

iEYEARECAAYFAk3ufJsACgkQ9CaO5/Lv0PCeZwCfTYuzJj9EoW8HZTy5e1/vu6Es
OS8AoJxhF6MaCWg70S8fwiX1n0y+3XaI
=8D34
-END PGP SIGNATURE-

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



Re: specifying the content-type

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bernd,

On 6/7/2011 2:23 PM, Lentes, Bernd wrote:
> Christopher Schultz wrote:
>>
>> How did you do it? If you use > CONTENT="text/html" />, it should override any Content-Type
>> sent in the HTTP response headers
> 
> Yes, we used this. But 
> http://de.selfhtml.org/html/kopfdaten/meta.htm#zeichenkodierung (unfortunally 
> only in german) says
> "Im Konfliktfall, also wenn der Webserver im HTTP-Header eine hiervon 
> abweichende Angabe sendet, wird üblicherweise die Angabe des HTTP-Headers 
> verwendet.", which means that, if you have the META in the HTML-file and also 
> the content-type in the HTTP-Header, mostly the HTTP-Header "wins".

You're right. I had it wrong: the HTTP header overrides the content of
the document.

>>> Our developers try now to use the
>>> response.setContentType("text/html"); method to configure the
>>> content-type in the HTTP-Header.
>>
>> This is the proper way to do things. Using  does not hurt.
>>
>> So... did it work?
>>
> 
> Using the META didn't work, the other way they'll try in the next days. I 
> will inform you.

If you want to be lazy with your code, you could use a Filter to set the
Content-Type of all responses to text/html before the servlet gets a
chance to set anything. If the servlet overrides it, everything is okay.
If not, the Content-Type remains set to text/html.

It's basically the same as using DefaultType in httpd but would require
you to do more work. :(

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

iEYEARECAAYFAk3ufDAACgkQ9CaO5/Lv0PDsHwCgoMbKhbz20nCj8t8WTY1ZoP+O
AuIAn0Qx5Kse+nHp0jqv8rVJcCkdkdPE
=27hs
-END PGP SIGNATURE-

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



RE: specifying the content-type

2011-06-07 Thread Lentes, Bernd
Christopher Schultz wrote:
>
> Lentes,
>
> On 6/7/2011 11:36 AM, Lentes, Bernd wrote:
> > first we tried to set the content-type in the  ... 
> > section in the html file. That didn't work.
>
> How did you do it? If you use  CONTENT="text/html" />, it should override any Content-Type
> sent in the HTTP response headers

Yes, we used this. But 
http://de.selfhtml.org/html/kopfdaten/meta.htm#zeichenkodierung (unfortunally 
only in german) says
"Im Konfliktfall, also wenn der Webserver im HTTP-Header eine hiervon 
abweichende Angabe sendet, wird üblicherweise die Angabe des HTTP-Headers 
verwendet.", which means that, if you have the META in the HTML-file and also 
the content-type in the HTTP-Header, mostly the HTTP-Header "wins".

>
> > Our developers try now to use the
> > response.setContentType("text/html"); method to configure the
> > content-type in the HTTP-Header.
>
> This is the proper way to do things. Using  does not hurt.
>
> So... did it work?
>

Using the META didn't work, the other way they'll try in the next days. I will 
inform you.

> > What i also found out is that you can use a defaulttype
> directive in
> > your Apache configuration.
>
> Yes, you can do that, but you should instead code your
> servlets to return the proper Content-Type.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3uaisACgkQ9CaO5/Lv0PArOQCeLEPqHIn2ePvZNl84Eu6ywlaA
> 6HkAoJJqxDlbi6rGbttOjWyoO3Pi7XWs
> =6EuJ
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

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



Re: AW: specifying the content-type

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lentes,

On 6/7/2011 11:36 AM, Lentes, Bernd wrote:
> first we tried to set the content-type in the  ... 
> section in the html file. That didn't work.

How did you do it? If you use , it should override any Content-Type sent in the
HTTP response headers

> Our developers try now to use the
> response.setContentType("text/html"); method to configure the
> content-type in the HTTP-Header.

This is the proper way to do things. Using  does not hurt.

So... did it work?

> What i also found out is that you can use a defaulttype directive in
> your Apache configuration.

Yes, you can do that, but you should instead code your servlets to
return the proper Content-Type.

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

iEYEARECAAYFAk3uaisACgkQ9CaO5/Lv0PArOQCeLEPqHIn2ePvZNl84Eu6ywlaA
6HkAoJJqxDlbi6rGbttOjWyoO3Pi7XWs
=6EuJ
-END PGP SIGNATURE-

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



Re: Mod_jk working for failover

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Manuel.

On 6/7/2011 12:38 PM, Manuel Fernández Panzuela wrote:
> I want to work with mod_jk in failover mode. I do not want to balancing
> petitions until the node 1 is unavailable. If principal node (node 1) is
> down, then petitions will be redirected to node 2.
> 
> How I can do it?

What have you tried so far?

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

iEYEARECAAYFAk3uaLUACgkQ9CaO5/Lv0PD6TACcC6239gZILU+6OGpT/xsh9F0I
6osAmgLvY4GYifndETBYP3z5JbznRYal
=Jp0Z
-END PGP SIGNATURE-

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



Re: DB password in context.xml

2011-06-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Umesh,

On 6/7/2011 11:44 AM, Umesh Bhatt wrote:
> I want to keep DB password in encrypted form in context.xml and
> decrypt it in my application before calling ds.getConnection(). 
> Please let me know how to achieve it.

Here is a distillation of all the arguments (and flawed solutions) that
have floated around the archives:

http://wiki.apache.org/tomcat/FAQ/Password

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

iEYEARECAAYFAk3uaJkACgkQ9CaO5/Lv0PDciwCfXEVHwrHMel5q7HGK7ofGSeLg
LgoAoKG9RY71LoXhMCaZShSm256VA9l3
=6HSg
-END PGP SIGNATURE-

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



Re: Asynchronous servlets + Tomcat + mod_jk

2011-06-07 Thread Seth Lenzi


I got the asynch servlet working with Apache and mod_jk. The issue 
turned out to not be with mod_jk. I was deploying to a clustered 
environment with two tomcats that were set up to do session replication. 
I installed a third lone tomcat, linked it to apache with mod_jk, and it 
worked perfectly.


So now I guess my question is somewhat vague, but how would I go about 
getting asynchronous servlets to work with clustering enabled? The 
isAsyncSupported() method of the request object returns false in my 
cluster setup... I've included the cluster element from my server.xml 
file. I have this between the  element.


channelSendOptions="8">


  

  

className="org.apache.catalina.tribes.membership.McastService"

  address="228.0.0.4"
  port="45564"
  frequency="500"
  dropTime="3000"/>

className="org.apache.catalina.tribes.transport.nio.NioReceiver"

  address="auto"
  port="4000"
  autoBind="100"
  selectorTimeout="5000"
  maxThreads="6"/>

className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
  className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>



className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>


  

  filter=""/>

  

  className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
  className="org.apache.catalina.ha.session.ClusterSessionListener"/>




-S


On 6/6/2011 5:21 PM, ma...@apache.org wrote:

Seth Lenzi  wrote:



I'm using Tomcat v7.0.14, Apache v2.2.17, and mod_jk v1.2.30.

The Servlet I have does not implement CometProcessor. It's just a
regular HttpServlet which creates an AsyncContext from the
HttpServletRequest object. Like the example Servlet at this page,
http://developerlife.com/tutorials/?p=1437

It does work nicely when accessed directly from Tomcat on port 8080...
Only throws the IllegalStateExeception when going through Apache +
mod_jk. I'm using the default HTTP connector, no NIO API... Since it
was
working through Tomcat I figured I didn't need the NIO HTTP connector.

Thanks for your reply.

-S


On 6/6/2011 4:49 PM, André Warnier wrote:

Seth Lenzi wrote:

Anyone here have any experience with asynchronous servlets under a
Tomcat that's linked to Apache via mod_jk? I have an asynchronous
servlet that's working nicely when accessed directly from Tomcat,

but,

when I access it by going through Apache and mod_jk the
ServletRequest.startAsync() function call throws an
IllegalStateException saying the feature is not supported.


You do not give a clue about which version of Tomcat you are using,

but

this may provide an explanation :
http://tomcat.apache.org/tomcat-7.0-doc/aio.html

Tomcat 7 has passed the Servlet TCK with all possible combinations of protocol 
(HTTP, AJP), connector implementation (BIO, NIO, APR) and httpd module (mod_jk, 
mod_proxy_http, mod_proxy_ajp).

Asynchronous servlets work in all combinations.

The best thing to do is create the simplest possible test case (ie a single 
Servlet) that demonstrates this issue and attach it to a bugzilla issue.

Mark



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



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



Mod_jk working for failover

2011-06-07 Thread Manuel Fernández Panzuela
Hello,

I want to work with mod_jk in failover mode. I do not want to balancing
petitions until the node 1 is unavailable. If principal node (node 1) is
down, then petitions will be redirected to node 2.

How I can do it?


Thank you


Re: DB password in context.xml

2011-06-07 Thread Mark Thomas
On 07/06/2011 17:03, Umesh Bhatt wrote:
> 
> Hi,
> 
> My web application will be decrypting the password which has decryption key. 
> I do not want to keep password in plain text in context.xml.

And where is your web application going to get this decryption key from?

> Can you give me the link for archives?

Links are available from the Tomcat website.

Mark

> 
> Thanks,
> Umesh
> 
> 
> From: Mark Thomas [ma...@apache.org]
> Sent: Tuesday, June 07, 2011 9:28 PM
> To: Tomcat Users List
> Subject: Re: DB password in context.xml
> 
> On 07/06/2011 16:44, Umesh Bhatt wrote:
>>
>> Hi,
>>
>> I want to keep DB password in encrypted form in context.xml and decrypt it 
>> in my application before calling ds.getConnection().
>> Please let me know how to achieve it.
> 
> And where is Tomcat going to get the decryption key from?
> 
> Hint: Save yourself some time and search the archives.
> 
> Mark
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 
> 
> http://www.mindtree.com/email/disclaimer.html
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


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



RE: DB password in context.xml

2011-06-07 Thread Umesh Bhatt

Hi,

My web application will be decrypting the password which has decryption key. I 
do not want to keep password in plain text in context.xml.

Can you give me the link for archives?

Thanks,
Umesh


From: Mark Thomas [ma...@apache.org]
Sent: Tuesday, June 07, 2011 9:28 PM
To: Tomcat Users List
Subject: Re: DB password in context.xml

On 07/06/2011 16:44, Umesh Bhatt wrote:
>
> Hi,
>
> I want to keep DB password in encrypted form in context.xml and decrypt it in 
> my application before calling ds.getConnection().
> Please let me know how to achieve it.

And where is Tomcat going to get the decryption key from?

Hint: Save yourself some time and search the archives.

Mark



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




http://www.mindtree.com/email/disclaimer.html

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



Re: DB password in context.xml

2011-06-07 Thread Mark Thomas
On 07/06/2011 16:44, Umesh Bhatt wrote:
> 
> Hi,
> 
> I want to keep DB password in encrypted form in context.xml and decrypt it in 
> my application before calling ds.getConnection().
> Please let me know how to achieve it.

And where is Tomcat going to get the decryption key from?

Hint: Save yourself some time and search the archives.

Mark



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



Auth in Context.xml

2011-06-07 Thread Umesh Bhatt
Hi,

In Context.xml I have set Auth="Application" and want to connect with 
DataSource programatically. I am not seeing any example of how to do it. Can 
you share some link related to this?

Thanks,
Umesh



http://www.mindtree.com/email/disclaimer.html

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



DB password in context.xml

2011-06-07 Thread Umesh Bhatt

Hi,

I want to keep DB password in encrypted form in context.xml and decrypt it in 
my application before calling ds.getConnection().
Please let me know how to achieve it.

Thanks,
Umesh



http://www.mindtree.com/email/disclaimer.html

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



Re: how to correct stop a thread and avoid leaks

2011-06-07 Thread alexis
yes, did that and it's working now. when contextDestroyed is called, i set the 
bool to false and force the loop out. What i was missing is loop is exited when 
> if ((inputLine = in.readLine()) != null)


this is completed, so, from Server class what i did is

Listener.requestStop(); // this causes to take the boolean to false to exit the 
loop
while(Listener.isAlive())
{
Thread.sleep(1500);
}

Causing main thread (Server) to wait, until a new message is processed by the 
in.ReadLine, then parsed, then exit the loop and close the Listener thread, and 
then Listener.isAlive() is not true anymore, now it's working perfect.


Thanks for the help.



On Jun 7, 2011, at 12:33 PM, Bill Miller wrote:

> If you want to work with threads in tomcat you need to know about the Tomcat
> org.apache.catalina.LifecycleListener interface. If you implement the 
> interface and register your
> class within server.xml your class will be notified of Tomcat life cycle 
> events (Start, Stop,
> etc...). You can then do appropriate things when those events happen.
> 
> Here is an example method that is the only method in LifecycleListener:
> public class TomcatServerLifecycleListener implements LifecycleListener
> {
>   public void lifecycleEvent(LifecycleEvent event)
>   {
>   if(Lifecycle.STOP_EVENT.equals(event.getType()))
>   {
>   //Call a method on your Runnable that will trigger it 
> to exit the Run()
> method. 
>   // (or set a Boolean to stop looping, I've adjusted 
> your code below too; how
> you
>   // set the flag is up to you)
>   }
>   }
> }
> Here is the line to be added to Server.xml to register a class as a listener:
> 
> 
> So if you created an object like I have above and gave it a static method 
> that allows you to insert
> an object that needs to be notified of a shutdown event, then you will be 
> able to control your
> threads properly. You could even have your Runnable implement the 
> LifecycleListener directly and
> have your registered object keep a list of objects that need to be notified. 
> 
> There are dozens of ways to do this, pick one that works for you. Don't 
> forget to investigate all of
> the LifecycleEvent types in case you have use for the other options.
> 
> Bill
> 
> -Original Message-
> From: alexis [mailto:alz...@gmail.com] 
> Sent: June 6, 2011 8:10 PM
> To: Tomcat Users List
> Subject: how to correct stop a thread and avoid leaks
> 
> Hello, im running an app that has a class that implements 
> ServletContextListener (Server class), on
> that class i create a thread of Listener (that implements Runnable)
> 
> Listener starts a ServerSocket that listen on a port, and in a periodically 
> manner, this app
> receives a string, parses the string and stores the data inside a database. 
> Flow is
> 
> 1. receive a tcp connection (syn , syn+ack, ack)
> 2. receives lines over and over again inside this connections (each line is 
> parsed and stored)
> 
> Below is the code of Listener class and how i call this class from Server 
> class. What im facing is
> im not able to stop Listener in a correct way. doing Listener.interrupt() 
> does nothing. How can i
> safely stop Listener thread
> 
> 
> Thanks in advance
> 
> 
> --
> //initalize listener
>Listener = new Thread((Runnable) new
> Listener(Integer.parseInt(prop.getProperty("listenonport";
>if (!Listener.isAlive()) {
>Listener.setName("ListenerThread");
>Listener.setDaemon(true);
>Listener.start();
>}
> 
> -- 
> 
> package lesi.p1;
> 
> import java.io.BufferedReader;
> import java.io.IOException;
> import java.io.InputStreamReader;
> import java.net.ServerSocket;
> import java.net.Socket;
> import org.apache.log4j.Logger;
> 
> /**
> *
> * @author alz
> */
> public class Listener implements Runnable {
> 
>private static org.apache.log4j.Logger log = 
> Logger.getLogger(Listener.class);
>private Socket clientSocket = null;
>private ServerSocket serverSocket = null;
>private int listenport = 0;
>Thread CDRThread = null;
> 
>public Listener(int port) {
>this.listenport = port;
>}
> 
>@Override
>public void run() {
>try {
>log.debug("About to listen on port: " + this.listenport);
>serverSocket = new ServerSocket(this.listenport);
> 
>while (true) {
>clientSocket = serverSocket.accept();
>CDRThread = new Thread((Runnable) new CDRExec(clientSocket));
>if (!CDRThread.isAlive()) {
>CDRThread.setName("CDRThread");
>CDRThread.setDaemon(true);
>CDRThread.start();
>}
>}
>} catch (IOException e) {
> 
>log.error("Catcher IOException: ", e);
>} finally {
>try {
>log.info("Closing socket");
>  

RE: Multiple hosts pointing to different index files for one webapp

2011-06-07 Thread Caldarale, Charles R
> From: Mike Kennedy [mailto:mkenn...@oucpm.org] 
> Subject: Multiple hosts pointing to different index files for one webapp

> I have been asked to launch a new webapp in Tomcat via different URLs,
> with each URL pointing to a different launch page for the same app.

Probably the easiest way to handle this is with a filter.  Look here:

http://www.tuckey.org/urlrewrite/

 - Chuck


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


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



Re: Error in Tomcat 6.0 log4j documentation

2011-06-07 Thread Remon Sadikni

Hi Konstantin, hi Mark,

all right, thank you. I only looked at the published version, not the 
one in svn.


Regards,
Remon

On 06/07/2011 05:06 PM, Konstantin Kolinko wrote:

2011/6/7 Mark Thomas:

On 07/06/2011 11:52, Remon Sadikni wrote:

Hi Mark,

for me log4j only works with this additional line per appender:

log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout

Where exactly? That line is already present in the docs. Or are you
looking at an older version?

That line was already added by Christopher several days ago (revs
1129869, 1129863), as a response for the previous report of the same
issue.

It is not published yet, so see the ci link (the docs published by
buildbot) that Mark mentions below.


The latest version in svn is this:
http://ci.apache.org/projects/tomcat/tomcat6/docs/logging.html#Using_Log4j


BTW,
Log4J docs and out 5.5 docs start "conversionPattern" with an uppercase "C".

http://tomcat.apache.org/tomcat-5.5-doc/logging.html
http://logging.apache.org/log4j/1.2/manual.html

I expect it to work either way though, as Log4J normalizes the
property name before applying (o.a.log4j.config.PropertySetter calls
Introspector.decapitalize())


Best regards,
Konstantin Kolinko

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




--
+++
 Dipl. Inf. Remon Sadikni
 Scientific Programmer

 University of Hamburg / KlimaCampus Hamburg
 Center for Integrated Climate System Analysis and Prediction - CliSAP
 Grindelberg 5 / D-20144 Hamburg / Germany

 phone: +49-40-42838-7581
 email: remon.sadi...@zmaw.de
+++


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



RE: AW: specifying the content-type

2011-06-07 Thread Lentes, Bernd

Hi,

first we tried to set the content-type in the  ...  section in the 
html file. That didn't work.
Our developers try now to use the response.setContentType("text/html"); method 
to configure the content-type in the HTTP-Header.
What i also found out is that you can use a defaulttype directive in your 
Apache configuration.
This sets the content-type of all what httpd is not able to recognize.
Further information: http://httpd.apache.org/docs/2.2/mod/core.html#defaulttype

I will keep you informed.


Bernd

Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671


RE: how to correct stop a thread and avoid leaks

2011-06-07 Thread Bill Miller
If you want to work with threads in tomcat you need to know about the Tomcat
org.apache.catalina.LifecycleListener interface. If you implement the interface 
and register your
class within server.xml your class will be notified of Tomcat life cycle events 
(Start, Stop,
etc...). You can then do appropriate things when those events happen.

Here is an example method that is the only method in LifecycleListener:
public class TomcatServerLifecycleListener implements LifecycleListener
{
public void lifecycleEvent(LifecycleEvent event)
{
if(Lifecycle.STOP_EVENT.equals(event.getType()))
{
//Call a method on your Runnable that will trigger it 
to exit the Run()
method. 
// (or set a Boolean to stop looping, I've adjusted 
your code below too; how
you
// set the flag is up to you)
}
}
}
Here is the line to be added to Server.xml to register a class as a listener:


So if you created an object like I have above and gave it a static method that 
allows you to insert
an object that needs to be notified of a shutdown event, then you will be able 
to control your
threads properly. You could even have your Runnable implement the 
LifecycleListener directly and
have your registered object keep a list of objects that need to be notified. 

There are dozens of ways to do this, pick one that works for you. Don't forget 
to investigate all of
the LifecycleEvent types in case you have use for the other options.

Bill

-Original Message-
From: alexis [mailto:alz...@gmail.com] 
Sent: June 6, 2011 8:10 PM
To: Tomcat Users List
Subject: how to correct stop a thread and avoid leaks

Hello, im running an app that has a class that implements 
ServletContextListener (Server class), on
that class i create a thread of Listener (that implements Runnable)

Listener starts a ServerSocket that listen on a port, and in a periodically 
manner, this app
receives a string, parses the string and stores the data inside a database. 
Flow is

1. receive a tcp connection (syn , syn+ack, ack)
2. receives lines over and over again inside this connections (each line is 
parsed and stored)

Below is the code of Listener class and how i call this class from Server 
class. What im facing is
im not able to stop Listener in a correct way. doing Listener.interrupt() does 
nothing. How can i
safely stop Listener thread


Thanks in advance


--
 //initalize listener
Listener = new Thread((Runnable) new
Listener(Integer.parseInt(prop.getProperty("listenonport";
if (!Listener.isAlive()) {
Listener.setName("ListenerThread");
Listener.setDaemon(true);
Listener.start();
}

-- 

package lesi.p1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;
import org.apache.log4j.Logger;

/**
 *
 * @author alz
 */
public class Listener implements Runnable {

private static org.apache.log4j.Logger log = 
Logger.getLogger(Listener.class);
private Socket clientSocket = null;
private ServerSocket serverSocket = null;
private int listenport = 0;
Thread CDRThread = null;

public Listener(int port) {
this.listenport = port;
}

@Override
public void run() {
try {
log.debug("About to listen on port: " + this.listenport);
serverSocket = new ServerSocket(this.listenport);

while (true) {
clientSocket = serverSocket.accept();
CDRThread = new Thread((Runnable) new CDRExec(clientSocket));
if (!CDRThread.isAlive()) {
CDRThread.setName("CDRThread");
CDRThread.setDaemon(true);
CDRThread.start();
}
}
} catch (IOException e) {

log.error("Catcher IOException: ", e);
} finally {
try {
log.info("Closing socket");
serverSocket.close();
} catch (IOException ex) {
log.error("Error trying to close port", ex);
}

if (CDRThread.isAlive()) {
log.info("Stopping CDRExec Thread");
CDRThread.interrupt();
}

}
}

class CDRExec implements Runnable {

public Boolean keepRunning = true;  // !! Shutdown flag! Set to 
false to exit loop
private Socket client = null;

public CDRExec(Socket client) {
this.client = client;
}

@Override
public void run() {
String inputLine = "";
StringBuilder sb = new StringBuilder();
Parser p = null;
BufferedReader in = null;

log.debug("Thread: " + Thread.currentThread().getId() + " name: " +
Thread.currentThread().getName());

try {
   

Multiple hosts pointing to different index files for one webapp

2011-06-07 Thread Mike Kennedy
I have been asked to launch a new webapp in Tomcat via different URLs, with
each URL pointing to a different launch page for the same app. For example:

portal1.com --> webapps/portalapp/portal1_index.jsp

portal2.com --> webapps/portalapp/portal2_index.jsp

 

I don't know if this should be done by the app itself, or if there is a
simple/complicated way to do it in Tomcat. I have researched through the
O'Reilley Tomcat book, tomcat docs, and various forums, and have not found
any config documentation to do it. A welcome-file specification in the app's
web.xml doesn't seem to cut it, and I have tried to rig an Apache proxy but
still cannot get the right index file to be called first. Likely I just do
not fully understand some settings in Tomcat or Apache to do this right
(perhaps 'appBase' under  or 'path' and 'docBase' under  can
be used), hence I come to you. Any assistance is much appreciated. I hope my
description is clear; if there is more info/config stuff I can post let me
know.

 

I am running Tomcat 5.5.23 and Apache 2.2.3 on Redhat Linux 5, with
jdk-1.6.0_07-fcs. Here are some relevant sections of my configs that get me
as close as I have come. I can launch the app by domain URL, but not without
still specifying the index page in the URL (http://portal1.com/ won't work,
have to use http://portal1.com/portal1_index.jsp).

 

from server.xml:



   

  

 

from httpd.conf:

 



DocumentRoot /var/www/html/portal1

ServerName portal1.com



allow from all

Options -Indexes



DirectoryIndex portal1_index.jsp

# Added to proxy for Tomcat

ProxyRequests Off



Order deny,allow

Allow from all



ProxyPass / http://portal1.oucpm.org:8080/

ProxyPassReverse / http://portal1.oucpm.org:8080/

ProxyVia On

ProxyPreserveHost Off



 

Again, many thanks for your consideration.

-Mike

 



Re: Error in Tomcat 6.0 log4j documentation

2011-06-07 Thread Konstantin Kolinko
2011/6/7 Mark Thomas :
> On 07/06/2011 11:52, Remon Sadikni wrote:
>> Hi Mark,
>>
>> for me log4j only works with this additional line per appender:
>>
>> log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout
>
> Where exactly? That line is already present in the docs. Or are you
> looking at an older version?

That line was already added by Christopher several days ago (revs
1129869, 1129863), as a response for the previous report of the same
issue.

It is not published yet, so see the ci link (the docs published by
buildbot) that Mark mentions below.

>
> The latest version in svn is this:
> http://ci.apache.org/projects/tomcat/tomcat6/docs/logging.html#Using_Log4j
>

BTW,
Log4J docs and out 5.5 docs start "conversionPattern" with an uppercase "C".

http://tomcat.apache.org/tomcat-5.5-doc/logging.html
http://logging.apache.org/log4j/1.2/manual.html

I expect it to work either way though, as Log4J normalizes the
property name before applying (o.a.log4j.config.PropertySetter calls
Introspector.decapitalize())


Best regards,
Konstantin Kolinko

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



Re: Error in Tomcat 6.0 log4j documentation

2011-06-07 Thread Mark Thomas
On 07/06/2011 11:52, Remon Sadikni wrote:
> Hi Mark,
> 
> for me log4j only works with this additional line per appender:
> 
> log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout

Where exactly? That line is already present in the docs. Or are you
looking at an older version?

The latest version in svn is this:
http://ci.apache.org/projects/tomcat/tomcat6/docs/logging.html#Using_Log4j

Is the whitespace an issue?

Mark

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



Re: error-page for http 500 error code does not work

2011-06-07 Thread Kevin Claver
Chris,  


Through further investigation, I now believe the JSF framework I'm using is 
absorbing the error, and the framework's error page is what is throwing the 500 
error.  I wonder if the 500 error thrown by the framework's error page should 
fall through to the custom error page servlet I've created?


The JSF framework is the Sun Visual Web Pack that is no longer supported on the 
Oracle Netbeans IDE.  I posted on the forum for Netbeans in the hopes that 
someone can tell me how to disable the default exception handler for the Visual 
Web Pack.


Thanks!


-


Kevin,

On 6/3/2011 9:43 AM, Kevin Claver wrote:
> When the custom error servlet fails to display, I get the stock tomcat http 
> 500 error page.
> 
> If I look at the access log, I see the 500 error:
> 
> 192.168.xxx.xxx - - [02/Jun/2011:13:53:14 -0600] "POST 
> /HMAApp/faces/main/TaskSearchTab.jsp HTTP/1.0" 500 1000

So, you are sure the error happens in the requested JSP and not in the
error page itself?

If the error page suffers an error... it's all over.

- -chris


Re: Error in Tomcat 6.0 log4j documentation

2011-06-07 Thread Remon Sadikni

Hi Mark,

for me log4j only works with this additional line per appender:

log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout

Thanks,
Remon


On 06/06/2011 07:09 PM, Mark Thomas wrote:

On 06/06/2011 15:25, Remon Sadikni wrote:

Dear Tomcat-Developers and Users,

I think there is an error in the Tomcat 6.0 logging documentation with
log4j:
http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Using_Log4j

For every appender there is a layout missing and in front of
conversionPattern there is missing "layout.".  So for example for the
appender CATALINA the right syntax would be:

log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CATALINA.file=${catalina.base}/logs/catalina.
log4j.appender.CATALINA.encoding=UTF-8
# Roll-over the log once per day
log4j.appender.CATALINA.DatePattern='.'-MM-dd'.log'
log4j.appender.CATALINA.layout.conversionPattern = %d [%t] %-5p %c- %m%n
log4j.appender.CATALINA.layout=org.apache.log4j.PatternLayout
log4j.appender.CATALINA.append=true

The same errors appear in the Tomcat 7.0 documentation.

Thanks for the report.

I could see the missing "layout." but no missing layouts for the appenders.

The fixes will be in 7.0.16 and 6.0.33.

Mark



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




--
+++
 Dipl. Inf. Remon Sadikni
 Scientific Programmer

 University of Hamburg / KlimaCampus Hamburg
 Center for Integrated Climate System Analysis and Prediction - CliSAP
 Grindelberg 5 / D-20144 Hamburg / Germany

 phone: +49-40-42838-7581
 email: remon.sadi...@zmaw.de
+++


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



Re: Asynchronous servlets + Tomcat + mod_jk

2011-06-07 Thread baran topal
Sent from my iPhone

On 6 jun 2011, at 22:50, André Warnier  wrote:

> Seth Lenzi wrote:
>> Anyone here have any experience with asynchronous servlets under a Tomcat 
>> that's linked to Apache via mod_jk?  I have an asynchronous servlet that's 
>> working nicely when accessed directly from Tomcat, but, when I access it by 
>> going through Apache and mod_jk the ServletRequest.startAsync() function 
>> call throws an IllegalStateException saying the feature is not supported.
> You do not give a clue about which version of Tomcat you are using, but this 
> may provide an explanation : http://tomcat.apache.org/tomcat-7.0-doc/aio.html
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

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



Re: Tomcat 6 Clustering vs. Tomcat 5.5 clustering

2011-06-07 Thread Martin Knoblauch
Hi,

 I almost forgot about this one :-)

- Original Message 

> From: Filip Hanik - Dev Lists 
> To: Tomcat Users List 
> Sent: Tue, June 7, 2011 1:07:20 AM
> Subject: Re: Tomcat 6 Clustering vs. Tomcat 5.5 clustering
> 
> On 5/23/2011 6:50 AM, Martin Knoblauch wrote:
> > Hi,
> >
> > while  moving an application from Tomcat 5.5 to Tomcat 6 I found some
> >  differences in clustering, that I could not resolve myself:
> >
> > e.  G. What happened to replicationMode, ackTimeout waitForAck? In TC 5.5 I 
> >  
>had:
> >
> >>  className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
> >replicationMode="fastasyncqueue"
> >   ackTimeout="15000"
> >waitForAck="true"/>
> channelSendOptions
> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html
> 

 I know those pages. They are not that much helpful (IMO) in the transition. 
What I am looking for is a kind of side-by-side comparison of what changed 
between 5.5 and 6.0. Any pointers are welcome.

> 
> >  Are they still available with
> >  "org.apache.catalina.tribes.transport.ReplicationTransmitter"?
> >
> >  Also, can I assume the "bindAddress" from
> >  "org.apache.catalina.cluster.mcast.McastService" is the same as "bind"  
from
> >  "org.apache.catalina.tribes.membership.McastService"?
> 
> yes
> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-membership.html
> 

 OK, I figured that out.

Cheers
Martin


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



RE: Query regarding an issue been faced in TOMCAT

2011-06-07 Thread Srilalitha Bijumalla
Mikolaj Rydzewski wrote:
> On Fri, 3 Jun 2011 17:58:06 +0530, Srilalitha Bijumalla wrote:
>
>> java.io.FileNotFoundException:
>> /global/backup/apache-tomcat-5.5.23/logs/catalina.2011-05-31.log (No
>> space left on device)
>
> Either there's no space left or there are insufficient permissions.
> Maybe tomcat is unable to create logfile, but incorrectly recognizes it
> as a no space left error.
> Anyway, migration to new tomcat version is recommended.
>

Anyway, I find this /global/backup/ directory name quite suspicious.
And the catalina.out contents show that the problem is not only with the Tomcat 
"logs"
directory, but also with the "conf" directory etc..

If anything, it sounds like you are trying to start Tomcat from some backup 
directory,
instead of from the directory in which it was first installed.
And maybe indeed that brings a whole lot of permission problems (or maybe that 
location is
read-only, or whatever..).

Can you tell us what it is precisely, that you are trying to achieve ?
Has this same Tomcat been running from this same directory before ?


Srilalitha--> This issue got solved when we deleted some folders from a 
directory which was mapped to tomcat in conf.

But we are still not able to analyse why this issue has occurred, Disk space 
was available and permissions were also provided and tomcat was not started 
from backup directory

Need to find how the folders linked in conf could create a low disk space error


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


The information contained in this e-mail message and any attachments is 
confidential, and is intended only for the use of the party to whom it is 
addressed. This message and any attachments herein are subject to scanning and 
may be monitored at any time for review.  If you are not the above-named 
intended recipient, you are hereby notified that any dissemination, copying or 
disclosure of this communication is strictly prohibited. If you have received 
this communication in error, please notify XIUS immediately by reply to this 
message or by telephoning (781) 904-5000, and destroy this message and its 
attachments, without making any copy or distribution.

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



Re: Class.forName doesn't find classes located in WEB-INF/lib

2011-06-07 Thread Mark Thomas
On 06/06/2011 23:35, Clemens Eisserer wrote:
> Hi Martin,
> 
>> 3)webapp (everything found in WEB-INF/lib and WEB-INF/classes)
>>
>> you are using system classloader to loaf WEB-INF/lib jar
>> use the webapp classloader
> 
> So according to this, the servlet as well as the classes from
> WEB-INF/lib are loaded with the same classloader?
> What I did in the servlet was basically: this.getClass().forName("Notepad");
> 
> I've now changed the code to (where this refers to the Servlet):
> ClassLoader loader = this.getClass().getClassLoader();
> Class cls = loader.loadClass(className);
> 
> However loader in this case is null, any idea what is going on?

http://marc.info/?t=10426557623&r=1&w=2
(which is linked from the Class Not Found FAQ which I'm guessing you
didn't read).

Mark

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