Tomcat server hanging if I cancel (from Browser) loading records from DB

2006-10-16 Thread Sandipap03

Hi All,

My Tomcat server is hanging if I click cancel icon of browser while loading
records from Databse.

My scenorio is,

I am loading records from Databse on menu click.
If I click on menu & immediately if I stop loading records(by clicking
browser cancel icon).My tomcat server then gets hang.
But there is no error in tomcat console.

means then further I am not able to do any action in my application.

I am using Java Persistence Framework,Java 1.5,Tomcat 5.5
Also I am using toplink-essentials-agent.jar,toplink-essentials.jar

My Persistence.xml is,



oracle.toplink.essentials.PersistenceProvider

com.sst.eci.entity.MyClass
...
...


Any suggesions ? Is there any tomcat setting needed ?
Or this is my code problem ?

Thanks in advance
Sandip 
-- 
View this message in context: 
http://www.nabble.com/Tomcat-server-hanging-if-I-cancel-%28from-Browser%29-loading-records-from-DB-tf2451074.html#a6831535
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Problems with Tomcat and JSF

2006-10-16 Thread Neil B. Cohen
I am just starting to use JSF and I am having a few problems. I'll
describe the problems below - if anyone can help me solve them, I'd be
most grateful. However, one suggestion I got from another forum was to
upgrade to JSF version 1.2. But I've been reading that that requires the
latest version of servlets, as well as the most recent version of Java
J2EE and Tomcat doesn't appear to support that. I'm running Netbeans
5.5rc2 with Java 1.5 and the 5.0 release of Tomcat.

So my first question for this list is simply - does Tomcat support JSF
1.2, and if so, what else do I need to install?

For the record, my JSF problems are the following:

1) Checkboxes. I can create a JCheckbox on the screen, but if I click
the checkbox and submit the form, the resulting html code has the word
'checked' in it. This gets flagged as invalid html. I suspect the entry
should be something like 'checked=checked' or 'checked=yes' or something
like that - I have to look up the exact wording. The suggestion I got
was to upgrade to JSF 1.2 to fix that, but as I said, Tomcat doesn't
seem to support v1.2... Help!?

2) I can't seem to get commandlinks to work. I'm less concerned about
this one because for now I can use command buttons and they seem to be
working fine...

I'll be happy to discuss my JSF problems offline if anyone has any
suggestions - I know that is not directly Tomcat related

Thanks in advance,

nbc

NAME:   Neil B. Cohen (Verisign Inc.)
PHONE:  703-948-4471
DOMAIN: [EMAIL PROTECTED]
*
* Murphy's Philosophy: Smile - tomorrow will be worse...*
*   *
* O'Tooles Commentary: Murphy was an optimist!  *
*



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



Re: Problems with Tomcat and JSF

2006-10-16 Thread tony81chi
you need to install jsf and jstl refrence files reference files.
 
When downloaded place these in your common\lib directory.
 
Here are the 8 you need from these the reference directories
 
from jstl:
 
 standard.jar and jstl.jar
 
from jsf:common-collectors-collection.jar
commons-digester.jar
common-beanutils.jar
commons-loggin.jar
   jsf-api.jar
jsf-impl.jar
 
 
Hope this helps.


RE: wrong StandardContext

2006-10-16 Thread Caldarale, Charles R
> From: Oleg [mailto:[EMAIL PROTECTED] 
> Subject: Re: wrong StandardContext
> 
> 

The trailing slash on the appBase declarations shouldn't cause problems,
but it's not needed.

>  CATALINA_HOME\conf\Catalina\domain1.com\ROOT.xml :
> 
> 
> CATALINA_HOME\conf\Catalina\localhost\ROOT.xml :
> 

The path attribute must not be specified when the  element is
not in server.xml.

Since deployOnStartup is true for each host, all apps under E:\Webspace
will be deployed to each host during Tomcat initialization; is that what
you intended?  What's actually in E:\Webspace now?

Since you still have webApp declared as existing in E:\Webspace, it may
be getting picked up by each host, even if it doesn't really exist.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Manager

2006-10-16 Thread Mathieu Larchet

Hello,

Is there any way to manage through Tomcat Manager applications deployed 
in different Virtual Hosts ?
At this time, I have to copy and deploy the Tomcat Manager webapp in 
every virtual host.


Thanks

--
Mathieu Larchet
Centre de Ressources Informatiques
Université Nancy 2
[EMAIL PROTECTED]
03-54-00-11-07
http://www.univ-nancy2.fr/ANNUAIRE/PERS/detail_pres.php?uid=mlarchet


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



RE: Tomcat Manager

2006-10-16 Thread Caldarale, Charles R
> From: Mathieu Larchet [mailto:[EMAIL PROTECTED] 
> Subject: Tomcat Manager
> 
> Is there any way to manage through Tomcat Manager 
> applications deployed in different Virtual Hosts ?

All you should have to do is place manager.xml in each
conf/Catalina/[host] directory.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Manager

2006-10-16 Thread Mathieu Larchet
Ok but that's already what I'm doing, I don't want to access different 
managers, I want to access all my applications in a single one, even if 
there are in different virtual hosts.


Caldarale, Charles R a écrit :
From: Mathieu Larchet [mailto:[EMAIL PROTECTED] 
Subject: Tomcat Manager


Is there any way to manage through Tomcat Manager 
applications deployed in different Virtual Hosts ?



All you should have to do is place manager.xml in each
conf/Catalina/[host] directory.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
Mathieu Larchet
Centre de Ressources Informatiques
Université Nancy 2
[EMAIL PROTECTED]
03-54-00-11-07
http://www.univ-nancy2.fr/ANNUAIRE/PERS/detail_pres.php?uid=mlarchet



nsapi_redirect with sunone webserver 6.1 on solaris

2006-10-16 Thread Scot Russell
Has anyone successfully used the Tomcat connector nsapi_redirect 1.2.19(or 
similar) to connect a SunOne Web Server 6.1 on Solaris 9 with JBoss 4.0.2?  
If so can you provide me with the steps and if possible the file I will 
need, or how to compile to get the file?  Thanks.




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



Connecting Apache 2.2 to Tomcat 5.0 using mod_jk

2006-10-16 Thread Barak Ben-Ari
Hi,
 
we trying to connect Apache 2.2 to Tomcat 5.0 using mod_jk on Linuc
(Fedora Core 5).
When trying to use the SO binaries from the apache site I got the
"module is grabled" error message.
>From there we tried to build mod_jk on our machines but could not find
any of the commands used in buildconf shell scirpt.
We tried to use mod_proxy_ajp instead but, again, failed to get the
proper binaries.
 
Can anyone please help we get (or build) either the proper mod_jk or
mod_proxy_ajp modules?
In addition, can anyone please put down in simple words ther main
differences between the two. I saw that mod_proxy is way easier to
configer but has some security holes. Can anyone tell me what these
holes are?
 
Thanks,
Barak


Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Peter Olin

Hi!

After a day or so a fully functional setup (IIS, AJP Tomcat) doesn't work
any longer.

Tomcat is still running, and surfing to the Tomcat port works fine, but
going through IIS no longer works. (See log excerpt below)

I've been searching the archives and Googling all over but can't find any
resolution to this problem I have.

We're using the following:

  - Tomcat 5.0.28
  - ajk 2.19
  - IIS

Configuration has been made according to instructions at:
http://tomcat.apache.org/connectors-doc/howto/iis.html and as I said,
everything works fine. For a while.

This is what the log says:


[Fri Oct 13 13:08:09 2006] [5788:13544] [error] jk_ajp_common.c (947):
(ajp15w) can't receive the response message from tomcat, network problems or
tomcat is down (xx.xx.xx.xx:8009), err=-54
[Fri Oct 13 13:08:09 2006] [5788:13544] [error] jk_ajp_common.c (1536):
(ajp15w) Tomcat is down or refused connection. No response has been sent to
the client (yet)
[Fri Oct 13 13:08:09 2006] [5788:13544] [info]  jk_ajp_common.c (1828):
(ajp15w) receiving from tomcat failed, recoverable operation attempt=0
[Fri Oct 13 13:08:09 2006] [5788:13544] [info]  jk_ajp_common.c (1867):
(ajp15w) sending request to tomcat failed,  recoverable operation attempt=1


Any clues on how to resolve this would be very much appreciated.

Kind regards,

--
Peter Olin


Problem with filter and calling Perl-script with Tomcat 5.5.20

2006-10-16 Thread Gunnar.Bostrom
Hi,

I've a problem with the new 5.5.20 Tomcat version.
I think this has to do with this bug fix
http://issues.apache.org/bugzilla/show_bug.cgi?id=37285.

The problem is that I have a filter that adds a parameter before the
CGI-filter calling out to a Perl-script.

This code worked with Tomcat 5.5.17 and works with 5.5.20 if the request
is a GET but not a POST.

This is the relevant code:

HttpServletRequest httpServletRequest = (HttpServletRequest) request; 
HashMap parameters = new HashMap(
   (HashMap) httpServletRequest.getParameterMap());
fillUserInfo(parameters);
httpServletRequest = generateWrapper(httpServletRequest, parameters);
chain.doFilter(httpServletRequest, response);


Can you advise me what to do?

Regards
Gunnar

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



RE: Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Sean Overby
Hi,

We to have been having major issues with IIS --> apj ---> Tomcat, once the
connector dies the only thing that fixes it for us is restarting the IIS
admin service. If your using the 1.2.15 or higher connector you might want
to try upping the connection pool setting in the connector config to match
the size of your thread pool on the Tomcat side. Good luck. 


-Original Message-
From: Peter Olin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 16, 2006 11:06 AM
To: users@tomcat.apache.org
Subject: Tomcat, ajp, IIS - loosing connection


Hi!

After a day or so a fully functional setup (IIS, AJP Tomcat) doesn't work
any longer.

Tomcat is still running, and surfing to the Tomcat port works fine, but
going through IIS no longer works. (See log excerpt below)

I've been searching the archives and Googling all over but can't find any
resolution to this problem I have.

We're using the following:

   - Tomcat 5.0.28
   - ajk 2.19
   - IIS

Configuration has been made according to instructions at:
http://tomcat.apache.org/connectors-doc/howto/iis.html and as I said,
everything works fine. For a while.

This is what the log says:


[Fri Oct 13 13:08:09 2006] [5788:13544] [error] jk_ajp_common.c (947):
(ajp15w) can't receive the response message from tomcat, network problems or
tomcat is down (xx.xx.xx.xx:8009), err=-54 [Fri Oct 13 13:08:09 2006]
[5788:13544] [error] jk_ajp_common.c (1536):
(ajp15w) Tomcat is down or refused connection. No response has been sent to
the client (yet) [Fri Oct 13 13:08:09 2006] [5788:13544] [info]
jk_ajp_common.c (1828):
(ajp15w) receiving from tomcat failed, recoverable operation attempt=0 [Fri
Oct 13 13:08:09 2006] [5788:13544] [info]  jk_ajp_common.c (1867):
(ajp15w) sending request to tomcat failed,  recoverable operation attempt=1


Any clues on how to resolve this would be very much appreciated.

Kind regards,

-- 
Peter Olin


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



Session replication

2006-10-16 Thread Marko Zeisig
Hi there,

i have a general question regarding session replication in tomcat 5.5, i am new 
to this topic. What i want to setup is a system with an hw-loadbalancer (or 
maybe an apache with mod_jk and worker.loadbalancer.balanced_workers) an 2 
servers with one tomcat on each server. the application on both servers works 
with sessions, so i want session replication between those 2 tomcats. What 
confuses me: it is said in many documentations regarding the topic tomcat 
clustering/session replication  that i have to configure my lb with sticky 
sessions ?! That is exactly not want i want, what is the use of session 
replication if i configure my lb with sticky sessions in an setup described 
above. It makes sense for failover scenarios, but not when i want to 
loadbalance two tomcats with an applikation with sessions. So is that possible 
at all ?

regards,
sj
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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



Re: Apache Tomcat\connection problem\Windows XP

2006-10-16 Thread Christopher Schultz
Frank,

> | I went to the Apache.org website and downloaded and installed the
> | Windows executable under Core distributions, i.e.,
> | 
> | Core:
> |   a.. zip (pgp, md5)
> |   b.. tar.gz (pgp, md5)
> |   c.. Windows Executable (pgp, md5)

Which of these did you install? Typically, you only choose one.

> | The install went fine, but when I try to start Apache Tomcat, it just
> | gives me the standard error message, "unable to connect."
> | 
> | This happens even after I start the Apache service known as
> | "Configure Tomcat" within the Apache Tomcat folder (or directory).

Generally, Windows services are started using the service manager.
Right-click on My Computer and choose "Manage". Then, go to "Services
and Applications", then "Services". Try starting Apache Tomcat from there.

> | I'm guessing I need to install one or two other important files or
> | apps,
> | as well as do some configuring, similar to setting JAVA_HOME, and
> | executing (./ in Unix) the startup file (or .bat) in Windows.

Just to make sure: you have installed Java, right? I think that you'll
need to install it using the Windows "installer" instead of just
downloading a ZIP file or something like that. Otherwise, the registry
won't be set up correctly and Tomcat won't be able to find your JRE/JDK.
(I'm not exactly sure how the Tomcat service determines which JDK to
use, but I assume that it uses whatever Windows has configured in the
registry).

> | Any information is appreciated.  Thanks.

Your problem it likely to be your configured connectors, actually. When
Tomcat starts up, you can startup any number of "connectors" that will
handle requests. For example, you can start up the HTTP connector which
will accept regular HTTP requests on a certain port. You can do the same
thing with AJP13 if you want to connect to Tomcat through Apache httpd.

Check $TOMCAT_HOME/conf/server.xml to see what connectors have been
configured. Just search for "

signature.asc
Description: OpenPGP digital signature


Re: Please Help: Application Hang. Possible Deadlock

2006-10-16 Thread Christopher Schultz
Giesen,

> I haven't reproduced this issue on my dev system.  Tomcat Manager
> continues to respond correctly during this hang so Tomcat itself is
> correctly configured and still functioning.

This suggests that Tomcat and the VM are okay, but your webapp is hosed.
Do you use JDBC connections in your application? If you do, do you pool
those connections? If you have exhausted your connection pool, your
threads will wait forever for a connection (depending on your CP settings).

Chuck's suggestion to obtain a thread dump will be very helpful in
determining what's going on. Look through your thread dump for
Object.wait() before just dumping the entire thing to the list.

-chris




signature.asc
Description: OpenPGP digital signature


Re: HSE_REQ_SEND_RESPONSE_HEADER failed

2006-10-16 Thread Christopher Schultz
Brandon,

> We are getting the following entries in the logs frequently:
> 
> [Sun Oct 15 09:31:35 2006] [6108:0516] [error]
> ajp_connection_tcp_get_message::j
> k_ajp_common.c (947): (worker2) can't receive the response message from
> tomcat,
> network problems or tomcat is down (172.17.96.97:9080), err=-60

Is this intermittent, or does your AJP13 connection not work at all? Did
it suddenly start happening, or has it been happening more and more over
time?

-chris




signature.asc
Description: OpenPGP digital signature


Re: Tomcat 3.3.1a AIX 5.3 and IBM JDK 1.3.1 - Tomcat Hangs

2006-10-16 Thread Christopher Schultz
Thube,

> We have a problem in our production system. Following is our environment.
> 
> Tomcat 3.3.1a
> AIX 5.3
> IBM JDK 1.3.1
> Apache/1.3.28
> 
> This system was working fine previously without any problems for 3 years
> the
> only change that we did was changed from AIX 5.1 ML 4 to AIX 5.3 ML5 and
> below problems started.

This may be completely unrelated, but I have a friend working on AIX
w/IBM's JDK and they were having a very strange problem reading files
over 2GB. I know it sounds totally unrelated, but you never know.

They upgraded to IBM's 64-bit JVM and it fixed their bug (IBM's VM on
AIX apparently has some limitations such as the sizes of files it can read).

Since you just upgraded the OS, it might have triggered this issue. Are
you using a 64-bit architecture? If so, are you using a 64-bit or 32-bit
JVM?

-chris




signature.asc
Description: OpenPGP digital signature


Re: Tomcat server hanging if I cancel (from Browser) loading records from DB

2006-10-16 Thread Christopher Schultz
Sandip,

> My Tomcat server is hanging if I click cancel icon of browser while
> loading records from Databse.

Define "hanging"... it won't respond to any more requests? Can you shut
it down using shutdown.sh/shutdown.bat or by stopping the Windows service?

[snip]

> Any suggesions ? Is there any tomcat setting needed ? Or this is my
> code problem ?

Is it possible that you are getting an exception when writing back to
the HTTP Response, and it is causing your JDBC connection to remain
open. In that case, subsequent requests might not be able to get a
connection and wait forever.

Just a thought,
-chris




signature.asc
Description: OpenPGP digital signature


Re: Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Mladen Turk

Peter Olin wrote:

This is what the log says:

[Fri Oct 13 13:08:09 2006] [5788:13544] [error] jk_ajp_common.c (947):
(ajp15w) can't receive the response message from tomcat, network 
problems or

tomcat is down (xx.xx.xx.xx:8009), err=-54



This means that Tomcat has closed the AJP connection in the
middle of response.
There must be something in the Tomcat log explaining why
did this happen.

Regards,
Mladen.

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



Re: HSE_REQ_SEND_RESPONSE_HEADER failed

2006-10-16 Thread Mladen Turk

Brandon Knitter wrote:

We are getting the following entries in the logs frequently:

[Sun Oct 15 09:31:35 2006] [6108:0516] [error]
ajp_connection_tcp_get_message::j
k_ajp_common.c (947): (worker2) can't receive the response message from
tomcat,
network problems or tomcat is down (172.17.96.97:9080), err=-60


This means that the reading from Tomcat was timed out.
Either increase the socket_timeout (although 120 sec should
be enough, or investigate why your application didn't respond
within 2 minutes.

Regards,
Mladen.

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



Re: Connecting Apache 2.2 to Tomcat 5.0 using mod_jk

2006-10-16 Thread Christopher Schultz
Barak,

> we trying to connect Apache 2.2 to Tomcat 5.0 using mod_jk on [Linux]
> (Fedora Core 5).
> When trying to use the SO binaries from the apache site I got the
> "module is grabled" error message.

#1: Apache site does not host Linux binaries for mod_jk (IIRC)
#2: "Module is garbled" ---> apache version mismatch.

You probably have a module compiled for Apache 2.0.x and you are using
Apache 2.2.x. Just compile the module yourself. It's shockingly easy.

> From there we tried to build mod_jk on our machines but could not find
> any of the commands used in buildconf shell script.

You shouldn't have to play around with buildconf. From the BUILD.txt
file that ships with tomcat-connectors-1.2.18-src:

> For the impatient Apache admins:
> $> cd native
> $> ./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)
> $> make
> $> su -c 'make install'

Did you try that? If it didn't work, what error did you get? Most Linux
systems ought to be able to do this right out of the box. About all you
need is gcc and make (okay, and maybe autoconf).

> We tried to use mod_proxy_ajp instead but, again, failed to get the
> proper binaries.

mod_proxy(_ajp) comes with Apache. If you compiled Apache yourself, then
you should just be able to re-compile it with mod_proxy support turned
on (see ./configure --help in the Apache distro). If you got a binary
distro (likely since you are using FC5) then you probably already have
mod_proxy.do lying around somewhere. All you should have to do is enable it.

FWIW, I have had horrible luck with mod_proxy_ajp. It's great for
super-simple configurations, but fronting Tomcat with Apache on any
reasonably-complex webapp setup pretty much requires mod_jk. I find the
configuration options mroe straightforward and well-documented. The last
time I checked (maybe 6 months ago), documentation for mod_proxy_ajp was
pretty much non-existent. I had to make educated guesses about how to
actually set it up to talk to Tomcat. It worked, but we ended up having
to do some pretty nasty mod_rewrite configs to make it half work, and
even then it acted funny.

> Can anyone please help we get (or build) either the proper mod_jk or
> mod_proxy_ajp modules?

To recap:

1. mod_jk.so isn't available in binary form. Don't trust anyone who
offers it to you ;) Just compile it yourself.

2. mod_proxy comes with Apache. Look around for it.

> In addition, can anyone please put down in simple words ther main
> differences between the two. I saw that mod_proxy is way easier to
> configer but has some security holes. Can anyone tell me what these
> holes are?

I am unaware of any security holes... someone else will have to comment
on that. See above for my complaints about mod_proxy. MY understanding
is that mod_proxy_ajp grew out of all the bitter complaints about how
hard getting mod_jk were for some users. I don't understand their
complaints, since mod_jk has compiled and worked like a dream for me
every single time since many many years ago. I believe that mod_jk has
more robust configuration options (and it's older, so I would guess more
stable and well-tested).

-chris




signature.asc
Description: OpenPGP digital signature


Re: Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Christopher Schultz
Peter,

> After a day or so a fully functional setup (IIS, AJP Tomcat) doesn't work
> any longer.
> 
> Tomcat is still running, and surfing to the Tomcat port works fine, but
> going through IIS no longer works. (See log excerpt below)
>
> We're using the following:
> 
>   - Tomcat 5.0.28
>   - ajk 2.19
>   - IIS

Is everything on a single host, or do you have ISS running on a
different machine?

If they are separated, some firewall software and hardware will kill
connections that have not been used for a certain amount of time (often
a few hours). If your AJP13 connection is dying overnight when nobody is
using it, perhaps you have a router or firewall configured to close
inactive connections.

-chris



signature.asc
Description: OpenPGP digital signature


new tomcat installation failes to start

2006-10-16 Thread Assaf Flatto

hello


i've just installed a tomcat on a clean OS ( MDK 2007) .

When i try and start the tomcat service i get the following error

Created MBeanServer with ID: 1d05c81:10e51d8bab4:-8000:www01.pjoker.com:1
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.NoClassDefFoundError: org/xml/sax/ext/Attributes2
at org.apache.xerces.parsers.AbstractSAXParser.(Unknown 
Source)

at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source)
at 
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at 
org.apache.tomcat.util.digester.Digester.getParser(Digester.java:691)
at 
org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:899)
at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)

at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
... 6 more


i googled and looked in archives but couldn't find the source of this 
problem .

packages installed are :
tomcat5-jasper-5.5.17-3.1.2mdv2007.0
tomcat5-5.5.17-3.1.2mdv2007.0
tomcat5-webapps-5.5.17-3.1.2mdv2007.0
tomcat5-servlet-2.4-api-5.5.17-3.1.2mdv2007.0
tomcat5-jsp-2.0-api-5.5.17-3.1.2mdv2007.0
tomcat5-server-lib-5.5.17-3.1.2mdv2007.0
tomcat5-common-lib-5.5.17-3.1.2mdv2007.0
jakarta-commons-fileupload-1.0-5.1mdv2007.0
jakarta-commons-daemon-1.0.1-4.1mdv2007.0
jakarta-oro-2.0.8-2.3mdv2007.0
jakarta-commons-logging-1.1-3.2mdv2007.0
jakarta-commons-beanutils-1.7.0-4.2mdv2007.0
jakarta-commons-httpclient-3.0.1-1mdv2007.0
jakarta-commons-digester-1.7-4.1mdv2007.0
jakarta-commons-pool-1.3-2.1mdv2007.0
jakarta-commons-modeler-1.1-7.1mdv2007.0
jakarta-commons-launcher-1.1-1.1mdv2007.0
jakarta-taglibs-standard-1.1.2-2mdv2007.0
jakarta-commons-collections-3.2-1.1mdv2007.0
jakarta-commons-discovery-0.3-2.1mdv2007.0
jakarta-commons-el-1.0-6.2mdv2007.0
jakarta-commons-dbcp-1.2.1-5.1mdv2007.0
jakarta-commons-validator-1.3.0-1.1mdv2007.0


the java is pointing to :

update-alternatives --display java
java - status is auto.
 link currently points to /usr/lib/jvm/jre-1.4.2-sun/bin/java
/usr/lib/jvm/java-1.4.2-jamvm-1.4.2.0/jre/bin/java - priority 1420
 slave rmiregistry: 
/usr/lib/jvm/java-1.4.2-jamvm-1.4.2.0/jre/bin/rmiregistry

 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-jamvm
 slave jre: /usr/lib/jvm/jre-1.4.2-jamvm
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
 slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
 slave jre: /usr/lib/jvm/jre-1.4.2-gcj
 slave keytool: /usr/lib/jvm/jre-1.4.2-gcj/bin/keytool
/usr/lib/jvm/jre-1.4.2-sun/bin/java - priority 1423
 slave rmiregistry: /usr/lib/jvm/jre-1.4.2-sun/bin/rmiregistry
 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-sun
 slave jre: /usr/lib/jvm/jre-1.4.2-sun
 slave keytool: /usr/lib/jvm/jre-1.4.2-sun/bin/keytool
 slave klist.1: /usr/share/man/man1/klist-java-1.4.2-sun-compat.1
 slave policytool.1: /usr/share/man/man1/policytool-java-1.4.2-sun-compat.1
 slave rmid: /usr/lib/jvm/jre-1.4.2-sun/bin/rmid
 slave java.1: /usr/share/man/man1/java-java-1.4.2-sun-compat.1
 slave tnameserv.1: /usr/share/man/man1/tnameserv-java-1.4.2-sun-compat.1
 slave orbd.1: /usr/share/man/man1/orbd-java-1.4.2-sun-compat.1
 slave ktab.1: /usr/share/man/man1/ktab-java-1.4.2-sun-compat.1
 slave javaws: /usr/lib/jvm/jre-1.4.2-sun/javaws
 slave policytool: /usr/lib/jvm/jre-1.4.2-sun/bin/policytool
 slave orbd: /usr/lib/jvm/jre-1.4.2-sun/bin/orbd
 slave keytool.1: /usr/share/man/man1/keytool-java-1.4.2-sun-compat.1
 slave rmid.1: /usr/share/man/man1/rmid-java-1.4.2-sun-compat.1
 slave tnameserv: /usr/lib/jvm/jre-1.4.2-sun/bin/tnameserv
 slave servertool.1: /usr/share/man/man1/servertool-java-1.4.2-sun-compat.1
 slave kinit.1: /usr/share/man/man1/kinit-java-1.4.2-sun-compat.1
 slave javaws.1: /usr/share/man/man1/javaws-java-1.4.2-sun-compat.1
 slave servertool: /usr/lib/jvm/jre-1.4.2-sun/bin/servertool
 slave rmiregistry.1: 
/usr/share/man/man1/rmiregistry-java-1.4.2-sun-compat.1

Current `best' version is /usr/lib/jvm/jre-1.4.2-sun/bin/java.



anyone got an idea ?

thanks

Assaf


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubsc

Re: Problem with filter and calling Perl-script with Tomcat 5.5.20

2006-10-16 Thread Martin Gainty
Gunnar-

String AStringWhichHoldsPostedOrQSValue;
if(HttpServletRequest.getMethod()  ==  "POST")
{ //Post only
 AStringWhichHoldsPostedOrQSValue = HttpServletRequest.getParameter("whatever");
}
else
{ //Get Only..
 AStringWhichHoldsPostedOrQSValue =  HttpServletRequest.getQueryString();
}
It has been my experience that getParameter does NOT retrieve POSTed 
values when Method = 'Get')


M-

This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: <[EMAIL PROTECTED]>
To: 
Sent: Monday, October 16, 2006 11:09 AM
Subject: Problem with filter and calling Perl-script with Tomcat 5.5.20


Hi,

I've a problem with the new 5.5.20 Tomcat version.
I think this has to do with this bug fix
http://issues.apache.org/bugzilla/show_bug.cgi?id=37285.

The problem is that I have a filter that adds a parameter before the
CGI-filter calling out to a Perl-script.

This code worked with Tomcat 5.5.17 and works with 5.5.20 if the request
is a GET but not a POST.

This is the relevant code:

HttpServletRequest httpServletRequest = (HttpServletRequest) request; 
HashMap parameters = new HashMap(
   (HashMap) httpServletRequest.getParameterMap());
fillUserInfo(parameters);
httpServletRequest = generateWrapper(httpServletRequest, parameters);
chain.doFilter(httpServletRequest, response);


Can you advise me what to do?

Regards
Gunnar

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



Re: Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Martin Gainty
It appears as if your CGITimeout is too small..you can set it to a agreater 
value thru UI or command line
http://technet2.microsoft.com/WindowsServer/en/library/0465fd03-1e24-4a35-ad49-f8d9fd8b15521033.mspx?mfr=true

I have no idea what chris is talking about with his statement on ISS

Martin
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Christopher Schultz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, October 16, 2006 11:46 AM
Subject: Re: Tomcat, ajp, IIS - loosing connection



RE: new tomcat installation failes to start

2006-10-16 Thread Assaf Flatto

hello

found the problem and fixed it , but now i have another issue :
when i start it with the minimal server.xml it comes up fine , but wen i 
add my servr.xml :








  
  
  className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>


  
  







  

  

  
  








	


   keystorepass="changeit" 
keystoreFile="/etc/tomcat5/keystore"/>



   enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />













  
  

  


  

  
  

  

 	 connectionName="postgres" connectionPassword="" 
resourceName="UserDatabase" />






  


  
  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
  directory="logs" prefix="localhost_access_log."

 suffix=".txt" pattern="common" resolveHosts="false"/>

	crossContext="true">









className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"


managerClassName="org.apache.catalina.cluster.session.DeltaManager"
  expireSessionsOnShutdown="false"
   useDirtyFlag="true"
notifyListenersOnReplication="true">

mcastDropTime="3000"/> 
   

className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>

	 
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>

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

 












  



  





when i start the service , i get the following error

SEVERE: Exception handling NamingResources property change
javax.management.MBeanException: Cannot load ModelMBean class 
org.apache.catalina.mbeans.ContextResourceMBean nested exception
 is java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at 
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:409)
at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:248)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:403)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.processNamingResourcesPropertyChange(ServerLifecycleListener.jav

a:1315)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.propertyChange(ServerLifecycleListener.java:234)
at 
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:252)
at 
org.apache.catalina.deploy.NamingResources.addResource(NamingResources.java:274)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:898)
at 
org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:97)

at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)
at 
org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocumen

Help with Custom Analyzer

2006-10-16 Thread Ryan O'Hara

I have a few questions regarding writing a custom analyzer.

My situation is that I would like to use the StandardAnalyzer but  
with some data-specific rules.  I was wondering if there was a way of  
telling the StandardAnalyzer to treat a string of text, that would  
normally be tokenized into more than one token, as only one token  
(maybe by inserting quotes around the text).  For example, say the  
StandardAnalyzer normally splits the string of text  
[EMAIL PROTECTED] into 4 tokens, but I want it to split the  
string into only 1 token.  Could I accomplish this by surrounding the  
string with quotes or by using some other type of flag?


Another question I have is how do I modify the text being analyzed?   
From how I interpreted what I have read (which could easily be off),  
it looks like in order to accomplish what I have previously  
described, I am going to have to add some code to my custom  
analyzer's tokenStream method.  I see that tokenStream() has a Field  
and a Reader as parameters.  Would the way I go about adding rules be  
to edit the reader text?  If so, would manipulation of the text be  
easier if I were to convert the reader into a string?


Any help is greatly appreciated.  Thanks.

-Ryan

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



Re: wrong StandardContext

2006-10-16 Thread Oleg

On 10/16/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:

> From: Oleg [mailto:[EMAIL PROTECTED]
> Subject: Re: wrong StandardContext
>
> 

The trailing slash on the appBase declarations shouldn't cause problems,
but it's not needed.


Thank you, fixed.


> 

Yes, sorry, it is.


> CATALINA_HOME\conf\Catalina\domain1.com\ROOT.xml :
> 
>
> CATALINA_HOME\conf\Catalina\localhost\ROOT.xml :
> 

The path attribute must not be specified when the  element is
not in server.xml.


Ok, fixed as well.


Since deployOnStartup is true for each host, all apps under E:\Webspace
will be deployed to each host during Tomcat initialization; is that what
you intended?  What's actually in E:\Webspace now?


Webspace contains all applications, to domain1... domainN and webApp
are in Webspace on the same directory level


Since you still have webApp declared as existing in E:\Webspace, it may
be getting picked up by each host, even if it doesn't really exist.


That is exactly whats happening and I need to avoid that. I know
declare docBase for every application as absolute path,
docBase="E:/Webspace/domain1/ROOT" This seem to fix the problem and my
vrtual hosts do not try to load localhost webApp anymore. Is this the
right way to fix the problem?


 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: Connecting Apache 2.2 to Tomcat 5.0 using mod_jk

2006-10-16 Thread Maurice Yarrow

Hello Christopher

From what you say below, it appears that you find
apache fronting tomcat via mod_jk to be a very workable
setup.  Since most posts are from people seeking help for
problems, the view I usually get is skewed toward the
non-robust.

But since it appears your experiences have been positive,
I would like to ask several questions.  These are apropos of
the following:
I had successfully set up tomcat behind apache via
mod_proxy, but found it to be noticeably slower than
tomcat behind pound (2.1.3) reverse-proxy/load-balancer.
On the other hand,  a post about 3 months ago stated that
mod_proxy was only about 33% slower than mod_jk, in what
appeared to be a legitimate benchmarking effort  (I hedge my
statements here, as you can see, since benchmarking
methodology, like the "science" of statistics, can be
controversial and often misused).

Note that in my current configuration, the pound currently
fronts apache (2.2.3, with mod_php, mod_perl), tomcat 5.0.28,
and two mongrel/rails clusters, but I had previously gotten
apache mod_proxy_balancer to front mongrel clusters, and
that seemed stable.  (Thus, apache would be able to support
and front all my needs - and would be my preferred frontend - if
it was fast enough with tomcat.)

So, finally (whew!!) Question:  (and this is, I agree, somewhat
subjective):
Do you find apache -> mod_jk -> tomcat to be "Fast" ?
Do you find it as fast as tomcat alone ?  (Well, by definition,
putting  something in between two other things can only make a
process slower, but "apparency" is important on the web.)

So the question really is:
Is apache fronting tomcat via mod_jk apparently fast ? 
(to your taste and needs, of course).


Maurice Yarrow





Christopher Schultz wrote:


Barak,

 


we trying to connect Apache 2.2 to Tomcat 5.0 using mod_jk on [Linux]
(Fedora Core 5).
When trying to use the SO binaries from the apache site I got the
"module is grabled" error message.
   



#1: Apache site does not host Linux binaries for mod_jk (IIRC)
#2: "Module is garbled" ---> apache version mismatch.

You probably have a module compiled for Apache 2.0.x and you are using
Apache 2.2.x. Just compile the module yourself. It's shockingly easy.

 


From there we tried to build mod_jk on our machines but could not find
any of the commands used in buildconf shell script.
   



You shouldn't have to play around with buildconf. From the BUILD.txt
file that ships with tomcat-connectors-1.2.18-src:

 


For the impatient Apache admins:
$> cd native
$> ./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)
$> make
$> su -c 'make install'
   



Did you try that? If it didn't work, what error did you get? Most Linux
systems ought to be able to do this right out of the box. About all you
need is gcc and make (okay, and maybe autoconf).

 


We tried to use mod_proxy_ajp instead but, again, failed to get the
proper binaries.
   



mod_proxy(_ajp) comes with Apache. If you compiled Apache yourself, then
you should just be able to re-compile it with mod_proxy support turned
on (see ./configure --help in the Apache distro). If you got a binary
distro (likely since you are using FC5) then you probably already have
mod_proxy.do lying around somewhere. All you should have to do is enable it.

FWIW, I have had horrible luck with mod_proxy_ajp. It's great for
super-simple configurations, but fronting Tomcat with Apache on any
reasonably-complex webapp setup pretty much requires mod_jk. I find the
configuration options mroe straightforward and well-documented. The last
time I checked (maybe 6 months ago), documentation for mod_proxy_ajp was
pretty much non-existent. I had to make educated guesses about how to
actually set it up to talk to Tomcat. It worked, but we ended up having
to do some pretty nasty mod_rewrite configs to make it half work, and
even then it acted funny.

 


Can anyone please help we get (or build) either the proper mod_jk or
mod_proxy_ajp modules?
   



To recap:

1. mod_jk.so isn't available in binary form. Don't trust anyone who
offers it to you ;) Just compile it yourself.

2. mod_proxy comes with Apache. Look around for it.

 


In addition, can anyone please put down in simple words ther main
differences between the two. I saw that mod_proxy is way easier to
configer but has some security holes. Can anyone tell me what these
holes are?
   



I am unaware of any security holes... someone else will have to comment
on that. See above for my complaints about mod_proxy. MY understanding
is that mod_proxy_ajp grew out of all the bitter complaints about how
hard getting mod_jk were for some users. I don't understand their
complaints, since mod_jk has compiled and worked like a dream for me
every single time since many many years ago. I believe that mod_jk has
more robust configuration options (and it's older, so I would guess more
stable and well-tested).

-chris


 





-
To sta

Re: new tomcat installation failes to start

2006-10-16 Thread Martin Gainty
Assaf-

you're missing Java Management package jmx.jar..On my box I have it at 
%TOMCAT_HOME%/bin
http://java.sun.com/products/JavaManagement/download.html

Martin--

This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Assaf Flatto" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, October 16, 2006 11:27 AM
Subject: RE: new tomcat installation failes to start


> hello
> 
> found the problem and fixed it , but now i have another issue :
> when i start it with the minimal server.xml it comes up fine , but wen i 
> add my servr.xml :
> 
> 
> 
> 
> 
> 
> 
>   
>   
>className="org.apache.catalina.mbeans.ServerLifecycleListener" />
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
>className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
> 
>   
>   
> 
> 
> 
> 
> 
>type="org.apache.catalina.UserDatabase"
>description="User database that can be updated and saved"
>factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>   pathname="conf/tomcat-users.xml" />
> 
>   
> 
>   
> 
>   
>   
> 
> 
> 
> 
> maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>enableLookups="false" redirectPort="8443" acceptCount="100"
>connectionTimeout="2" disableUploadTimeout="true" />
> 
> 
> 
> 
> 
> 
> maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>enableLookups="false" disableUploadTimeout="true"
>acceptCount="100" scheme="https" secure="true"
>clientAuth="false" sslProtocol="TLS"
>keystorepass="changeit" 
> keystoreFile="/etc/tomcat5/keystore"/>
> 
> 
> enableLookups="false" redirectPort="8443" 
> protocol="AJP/1.3" />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
>   
> 
>   
> 
>   
> 
>   
>   
> 
>   
> 
>factory="org.apache.commons.dbcp.BasicDataSourceFactory"
> driverName="org.postgresql.Driver"
> connectionURL="jdbc:postgresql://192.118.54.182/tap"
> connectionName="postgres" connectionPassword="" 
> resourceName="UserDatabase" />
> 
> 
> 
>   
> 
> 
>   
>autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
>directory="logs" prefix="localhost_access_log."
>  suffix=".txt" pattern="common" resolveHosts="false"/>
> 
>  crossContext="true">
>  name="jdbc/tapdb"
> auth="Container"
> type="javax.sql.DataSource"
> driverClassName="org.postgresql.Driver"
> url="jdbc:postgresql://192.118.54.182/tap"
> username="postgres"
> password=""
> poolPreparedStatements="true"
> maxActive="1000"
> maxIdle="40"
> maxWait="2"
> removeAbandoned="true"
> removeAbandonedTimeout="60"
> logAbandoned="true"
> validationQuery="SELECT id FROM currencies LIMIT 1" />
>  className="org.apache.catalina.realm.JAASRealm"
> appName="TAP"
> userClassNames="tap.login.TAPUser"
> roleClassNames="tap.login.TAPRole" />
> 
> 
> 
> 
> 
> 
>  className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
> 
> managerClassName="org.apache.catalina.cluster.session.DeltaManager"
>   expireSessionsOnShutdown="false"
>useDirtyFlag="true"
> notifyListenersOnReplication="true">
> 
>  className="org.apache.catalina.cluster.mcast.McastService"
> mcastAddr="228.0.0.4"
> mcastPort="45564"
> mcastFrequency="500"
> mcastDropTime="3000"/> 
> 
> className="org.apache.catalina.cluster.tcp.ReplicationListener"
> tcpListenAddress="auto"
> tcpListenPort="4001"
> tcpSelectorTimeout="100"
> tcpThreadCount="6"/>
>  className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
> replicationMode="pooled"
> ackTimeout="15000"
> waitForAck="true"/>
>  
> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
>  tempDir="/tmp/TAP-temp/"
>deployDir="/tmp/TAP-deploy/"
>  watchDir="/tmp/TAP-listen/"
>watchEnabled="false"/>
> className="org.apache.

Training

2006-10-16 Thread Kevin Mullin

Anyone know where I could get training
on Tomcat?






Kevin Mullin
Sr. Analyst
IBM Corporation
(206) 345-7068
[EMAIL PROTECTED]



Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread Rizalino DeVilleres
Guys, 

 

Sorry for the newbie question but I went through all the Tomcat 5.5
docs, and searched online and couldn't find any documentation how to
redefine that path.

 

I see the following documentation about defining the default Context and
where to place them but still talks about the path webapps/ROOT.

 

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

http://comments.gmane.org/gmane.comp.jakarta.tomcat.user/138259

 

We basically would like that path to be just public_html without
changing the path on the web server's docroot. 

 

Thanks,

Rizalino de Villeres



Re: new tomcat installation failes to start

2006-10-16 Thread David Smith
These messages make me think you are trying to run tomcat 5.5 on a 
1.4.x  JVM.   If so, download and install the compat package and install 
it.  It's on the same page as the other tomcat release downloads.


--David

Assaf Flatto wrote:


hello

found the problem and fixed it , but now i have another issue :
when i start it with the minimal server.xml it comes up fine , but wen 
i add my servr.xml :








  
  
  className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" 
/>
  className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/> 



  
  







  

  

  
  




   enableLookups="false" redirectPort="8443" 
acceptCount="100"

   connectionTimeout="2" disableUploadTimeout="true" />






   keystorepass="changeit" 
keystoreFile="/etc/tomcat5/keystore"/>
   


   enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />














  
  

  


  

  
  

  

  connectionName="postgres" connectionPassword="" 
resourceName="UserDatabase" />
   

   
  


  
  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
  directory="logs" prefix="localhost_access_log."
 suffix=".txt" pattern="common" 
resolveHosts="false"/>
   
reloadable="true" crossContext="true">

validationQuery="SELECT id FROM currencies LIMIT 
1" />








className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"


managerClassName="org.apache.catalina.cluster.session.DeltaManager"
  expireSessionsOnShutdown="false"
   useDirtyFlag="true"
notifyListenersOnReplication="true">


className="org.apache.catalina.cluster.mcast.McastService"

mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"

mcastDropTime="3000"/> 
   

className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>

className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"

replicationMode="pooled"
ackTimeout="15000"
waitForAck="true"/>
className="org.apache.catalina.cluster.tcp.ReplicationValve"
 
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/> 

   className="org.apache.catalina.cluster.deploy.FarmWarDeployer"

 tempDir="/tmp/TAP-temp/"
   deployDir="/tmp/TAP-deploy/"
 watchDir="/tmp/TAP-listen/"
   watchEnabled="false"/>
   className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" 
/>
 className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

 












  



  





when i start the service , i get the following error

SEVERE: Exception handling NamingResources property change
javax.management.MBeanException: Cannot load ModelMBean class 
org.apache.catalina.mbeans.ContextResourceMBean nested exception
 is java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) 

at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) 

at 
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:409)
at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:248)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:403) 

at 
org.apache.catalina.mbeans.ServerLifecycleListener.processNamingResourcesPropertyChange(ServerLifecycleListener.jav 


a:1315)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.propertyChange(ServerLifecycleListener.java:234) 

at 
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:252) 

at 
org.apache.catalina.deploy.NamingResources.addResource(NamingResources.java:274) 


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl

Using a custom connector in Tomcat 5.5

2006-10-16 Thread Jacob Marcus

Hi,

The examples no longer show the className attribute for the Connector
element in the server.xml. Is this not supported any more?
In the past, I have done used my own connector as shown in the example
below.




I could not find the relevant documentation on this possible change. I will
appreciate any pointers.


Thanks in advance,
Jacob


Re: Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread David Smith
Rename ROOT.xml in conf/Catalina/localhost to newContextName.xml.  
Restart tomcat.


--David

Rizalino DeVilleres wrote:

Guys, 




Sorry for the newbie question but I went through all the Tomcat 5.5
docs, and searched online and couldn't find any documentation how to
redefine that path.



I see the following documentation about defining the default Context and
where to place them but still talks about the path webapps/ROOT.



http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

http://comments.gmane.org/gmane.comp.jakarta.tomcat.user/138259



We basically would like that path to be just public_html without
changing the path on the web server's docroot. 




Thanks,

Rizalino de Villeres


 




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



Xls mime problem

2006-10-16 Thread Maciejewski, Vincent \(GMI - NY Governments\)
> Hello, I have this weird problem. 
> 
> I want to get tomcat to correctly set the mime type for xls files. So
> I added 
> 
> 
> xls
> application/vnd.ms-excel
> 
> 
> To the conf/web.xml file.
> 
> The odd thing is that wen I access an xls file using the browser with
> the following url:
> http:/localhost/filename.xls it works fine.
> 
> When I use
> http:/servname.com/filename.xls it doesn't. I just get the binary
> contents of the file.
> 
> Did anyone else have this problem? I something set up incorrectly?
> 
> Regards,
> 
> Vincent
>


If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail. http://www.ml.com/email_terms/



RE: new tomcat installation failes to start

2006-10-16 Thread Caldarale, Charles R
> From: Assaf Flatto [mailto:[EMAIL PROTECTED] 
> Subject: new tomcat installation failes to start
> 
> i've just installed a tomcat on a clean OS ( MDK 2007) .

What you have apparently installed is not a real Tomcat download, but a
repackaged version distributed by some third party.  I'd strongly
recommend throwing that away and downloading a real one from:
http://tomcat.apache.org/download-55.cgi

If you're running a 1.4 JRE, you will also need the JDK 1.4
Compatibility Package along with the Core download.  Don't forget to use
a GNU-compatible tar program to expand the downloads.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread Caldarale, Charles R
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Subject: Re: Is there a way to remap/replace webapps/ROOT?
> 
> Rename ROOT.xml in conf/Catalina/localhost to newContextName.xml.  
> Restart tomcat.

Not sure that's what he's asking for.

> Rizalino DeVilleres wrote:
> 
> > I see the following documentation about defining the default 
> > Context and where to place them but still talks about the path
> > webapps/ROOT.

The default application must be named ROOT (case sensitive), or must be
defined in server.xml with an empty path string (this latter mechanism
is strongly discouraged).

> > We basically would like that path to be just public_html without
> > changing the path on the web server's docroot. 

Not sure what you mean here.  Do you want the clients to use
http:///public_html to get to your primary app, or do you want
to store your default app somewhere in your local file system under the
directory public_html?

For the former, simply name your app public_html, either by placing it
under webapps with that name (subdirectory or .war file), or by creating
a public_html.xml file in conf/[engine]/[host] that has a 
element with its docBase attribute pointing to the location of your app.
([engine] and [host] are usually Catalina and localhost, respectively.)

For the latter, create a ROOT.xml file in conf/[engine]/[host]
containing a  element with its docBase pointing to the
//public_html directory.

Or am I completely misunderstanding the problem?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread Rizalino DeVilleres
David,

Thanks for the quick response.

I've tried your recommendation, and it does remap the webapps/ROOT to
whatever the name of the xml file is.

However, if I rename it public_html.xml, it looks for
"/path/to/public_html/public_html" instead of just /path/to/public_html.

Here is a snippet of the server.xml and public_html.xml file:

server.xml
 

public_html.xml:



I tried to change the appBase to just "/path/to/" and restart tomcat, it
looks at the desired path but I have to relocate all the files from
public_html to the folder /path/to.

Here are the errors from the webapps.log;
2006-10-16 14:33:27:072 - {ERROR} core.StandardContext;  Error starting
static Resources
java.lang.IllegalArgumentException: Document base
/path/to/public_html/public_html does not exist or is not a readable
directory

This setup is still working with Tomcat/4.1.18. I've been trying to get
it working for at least a few weeks and just started using this mailling
list as the last resort, so I apologize if this is not an acceptable
setup on Tomcat 5.5

Thanks,
Rizalino

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



Re: run php & jsp on the same server

2006-10-16 Thread Mladen Adamovic

neugi wrote:
is there a way to configure tomecat to run also like php on port 80, 
or let

them run together on the same virtual server?



If you want to run both PHP and JSP you can use mod_jk in Apache.

More instructions at :

http://www.howtoforge.com/apache2_tomcat5_mod_jk_p3
http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html



--
Mladen Adamovic
http://www.online-utility.org  
http://www.cheapvps.info

http://www.vpsreview.com





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



RE: Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread Caldarale, Charles R
> From: Rizalino DeVilleres [mailto:[EMAIL PROTECTED] 
> Subject: RE: Is there a way to remap/replace webapps/ROOT?
> 
> server.xml
>   appBase="/path/to/public_html" deployOnStartup="true"

This says your webapps will normally be deployed in
/path/to/public_html; is that what you want?

> public_html.xml:
> 
> 

The path attribute is not allowed, unless the  element is in
server.xml, which is not recommended.  The actual path to the app is
determined by the name of the .xml file in conf/Catalina/localhost or
the name of the properly formatted directories or .war files under
webapps.  If you want a particular app to be the default app, its
 element should be in a file named ROOT.xml in
conf/Catalina/localhost with a docBase attribute pointing to the
location of the app.

> This setup is still working with Tomcat/4.1.18.

Context configuration has changed significantly since then.

Just to clarify:

1) What is the actual file system path of your default webapp?
2) What is the actual value of the appBase attribute for your 
element?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread Rizalino DeVilleres
Charles, I posted the previous post prematurely before I had a chance to
read your recommendation... and it worked!!!

Thanks a lot guys for all the help... I had to remove the appbase
attribute within the Host element in the server.xml...

Rizalino de Villeres

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



Re: Connecting Apache 2.2 to Tomcat 5.0 using mod_jk

2006-10-16 Thread Christopher Schultz
Maurice,

We might want to take this into another thread, as to not steal the
original, but we should keep it on the list so that others can read it.
If anyone objects, please re-port and reference the original.

> [I]t appears that you find apache fronting tomcat via mod_jk to be a 
> very workable setup.

I do.

> Do you find apache -> mod_jk -> tomcat to be "Fast" ?

I find it "fast enough". Local network access of our test machines
leaves us nothing to complain about, although we have never benchmarked
the application with other front servers (or with no front server at
all). We also do not have any clustering or anything like that at this
time, so Apache/mod_jk doesn't have any complex decisions to make.

> Do you find it as fast as tomcat alone ?  (Well, by definition, 
> putting  something in between two other things can only make a 
> process slower, but "apparency" is important on the web.)

For us, fronting Tomcat is a necessity: we have several webapps running
under different VMs, so we can't connect directly to Tomcat using the
HTTP connector. We also have some static content that I personally feel
is better served by Apache, but that's just because I'm a native bigot ;)

> So the question really is: Is apache fronting tomcat via mod_jk
> apparently fast ? (to your taste and needs, of course).

I have no complaints. We're working with a single box, so Apache-Tomcat
connections probably use shared memory behind the scenes, so that might
be a factor in why we are so happy with performance ;)

Don't forget that pound was designed to be a proxy and lb, whereas
Apache was designed to be an entire web server with tons of features.
Pound is likely faster due to sheer simplicity, since it doesn't need
all kinds of hooks that Apache exposes for mod_* and all the rest.

-chris




signature.asc
Description: OpenPGP digital signature


RE: Tomcat Manager

2006-10-16 Thread Caldarale, Charles R
> From: Mathieu Larchet [mailto:[EMAIL PROTECTED] 
> Subject: Re: Tomcat Manager
> 
> Ok but that's already what I'm doing, I don't want to access 
> different managers, I want to access all my applications in
> a single one, even if there are in different virtual hosts.

The manager app, as written, doesn't appear to be able to do that.  You
might be able to front end it with something relatively simple to select
amongst the various hosts and run the appropriate manager.  Another
possibility is to modify a 3rd party tool like Lambda Probe to do what
you need.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: wrong StandardContext

2006-10-16 Thread Caldarale, Charles R
> From: Oleg [mailto:[EMAIL PROTECTED] 
> Subject: Re: wrong StandardContext
> 
> I know declare docBase for every application as absolute path,
> docBase="E:/Webspace/domain1/ROOT" This seem to fix the problem
> and my vrtual hosts do not try to load localhost webApp anymore.
> Is this the right way to fix the problem?

A very good question.  I think you may have stumbled across a real bug,
but it will take a bit more experimentation to be sure.  At least you
have a workaround.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a way to remap/replace webapps/ROOT?

2006-10-16 Thread Martin Gainty
Riza-
take off the trailing slash

in server.xml change appBase=
"/path/to/public_html" TO
"/path/to"

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Rizalino DeVilleres" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, October 16, 2006 2:37 PM
Subject: RE: Is there a way to remap/replace webapps/ROOT?


David,

Thanks for the quick response.

I've tried your recommendation, and it does remap the webapps/ROOT to
whatever the name of the xml file is.

However, if I rename it public_html.xml, it looks for
"/path/to/public_html/public_html" instead of just /path/to/public_html.

Here is a snippet of the server.xml and public_html.xml file:

server.xml
 

public_html.xml:



I tried to change the appBase to just "/path/to/" and restart tomcat, it
looks at the desired path but I have to relocate all the files from
public_html to the folder /path/to.

Here are the errors from the webapps.log;
2006-10-16 14:33:27:072 - {ERROR} core.StandardContext;  Error starting
static Resources
java.lang.IllegalArgumentException: Document base
/path/to/public_html/public_html does not exist or is not a readable
directory

This setup is still working with Tomcat/4.1.18. I've been trying to get
it working for at least a few weeks and just started using this mailling
list as the last resort, so I apologize if this is not an acceptable
setup on Tomcat 5.5

Thanks,
Rizalino

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



Re: run php & jsp on the same server

2006-10-16 Thread Martin Gainty
Hi Mladen-
Is there ANY advantage to keeping your legacy PHP?
Why not convert your PHP to Java?
M-

This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Mladen Adamovic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, October 16, 2006 2:38 PM
Subject: Re: run php & jsp on the same server


> neugi wrote:
>> is there a way to configure tomecat to run also like php on port 80, 
>> or let
>> them run together on the same virtual server?
>>
> 
> If you want to run both PHP and JSP you can use mod_jk in Apache.
> 
> More instructions at :
> 
> http://www.howtoforge.com/apache2_tomcat5_mod_jk_p3
> http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html
> 
> 
> 
> -- 
> Mladen Adamovic
> http://www.online-utility.org  
> http://www.cheapvps.info
> http://www.vpsreview.com
> 
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

RE: Help with Custom Analyzer

2006-10-16 Thread Caldarale, Charles R
> From: Ryan O'Hara [mailto:[EMAIL PROTECTED] 
> Subject: Help with Custom Analyzer
> 
> I have a few questions regarding writing a custom analyzer.

I don't get it; in what way is this associated with Tomcat?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with Custom Analyzer

2006-10-16 Thread Christopher Schultz
Chuck,

Looks like this guy accidentally posted a Lucene question to the Tomcat
list. I hope he comes back to see the responses. 

-chris

Caldarale, Charles R wrote:
>> From: Ryan O'Hara [mailto:[EMAIL PROTECTED] 
>> Subject: Help with Custom Analyzer
>>
>> I have a few questions regarding writing a custom analyzer.
> 
> I don't get it; in what way is this associated with Tomcat?
> 
>  - 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 start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



signature.asc
Description: OpenPGP digital signature


Re: Session replication

2006-10-16 Thread Len Popp

I have run a Tomcat cluster without sticky sessions and it seems to
work fine. Here's a how-to for configuring session replication without
sticky sessions: http://www.paulkimbrel.com/?p=3

But I don't think sticky sessions are a problem for load balancing.
The server rack won't tip over if one server gets a couple of extra
requests because of a sticky session.
--
Len

On 10/16/06, Marko Zeisig <[EMAIL PROTECTED]> wrote:

Hi there,

i have a general question regarding session replication in tomcat 5.5, i am new 
to this topic. What i want to setup is a system with an hw-loadbalancer (or 
maybe an apache with mod_jk and worker.loadbalancer.balanced_workers) an 2 
servers with one tomcat on each server. the application on both servers works 
with sessions, so i want session replication between those 2 tomcats. What 
confuses me: it is said in many documentations regarding the topic tomcat 
clustering/session replication  that i have to configure my lb with sticky 
sessions ?! That is exactly not want i want, what is the use of session 
replication if i configure my lb with sticky sessions in an setup described 
above. It makes sense for failover scenarios, but not when i want to 
loadbalance two tomcats with an applikation with sessions. So is that possible 
at all ?

regards,
sj
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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




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



Re: run php & jsp on the same server

2006-10-16 Thread Christopher Schultz
Martin,

> Is there ANY advantage to keeping your legacy PHP?

Here's one: now having to re-write and re-test your perfectly good PHP
application in JSP.

> Why not convert your PHP to Java?

Cause re-writing apps sucks. :(

To answer the OP, you can certainly "run" PHP and JSP on the same
machine. Note that you pretty much require Apache (or another web
server) to connect to PHP in the first place, so it makes sense to use
Apache as the front server for both PHP and JSP. PHP comes with it's own
connector (mod_php, right?), and Tomcat has mod_jk.

I seem to recall some hack to get PHP actually running /inside/ Tomcat.
Am I smoking crack, or was that real? Sounds like a damn sexy hack if
it's true.

-chris




signature.asc
Description: OpenPGP digital signature


Re: run php & jsp on the same server

2006-10-16 Thread Wendy Smoak

On 10/16/06, Christopher Schultz <[EMAIL PROTECTED]> wrote:


I seem to recall some hack to get PHP actually running /inside/ Tomcat.
Am I smoking crack, or was that real? Sounds like a damn sexy hack if
it's true.


Apparently... http://wiki.apache.org/tomcat/UsingPhp

--
Wendy

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



Re: Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Peter Olin

Thanks Chris!

Yes, Tomcat and IIS are on different machines, and yes, there is firewall
stuff in between. IIS is in a publicly available layer, and Tomcat is more
"inside" protected from the outside world. And at the moment there is only
infrequent traffic to the server.

I'll follow up your theory - it sounds reasonable.

/Peter




2006/10/16, Christopher Schultz <[EMAIL PROTECTED]>:


Peter,

> After a day or so a fully functional setup (IIS, AJP Tomcat) doesn't
work
> any longer.
>
> Tomcat is still running, and surfing to the Tomcat port works fine, but
> going through IIS no longer works. (See log excerpt below)
>
> We're using the following:
>
>   - Tomcat 5.0.28
>   - ajk 2.19
>   - IIS

Is everything on a single host, or do you have ISS running on a
different machine?

If they are separated, some firewall software and hardware will kill
connections that have not been used for a certain amount of time (often
a few hours). If your AJP13 connection is dying overnight when nobody is
using it, perhaps you have a router or firewall configured to close
inactive connections.

-chris







--
Peter Olin


Re: run php & jsp on the same server

2006-10-16 Thread Steve Ochani
On 16 Oct 2006 at 16:12, Christopher Schultz wrote:


> I seem to recall some hack to get PHP actually running /inside/
> Tomcat. Am I smoking crack, or was that real? Sounds like a damn sexy
> hack if it's true.

I've seen it mentioned here and there.

Google search turned up some interesting results, including:

http://wiki.apache.org/tomcat/UsingPhp


-Steve O.





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



Re: run php & jsp on the same server

2006-10-16 Thread Larry Meadors

Why not just run resin with quercus? Works pretty much outta the box.

Larry


On 10/16/06, Steve Ochani <[EMAIL PROTECTED]> wrote:

On 16 Oct 2006 at 16:12, Christopher Schultz wrote:


> I seem to recall some hack to get PHP actually running /inside/
> Tomcat. Am I smoking crack, or was that real? Sounds like a damn sexy
> hack if it's true.

I've seen it mentioned here and there.

Google search turned up some interesting results, including:

http://wiki.apache.org/tomcat/UsingPhp


-Steve O.





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




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



RE: run php & jsp on the same server

2006-10-16 Thread Caldarale, Charles R
> From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
> Subject: Re: run php & jsp on the same server
> 
> Apparently... http://wiki.apache.org/tomcat/UsingPhp

There's also a PHP servlet in SourceForge:
http://sourceforge.net/projects/phpservlet

And a PHP/Java bridge:
http://sourceforge.net/projects/php-java-bridge

And a couple of PHP to Java bytecode converters:
http://sourceforge.net/projects/php4java
http://sourceforge.net/projects/jhp

Haven't tried any of them.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with Custom Analyzer

2006-10-16 Thread Ryan O'Hara

Ah.  Thank you.  Sorry, wrong list.

-Ryan

On Oct 16, 2006, at 4:08 PM, Christopher Schultz wrote:


Chuck,

Looks like this guy accidentally posted a Lucene question to the  
Tomcat

list. I hope he comes back to see the responses. 

-chris

Caldarale, Charles R wrote:

From: Ryan O'Hara [mailto:[EMAIL PROTECTED]
Subject: Help with Custom Analyzer

I have a few questions regarding writing a custom analyzer.


I don't get it; in what way is this associated with Tomcat?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





===
Ryan O'Hara
Programmer, Center for Biomedical Informatics
The Children's Hospital of Philadelphia
3535 Market Street, Room 1406
(215)590-3243
===




RE: run php & jsp on the same server

2006-10-16 Thread Caldarale, Charles R
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors
> Subject: Re: run php & jsp on the same server
> 
> Why not just run resin with quercus? Works pretty much outta the box.

Probably because of the following quote from Caucho's download page:

"Resin Professional is commercial software. Users must purchase
deployment licenses, allowing us to develop and support the highest
quality web application software."

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: run php & jsp on the same server

2006-10-16 Thread Larry Meadors

OK, pay one way (with cash) or another (with time)...which can you make more of?

:-)

Larry


On 10/16/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:

> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors
> Subject: Re: run php & jsp on the same server
>
> Why not just run resin with quercus? Works pretty much outta the box.

Probably because of the following quote from Caucho's download page:

"Resin Professional is commercial software. Users must purchase
deployment licenses, allowing us to develop and support the highest
quality web application software."

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



RE: Tomcat, ajp, IIS - loosing connection

2006-10-16 Thread Sean Overby
If you are on IIS 6.0 also try running in IIS 5.0 isolation mode. That
seemed to clear up a lot of issues we were having with the connector dying
after a day or so of working. You can find the setting here:
http://tjworld.net/help/kb/0001_iis6-Tomcat5-JK2.html#conIIS1


-Original Message-
From: Peter Olin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 16, 2006 4:16 PM
To: Tomcat Users List
Subject: Re: Tomcat, ajp, IIS - loosing connection


Thanks Chris!

Yes, Tomcat and IIS are on different machines, and yes, there is firewall
stuff in between. IIS is in a publicly available layer, and Tomcat is more
"inside" protected from the outside world. And at the moment there is only
infrequent traffic to the server.

I'll follow up your theory - it sounds reasonable.

/Peter




2006/10/16, Christopher Schultz <[EMAIL PROTECTED]>:
>
> Peter,
>
> > After a day or so a fully functional setup (IIS, AJP Tomcat) doesn't
> work
> > any longer.
> >
> > Tomcat is still running, and surfing to the Tomcat port works fine, 
> > but going through IIS no longer works. (See log excerpt below)
> >
> > We're using the following:
> >
> >   - Tomcat 5.0.28
> >   - ajk 2.19
> >   - IIS
>
> Is everything on a single host, or do you have ISS running on a 
> different machine?
>
> If they are separated, some firewall software and hardware will kill 
> connections that have not been used for a certain amount of time 
> (often a few hours). If your AJP13 connection is dying overnight when 
> nobody is using it, perhaps you have a router or firewall configured 
> to close inactive connections.
>
> -chris
>
>
>
>


-- 
Peter Olin


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



Tomcat 4.1.30 + SSI + CruiseControl

2006-10-16 Thread EJ Ciramella
Hello board, I have a somewhat tricky (to me at least) question about
tomcat configuration.
 
We are using CruiseControl to build a strictly html site alongside our
other java products and recently, they've wanted to activate SSI.
 
In the past, CruiseControl (CC) has made it's artifacts directory (which
sits here E:\work\artifacts) available via:
 
http://server:8080/cruisecontrol/artifacts/...
 
I have tomcat installed in C:\jakarta-tomcat-4.1.30.
 
I've properly activated SSI and can see it working if this particular
project's files are copied to the examples (or cruisecontrol) webapp
directory.  BUT - when I follow the artifacts link to these pages, the
SSI code is ignored (and treated as comments).
 
So - if the files being displayed via tomcat are NOT in the webapp
directory, the SSI stuff is ignored?  Is there any way to change this?
Isn't this some sort of policy file change (which is magic to me)?
 
In a nutshell again:
 
A webapp installed here:
 
C:\jakarta-tomcat-4.1.30\webapps\cruisecontrol
 
can't expand the SSI code in files here:
 
E:\work\artifacts\pageBuild\latest
 
I can see the html files (they are displayed properly), but the SSI
stuff isn't rendered.
 
Any help would be huge (I've done a work around I'm not proud of)!


Tomcat unable to find the apr library

2006-10-16 Thread Michael Courcy

Hi,

I wanted my tomcat instance use the APR (Apache Portable Runtime) so I 
installed it.


Installation went fine, and the library where installed in 
/usr/local/apr/lib.


Then I set the env variable LD_LIBRAY_PATH to /usr/local/apr/lib.

I restart tomcat, but I still get this message in the log
INFO: The Apache Tomcat Native library which allo..[...]..s was not 
found on the java.library.path:  [...]:/usr/local/apr/lib/


So I don't understand, because it looks like, all information to load 
the APR library is given, but tomcat failed to use it


Any help ?

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



RE: Tomcat unable to find the apr library

2006-10-16 Thread Caldarale, Charles R
> From: Michael Courcy [mailto:[EMAIL PROTECTED] 
> Subject: Tomcat unable to find the apr library
> 
> I wanted my tomcat instance use the APR (Apache Portable 
> Runtime) so I installed it.

Where did you get it in Linux-installable form?  You normally have to
build it for the platform it's going to be run on, using 32- or 64-bit
compilation to match the JVM you have.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RHEL4 with App Server 3 and the missing tomcat5 manager

2006-10-16 Thread John McCoy
Ok Sys Admin here working for my developers, last time I worked with 
Tomcat it was version 1.


My developer asked me to install Manager referring me to this link:
http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html

Ok seems reasonable, however I can find no RPMs from Redhat for it.
I'm googled out and searched the archives for this list too.
Am I blind or just stupid? Ok don't answer the second part.

TIA
John

[EMAIL PROTECTED] tomcat5]# rpm -qa | grep tomcat
tomcat5-servlet-2.4-api-5.5.17-6jpp_2rh
tomcat5-server-lib-5.5.17-6jpp_2rh
tomcat5-common-lib-5.5.17-6jpp_2rh
tomcat5-jsp-2.0-api-5.5.17-6jpp_2rh
tomcat5-jasper-5.5.17-6jpp_2rh
tomcat5-5.5.17-6jpp_2rh

--
*
John McCoy, Jr
Sr. Systems and Network Administrator
Enterprise Technology Services
Golden Gate University
415-442-6560
*


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



RE: RHEL4 with App Server 3 and the missing tomcat5 manager

2006-10-16 Thread Caldarale, Charles R
> From: John McCoy [mailto:[EMAIL PROTECTED] 
> Subject: RHEL4 with App Server 3 and the missing tomcat5 manager
> 
> Ok seems reasonable, however I can find no RPMs from Redhat for it.

That's probably a good thing.  Most of the Linux vendors try to
repackage Tomcat and end up making a mess of it.  Strongly suggest you
download the real one from:
http://tomcat.apache.org/download-55.cgi
and install that.  The Tomcat manager app is included in the Core
download.  If you're using a 1.4 JRE, you'll also need the JDK 1.4
Compatability Package, and you probably want the Administration Web
Application just for fun.  Make sure you use a GNU-compatible tar
program to take them apart.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RHEL4 with App Server 3 and the missing tomcat5 manager

2006-10-16 Thread David Smith
Tomcat (at least the release version from tomcat.apace.org) has the 
manager already in it.  The manager webapp lives in 
$TOMCAT_HOME/server/webapps with it's context definition in 
$TOMCAT_HOME/conf/Catalina/localhost.  Are either of those already 
present in your RPM dist?


--David

Caldarale, Charles R wrote:
From: John McCoy [mailto:[EMAIL PROTECTED] 
Subject: RHEL4 with App Server 3 and the missing tomcat5 manager


Ok seems reasonable, however I can find no RPMs from Redhat for it.



That's probably a good thing.  Most of the Linux vendors try to
repackage Tomcat and end up making a mess of it.  Strongly suggest you
download the real one from:
http://tomcat.apache.org/download-55.cgi
and install that.  The Tomcat manager app is included in the Core
download.  If you're using a 1.4 JRE, you'll also need the JDK 1.4
Compatability Package, and you probably want the Administration Web
Application just for fun.  Make sure you use a GNU-compatible tar
program to take them apart.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



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



hardening and securing tomcat in a production environment

2006-10-16 Thread Stephen More

Is there a published list of items that need to be configured in order
to harden and secure tomcat in a production environment ? What items
need to be configured, and what items need to be removed  ? I am
currently interested in version 5.5.


-Thanks
Steve More

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



Re: Writing a text file back to browser from a servlet

2006-10-16 Thread David Kerber
This worked, though not exactly how I expected.  The "save file as..." 
box comes up and works, but is there a way of showing the file in the 
browser screen as well?  Right now, it keeps the previous page displayed 
while prompting to save the download.  I can live with that if I have 
to, but it would be nice if I could show my users the file content in 
the browser as well.


Thanks!
Dave


David Kerber wrote:


Thanks, Tim - I'll give that a try later today.

Dave


Tim Lucia wrote:

You could stream it directly to the user, if practical (why write to 
a temp
file only to stream that back to the user?)  In order to be 
recognized by

the browser as text and an attachment, you should:

response.setContentType("text/plain; charset=UTF-8");
response.setHeader("Content-disposition", "attachment; 
filename=.txt");


charset is optional...



Tim


-Original Message-
From: David Kerber [mailto:[EMAIL PROTECTED] Sent: Friday, 
October 13, 2006 10:13 PM

To: Tomcat Users List
Subject: Writing a text file back to browser from a servlet

I'm trying to do something that seems like it should be very easy, 
but can't get it to work:  sending a .txt file back to the user's 
browser so they can save it to their local hard disk.  I am having no 
trouble creating the file and writing it to a temporary place on the 
server, but can't figure out what I need to do so the users can save 
the result.


Right now, I'm using the following code excerpt:

 fReader = new FileReader( fullFileName );
 bReader = new BufferedReader( fReader );
 oStream = response.getOutputStream();
 while (( logString = bReader.readLine()) != null ) {
 // I'm sure a println would also work, but this is what I happen 
to have right now

 oStream.write(( logString + EddRcvr.newLineStr ).getBytes());
 }
 oStream.close();
 bReader.close();
 fReader.close();


And it *displays* just fine in the browser window, but when I try to 
save it (using firefox 1.5.x), the download windows says it completed 
successfully, but the file is never there when I try to look at it.


Any suggestions as to what I'm missing?

TIA!
Dave






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



Re: hardening and securing tomcat in a production environment

2006-10-16 Thread Parsons Technical Services

Hello,

From my experience the server is pretty good out of the box. Of concern is 
what is done after it is installed as well as during the install. During the 
install, the typical issues of rights and such need addressed as far as 
securing the server. But putting the server aside and focusing on Tomcat.


If you enable the manager/admin follow practices for complex passwords.
Do not enable the invoker servlet.

For further reading:
http://tomcat.apache.org/faq/security.html

Doug


- Original Message - 
From: "Stephen More" <[EMAIL PROTECTED]>

To: 
Sent: Monday, October 16, 2006 8:22 PM
Subject: hardening and securing tomcat in a production environment



Is there a published list of items that need to be configured in order
to harden and secure tomcat in a production environment ? What items
need to be configured, and what items need to be removed  ? I am
currently interested in version 5.5.


-Thanks
Steve More

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







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



apache/mod_jk <--> tomcat versus pound (lb) <--> tomcat/apache

2006-10-16 Thread Maurice Yarrow

Hello again, Christopher

(this is the separate thread you requested - which had
originated as "Connecting Apache 2.2 to Tomcat 5.0 using mod_jk")

Thanks for entertaining my (relatively non-technical) questions.
Nevertheless, the issue of supporting multiple web app servers/
containers through ports 80/443 comes up constantly in the list,
and is indeed an important one, and typically, with numerous
implications.

For example:  I had originally set up Nick Kew's mod_proxy_html to
assist in forwarding from apache to tomcat.  Because my tomcat
app consists of a Single-sign-on on one context and and several
other web app/contexts, with both http and https, configuring
this all with mod_proxy and mod_proxy_html was non-trivial.
But it worked very nicely, and the mod_proxy_html gave me
exactly the regex-based "scheme://domain:port/context/servlet... "
transformations that I required.  However - and Nick does clearly
warn of this - it was slow - but powerful.  It freed me from having
to make any intra-web-app regex-based transformations. 


But I figured I would try a combination of mod_proxy, and
servlet/jsp based "scheme://domain:port/context/servlet/..."
regex-based transforms.   This speeded things up a bunch,
and also worked well.  But it was an unpleasant consession to
have to actually accomodate these transformations inside the
web app code - very NON-object oriented/ NON-portable/NON-modular.
(I could made it sexier - yes, abstracted and modular - but it was
only supposed to be an experiment.)

So then I tried pound to front not only the tomcat, but also apache,
and also two mongrel/rails clusters.  Pound turned out to be
fast (after all, it is not a server), relatively easy to configure, and is
naturally secure (since it doesn't itself serve pages off of disk), and
it only lets through contexts that are indicated in its regex-based
config sections.  Since it also supported https, it seemed to support
all my requirements.

There was only one issue.  That was when rewriting https to http (for
leaving secure side to then view pages that require no unique session
and no encryption) it did not make the required https to http 
transformations

to the URL.
Then I found the following post:
   http://www.tapestryforums.com/-vt308.html?view=next 
which explained a fix to the C source of pound which solved the "problem".

The fix was for an older pound version, so I had to hunt around to find
the equivalent section of code to fix in the version 2.1.3 that I have. 

This, though not sanctioned by Robert Segall, the author of pound, did

solve the issue, and appears to be stable.  Evidently, Robert explains (so
I have read) that in fact, this patch causes pound to forward from scheme
to scheme in a manner not consistent with the expected.   But it gives the
behavior I require, and appears to be secure. 


Well, so after all this, what have I learned ?   What I found was that for
any by the simplest configurations, setting up multiple server forwarding
is not at all a simple issue.   Moreover, it needs to be done 
delicately, lest

one introduce non-obvious security issues.  (I did run nikto web scanner
on the final configuration, and it found zero (0) security issues.  Of
course, I had previously secured the apache and tomcat servers separately
up to but not including running in a chroot'd jail.)

Conclusion: I certainly hope others have less complicated requirements.

Maurice Yarrow



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



Newbie Tomcat question - where to store dependency DLLs?

2006-10-16 Thread AStefanS

Hi 
I have a .Net user control DLL that depends on other DLLs, and I am trying
to deploy it on Tomcat 5.5. The problem I encountered is that my DLL can be
downloaded successfully (after adding application/x-msdownload MIME
mapping), but the dependency DLLs are not downloaded. I have tried putting
the dependency DLLs on the same directory as the main DLL, or in the same
directory as the HTML file, but to no avail. Can someone tell me what can I
do to rectify this? Thanks!
-- 
View this message in context: 
http://www.nabble.com/Newbie-Tomcat-question---where-to-store-dependency-DLLs--tf2456907.html#a6847791
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Stress test requirements

2006-10-16 Thread Rizwan Merchant


Hi,
We are running a web app using tomcat 5.5.15, hibernate, spring, struts 
and mysql on a FC4 linux box. We also have mod_jk set up wih the apache 
web server to forward requests to tomcat.


We would like to stress test the application. Can someone guide me as to 
how I can begin doing this and if there are any well documented guides 
to stress test and application of this sort? We are trying to answer 
questions of the following nature:


1. Are there any memory leaks in the application?
2. Are there any db connection leaks? (We are using dbcp)
3. How many concurrent users can the application handle?
4. Any other performance issues that need to be fixed.

What kind of tools can I use for this sort of stress test? Does the 
machine we stress test on have to be EXACTLY the same as the production 
environment (hardware particularly)?


Thanks,
-Riz.

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



Re: jvm thread dump

2006-10-16 Thread Rizwan Merchant


hmmm...still having issues with this. Dont understand why..I commented 
out the A1 appender and uncommented the R appender (as below). The 
applications are still logging to catalina.out !! How do I stop this??? 
Please help!



#
# Configures Log4j as the Tomcat system logger
#

#
# Configure the logger to output info level messages into a rolling log 
file.

#
log4j.rootLogger=INFO, R

#
# To continue using the "catalina.out" file (which grows forever),
# comment out the above line and uncomment the next.
#
#log4j.rootLogger=ERROR, A1

#
# Configuration for standard output ("catalina.out").
#
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
#log4j.appender.A1.layout=org.apache.log4j.PatternLayout
#
# Print the date in ISO 8601 format
#
#log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

#
# Configuration for a rolling log file ("tomcat.log").
#
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.DatePattern='.'-MM-dd
#
# Edit the next line to point to your logs directory.
# The last part of the name is the log file name.
#
log4j.appender.R.File=/usr/local/tomcat/logs/tomcat.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#
# Print the date in ISO 8601 format
#
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
#log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO



Christopher Schultz wrote:

Riz,

  

But I am seeing the same log messages (info level from the application)
being dumped into catalina.out, so these are definitely not System.out
logs.



You must have an appender that is using stdout or stderr as its
destination. Check out your log4j configuration.

  

I do have a log4j.properties file in CATALINA_HOME/common/classes
(attached for your reference).



Umm... here's your problem. It's even documented in the config file!

#
# Configuration for standard output ("catalina.out").
#
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

It looks like you are setting up the "R" appender but never using it:

#
# Configure the logger to output info level messages into a rolling log
file.
#
#log4j.rootLogger=INFO, R

#
# To continue using the "catalina.out" file (which grows forever),
# comment out the above line and uncomment the next.
#
log4j.rootLogger=ERROR, A1

You have your preferred rootLogger config commented-out, and another one
(using stdout) enabled.

You should really real the documentation on log4j... this one was really
simple ;)

-chris

  


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



Re: RHEL4 with App Server 3 and the missing tomcat5 manager

2006-10-16 Thread Bruno Georges
Hi John

RH is now offering an application stack which bundles: JBoss AS [incl
tomcat] , Apache, LAMP,...
I haven't installed it, therefore I don't know if they have shipped it with
Tomcat's manager front-end.

I suggets you have a look at their page:
http://www.redhat.com/solutions/rhappstack/

And ask their support staff.

Best Regards
Bruno Georges

Glencore International AG
Tel. +41 41 709 3204
Fax +41 41 709 3000


|-+--->
| |   John McCoy  |
| |   <[EMAIL PROTECTED]>|
| |   |
| |   17.10.06 00:49  |
| |   Please respond  |
| |   to "Tomcat Users|
| |   List"   |
| |   |
|-+--->
  
>--|
  | 
 |
  |To:  users@tomcat.apache.org 
 |
  |cc:  
 |
  |Subject: RHEL4 with App Server 3  and the missing tomcat5 manager
 |
  | 
 |
  |Distribute:  
 |
  |Personal?   |---|
 |
  || [ ] x |
 |
  ||---|
 |
  | 
 |
  
>--|




Ok Sys Admin here working for my developers, last time I worked with
Tomcat it was version 1.

My developer asked me to install Manager referring me to this link:
http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html

Ok seems reasonable, however I can find no RPMs from Redhat for it.
I'm googled out and searched the archives for this list too.
Am I blind or just stupid? Ok don't answer the second part.

TIA
John

[EMAIL PROTECTED] tomcat5]# rpm -qa | grep tomcat
tomcat5-servlet-2.4-api-5.5.17-6jpp_2rh
tomcat5-server-lib-5.5.17-6jpp_2rh
tomcat5-common-lib-5.5.17-6jpp_2rh
tomcat5-jsp-2.0-api-5.5.17-6jpp_2rh
tomcat5-jasper-5.5.17-6jpp_2rh
tomcat5-5.5.17-6jpp_2rh

--
*
John McCoy, Jr
Sr. Systems and Network Administrator
Enterprise Technology Services
Golden Gate University
415-442-6560
*


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




LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly
confidential and they may not be used or disclosed by someone who is not a
named recipient.
If you have received this email in error please notify the sender by replying
to this email inserting the word "misdirected" as the message and delete this
e-mail from your system.

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



SV: Problem with filter and calling Perl-script with Tomcat 5.5.20

2006-10-16 Thread Gunnar.Bostrom
Hi,

The problem is not to get the parameters in my java filter. 
The problem is that I need to pass the posted parameters from the form plus one 
additional parameter to my Perl script.

Regards
Gunnar
 

> -Ursprungligt meddelande-
> Från: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Skickat: den 16 oktober 2006 18:06
> Till: Tomcat Users List
> Ämne: Re: Problem with filter and calling Perl-script with 
> Tomcat 5.5.20
> 
> Gunnar-
> 
> String AStringWhichHoldsPostedOrQSValue;
> if(HttpServletRequest.getMethod()  ==  "POST") { //Post only  
> AStringWhichHoldsPostedOrQSValue = 
> HttpServletRequest.getParameter("whatever");
> }
> else
> { //Get Only..
>  AStringWhichHoldsPostedOrQSValue =  
> HttpServletRequest.getQueryString();
> }
> It has been my experience that getParameter does 
> NOT retrieve POSTed values when Method = 'Get')
> 
> 
> M-
> 
> This e-mail communication and any attachments may contain 
> confidential and privileged information for the use of the 
> designated recipients named above. If you are not the 
> intended recipient, you are hereby notified that you have 
> received this communication in error and that any review, 
> disclosure, dissemination, distribution or copying of it or 
> its contents
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, October 16, 2006 11:09 AM
> Subject: Problem with filter and calling Perl-script with 
> Tomcat 5.5.20
> 
> 
> Hi,
> 
> I've a problem with the new 5.5.20 Tomcat version.
> I think this has to do with this bug fix 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=37285.
> 
> The problem is that I have a filter that adds a parameter 
> before the CGI-filter calling out to a Perl-script.
> 
> This code worked with Tomcat 5.5.17 and works with 5.5.20 if 
> the request is a GET but not a POST.
> 
> This is the relevant code:
> 
> HttpServletRequest httpServletRequest = (HttpServletRequest) 
> request; HashMap parameters = new 
> HashMap(
>(HashMap) httpServletRequest.getParameterMap());
> fillUserInfo(parameters);
> httpServletRequest = generateWrapper(httpServletRequest, 
> parameters); chain.doFilter(httpServletRequest, response);
> 
> 
> Can you advise me what to do?
> 
> Regards
> Gunnar
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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