mod_proxy_ajp TIME_WAIT

2007-11-15 Thread David Cassidy
Guys,

I'm using mod_proxy in apache 2.2.6 with the ajp connector in tomcat.

apache config
-
Proxy balancer://myclusterclear
BalancerMember ajp://localhost:8009 route=server1 min=0
smax=1000 max=1000  keepalive=On
/Proxy
ProxyPass // balancer://myclusterclear/
stickysession=JSESSIONID|jsessionid


Tomcat config (Using the native apr libs)

Executor name=tomcatThreadPool namePrefix=catalina-exec-
maxThreads=150 minSpareThreads=4/

Connector executor=tomcatThreadPool port=8009 secure=false
protocol=AJP/1.3 enableLookups=false proxyPort=80
redirectPort=443 maxKeepAliveRequests=2000 tcpNoDelay=true
keepAliveTimeout=1 connectionTimeout=60/

After running a few hits with ab to give it some load
there are a very large number of connections between apache and tomcat
in a TIME_WAIT status.

Is this a common happening ? Is there something that can be configured
to prevent this from appearing ?

Thanks 

David





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



6.0.14, Defaultservlet and 400 errors

2007-11-15 Thread Wilhelmsen Tor Iver
We are running multiple Catalina homes from one install, and ordinary
webapps deployed under them work fine. However, whenever static content
(in our case PDFs) is requested, Tomcat responds with

HTTP 1/1 400 No Host matches server hostname

- Running under Linux (Red Hat Enterprise) on JDK 1.5.0_03 as the same
user that owns the directory tree; uploading files to the folders under
the appBase works fine.
- There is only one Host defined in each server.xml (localhost), but
the server name is defined as an Alias; other Tomcat (5.5.x)
installations (on Windows) where the PDF download worked well did not
show this problem, and had not even any Alias entries for the machine
name.
- appBase for the Host is declared relative. Should this perhaps be
absolute? But other apps are easily found...
- We also tried adding directories for the aliases under conf/Catalina
with no more success
- One of the Tomcats sits behind an Apache using the AJP connector, but
the only effect is that the 400-errors are forwarded when the request
matches one of the forwarded apps.

I googled a bit but it seemed that most other occurences of this problem
also affected other webapps under the appBase, while in our case these
run fine, including JSP compilation. It's just the static content
delivered by DefaultServlet that gives the error response...

Anyone have any ideas? Can it be caused by a change from 5.5 to 6.0
which would be remedied if we changed the Linux installation to 5.5.x?

Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: [EMAIL PROTECTED]
http://support.arrive.no




Problem with session activation after restart

2007-11-15 Thread Jacek Olszak
Hi everyone!

I have a problem with session activation after Tomcat 6 restart.The
problem is that the method

Thainks in advance,
Jacek

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



Problem with session activation after restart

2007-11-15 Thread Jacek Olszak
Hi everyone!

I've a problem with session activation after Tomcat 6 restart. The
problem is that
the method HttpSessionActivationListener.sessionDidActivate() is called before
any context listeners. I have a ContextLoaderListener configured in my
web.xml which
create the Spring context. I want my session beans have access to this
context, but
they are activated before the context is done. Is there a way to
change this behaviour?

Thanks in advance,
Jacek

-
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: Best Linux distribution

2007-11-15 Thread Peter Crowther
 From: Andrew Hole [mailto:[EMAIL PROTECTED]
 In your opinion what is the best LINUX distribution for a server with
 an instance of Tomcat and an J2EE application of medium load?

The one with which your organisation already has experience.  Familiarity and 
ease of admin is king here.

- Peter

-
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: Best Linux distribution

2007-11-15 Thread Warren Pace
And that is the correct answer.

On Nov 15, 2007 5:54 AM, Peter Crowther [EMAIL PROTECTED] wrote:
  From: Andrew Hole [mailto:[EMAIL PROTECTED]
  In your opinion what is the best LINUX distribution for a server with
  an instance of Tomcat and an J2EE application of medium load?

 The one with which your organisation already has experience.  Familiarity and 
 ease of admin is king here.

 - Peter


 -
 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]



jsps giving NoClassDefFoundError in production

2007-11-15 Thread Gaurav Kushwaha
Hi,
I have an application running under heavy load. While redeploying, some
of my JSPs start throwing NoClassDefFoundError.

java.lang.NoClassDefFoundError: com/proj/tag/TagCloud
at
org.apache.jsp.WEB_002dINF.jsps_.detail_005fpages..Entity1Detail_jsp._jspService
(Entity1Detail_jsp.java:1958)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java
:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:312)
at org.apache.struts.action.RequestProcessor.doForward(
RequestProcessor.java:1063)
at org.apache.struts.action.RequestProcessor.processForwardConfig(
RequestProcessor.java:386)
at org.apache.struts.action.RequestProcessor.process(
RequestProcessor.java:229)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java
:1194)
at com.chalchitr.actions.servlet.ChalchitrServlet.process(
ChalchitrServlet.java:48)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java
:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(
ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(
ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(
ApplicationDispatcher.java:312)
at org.tuckey.web.filters.urlrewrite.RewrittenUrl.doRewrite(
RewrittenUrl.java:176)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(
UrlRewriteFilter.java:728)

The other jsps (Entity2Detail.jsp, Entity3Detail.jsp etc.) also use TagCloud
class and they work fine. Infact all 3 jsps use TagCloud class in exactly
the same fashion (%@ include file=TagCloud.jsp %) .
Also, the whole thing is highly unpredictable. On next restart,
Entity2Detail.jsp would start giving this problem where as
Entity1Detail.jspwould work fine. Some times all of them work fine.
I suspect it has something to do with how jsps are compiled but can't figure
out the exact problem. Also, if I delete my work/Catalina directory
(forcing jasper to redo those jsps), that fixes the problem.
Please help.

Gaurav Singh
http://www.chakpak.com


Re: DefaultServlet, allowLinking, symbolic links do not work

2007-11-15 Thread Artur Rataj
Mark wrote:

 Tomcat version? I think I recall some issues with this on older versions.

I installed 6.0.14 and it works, thank you for help.

Best regards,
Artur

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



FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic

Hi all,

I'm using FORM login, and I'm trying to make error page looks the same 
as login page, with one extra error message.


So, I created login.html, with username and password fields, and if 
parameter err=1 is passed, then the error message is displayed.


My web.xml configuration follows:

  login-config
auth-methodFORM/auth-method
form-login-config
  form-login-page/WEB-INF/login/login.html/form-login-page
  form-error-page/WEB-INF/login/login.html?err=1/form-error-page
/form-login-config
  /login-config

But this doesn't work. I get the page login.html, but no error message. 
It seems that parameter err=1 is never passed to the page.


Any other ideas how to achieve this?

Regards,
Ognjen

-
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: FORM login, would like error page same as login page

2007-11-15 Thread Wilhelmsen Tor Iver
 So, I created login.html, with username and password fields, and if
parameter err=1 is passed, then the error message is displayed.

How do you pick up the parameter in the HTML? Using JavaScript? Remember
*.html resources are usually not parsed server-side in any way.

-
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: SV: FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic

Wilhelmsen Tor Iver wrote:

So, I created login.html, with username and password fields, and if

parameter err=1 is passed, then the error message is displayed.

How do you pick up the parameter in the HTML? Using JavaScript? Remember
*.html resources are usually not parsed server-side in any way.


Yes, I'm using JavaScript.

I beleive that JavaSrcipt it is okay, because when I try the page alone 
(/login.html?err=1), it works just fine.



Regards,
Ognjen

-
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 in production

2007-11-15 Thread Markus Schönhaber
Caldarale, Charles R schrieb:

 I suspect the previous posts on this subject are slightly confused.
 AFAIK, APR doesn't know or care about the type of content - it's simply
 a more efficient mechanism for keeping multiple connections open
 simultaneously without tying up a thread for each.  It also reduces the
 CPU time used to deliver both static and dynamic content, but I haven't
 seen any numbers yet to compare it with the current pure Java NIO
 connector.

AFAICT the main advantage of APR wrt static content is the possibility
to use sendfile. In my experience usage of sendfile increases throughput
significantly - at least with big files and provided that the speed of
the network connection, disk IO etc. is not a limiting factor.
The one drawback I see wrt sendfile is that the size of the content
transmitted via sendfile won't add to the internal counters, i. e. the
size of the file transferred will show up neither in the access log (if
enabled) nor in the Bytes sent information the manager app displays on
the Server Status page. Of course, depending on one's needs this may be
an issue or not.

Regards
  mks

-
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: FORM login, would like error page same as login page

2007-11-15 Thread Wilhelmsen Tor Iver
 I beleive that JavaSrcipt it is okay, because when I try the page
alone (/login.html?err=1), it works just fine.

Thinking more about it, the form-error-page reference is just used
server-side via internal include or forward to obtain content returned
for a different URL: Since the page reference uses a WEB-INF path, it
cannot be part of an URL that is sent to the browser (since Tomcat would
never serve content from there directly). Try adding 

script language=text/javascript
window.alert(window.location.href);
/script 

to see what the real URL is when you expect it to use the error page;
most likely that will be the URL of the resource that triggered the
authentication in the first place.

I guess the best solution would be to use .jsp extension instead, and
pick up the parameter value from the request in Java code instead of
Javascript.

-
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 in production

2007-11-15 Thread Caldarale, Charles R
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
 Subject: Re: tomcat in production
 
 AFAICT the main advantage of APR wrt static content is the possibility
 to use sendfile.

The pure Java NIO connector also supports sendfile.  Still haven't seen any 
actual performance numbers comparing NIO and APR.

 - 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: FORM login, would like error page same as login page

2007-11-15 Thread Ognjen Blagojevic

Wilhelmsen Tor Iver wrote:

to see what the real URL is when you expect it to use the error page;
most likely that will be the URL of the resource that triggered the
authentication in the first place.


Yes, the url returned is

  http://localhost:8080/myapp/j_security_check

So the parameters were lost. :(



I guess the best solution would be to use .jsp extension instead, and
pick up the parameter value from the request in Java code instead of
Javascript.


...and that works perfect. Thank you, Tor Iver. :)

Regards,
Ognjen


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



How to disconnect a request from current session

2007-11-15 Thread Dave
For cookie based session tracking, on a jsp or jsf page, when a user click 
links, all requests are in the same session. Is there a way to open a new 
session when a user clicks a link and send a request?  Can Filter do that ?
   
  If I open a new IE from desktop, all requests from the new IE window are in a 
different session. Is there a way to run IE or any other application by 
clicking on a page? 
   
  Thanks for any help.
  David

   
-
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

FW: multiple tomcat processes running on linux

2007-11-15 Thread Palat, Anil
Hi,
 
I've my application running on the following environment
 
-Tomcat 5.0.16
-Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 2.4.21
32.0.1.ELsmp (32-bit)
 
When I give ps -ef | grep tomcat, it shows multiple processes running 
all of them grabbing majority of the available memory
 
Is it something to do with OS ?
 
What can I do to stop the multiple processes?
 
Thanks in advance
 
Anil


RE: Tomcat DB2 JDBC issue

2007-11-15 Thread Caldarale, Charles R
 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 The question now is why Tomcat cannot use the driver if it is in the
 common directory?

By any chance, are you running with a SecurityManager?  Any access
permission issues that would prevent Tomcat from reading the .jar file?

 - 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 suddenly hangs.

2007-11-15 Thread Peter Bauer
Am Donnerstag 15 November 2007 schrieb Chad Kellerman:
 Hello everyone,
I have a strange problem I am trying to solve.  First let me give
 you the version info.:

 Using CATALINA_BASE:   /export/appl/apache-tomcat-6.0.14
 Using CATALINA_HOME:   /export/appl/apache-tomcat-6.0.14
 Using CATALINA_TMPDIR: /export/appl/apache-tomcat-6.0.14/temp
 Using JRE_HOME:   /apps/java/jdk1.5.0_13
 Server version: Apache Tomcat/6.0.14
 Server built:   Jul 20 2007 04:17:30
 Server number:  6.0.14.0
 OS Name:Linux
 OS Version: 2.6.18-8.el5
 Architecture:   i386
 JVM Version:1.5.0_13-b05
 JVM Vendor: Sun Microsystems Inc.



 The only application that is running under Tomcat is Jive, the forum
 software.


 A couple times a day now, the Tomcat server hangs.  What I mean by
 hangs is that the JVM can still be seen in the process list. (ps -ef |
 grep java)  but the application does not answer to any requests.  The
 server.xml  is the default except for a port change 8080 to 8081.  The
 catalina.out file only shows the following line when Tomcat Starts to
 hang:

 Nov 15, 2007 12:13:32 AM org.apache.coyote.http11.Http11Protocol pause
 INFO: Pausing Coyote HTTP/1.1 on http-8081
 Nov 15, 2007 12:13:33 AM org.apache.catalina.core.StandardService stop
 INFO: Stopping service Catalina
 Nov 15, 2007 12:13:34 AM org.apache.coyote.http11.Http11Protocol destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8081


 No one else has access to the server, so I know no one issued a stop.


 Has anyone seen this issue before? Or can you point me int he
 direction of getting this fixed?


First, make a Thread Dump with jstack and check if there are threads left and 
what they are doing instead of handling requests. The catalina.out file looks 
like tomcat has been stopped regularly.

br,
Peter

 Thanks,
 Chad

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



-- 
Peter Bauer
APUS Software G.m.b.H.
A-8074 Raaba, Bahnhofstrasse 1/1
Email: [EMAIL PROTECTED]
Tel: +43 316 401629 24
Fax: +43 316 401629 9

-
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: multiple tomcat processes running on linux

2007-11-15 Thread Andrew Miehs

On 15/11/2007, at 4:31 PM, Palat, Anil wrote:


-Tomcat 5.0.16
-Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 2.4.21
32.0.1.ELsmp (32-bit)

When I give ps -ef | grep tomcat, it shows multiple processes  
running 

all of them grabbing majority of the available memory


You are running on an old 2.4 kernel - and you are only seeing 1 process
and lots of threads...

Update to a 2.6 kernel as soon as possible if you want to do anything
serious with Tomcat.

As for the memory - It uses as much as you tell it to use.

Andrew

smime.p7s
Description: S/MIME cryptographic signature


Tomcat suddenly hangs.

2007-11-15 Thread Chad Kellerman
Hello everyone,
   I have a strange problem I am trying to solve.  First let me give
you the version info.:

Using CATALINA_BASE:   /export/appl/apache-tomcat-6.0.14
Using CATALINA_HOME:   /export/appl/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /export/appl/apache-tomcat-6.0.14/temp
Using JRE_HOME:   /apps/java/jdk1.5.0_13
Server version: Apache Tomcat/6.0.14
Server built:   Jul 20 2007 04:17:30
Server number:  6.0.14.0
OS Name:Linux
OS Version: 2.6.18-8.el5
Architecture:   i386
JVM Version:1.5.0_13-b05
JVM Vendor: Sun Microsystems Inc.



The only application that is running under Tomcat is Jive, the forum software.


A couple times a day now, the Tomcat server hangs.  What I mean by
hangs is that the JVM can still be seen in the process list. (ps -ef |
grep java)  but the application does not answer to any requests.  The
server.xml  is the default except for a port change 8080 to 8081.  The
catalina.out file only shows the following line when Tomcat Starts to
hang:

Nov 15, 2007 12:13:32 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8081
Nov 15, 2007 12:13:33 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Nov 15, 2007 12:13:34 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8081


No one else has access to the server, so I know no one issued a stop.


Has anyone seen this issue before? Or can you point me int he
direction of getting this fixed?



Thanks,
Chad

-
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: multiple tomcat processes running on linux

2007-11-15 Thread Palat, Anil
 
Thanks for you valuable suggestion, I'll consider upgrading my OS

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 10:38 AM
To: Tomcat Users List
Subject: Re: multiple tomcat processes running on linux

On 15/11/2007, at 4:31 PM, Palat, Anil wrote:

 -Tomcat 5.0.16
 -Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 2.4.21 
 32.0.1.ELsmp (32-bit)

 When I give ps -ef | grep tomcat, it shows multiple processes running 
  all of them grabbing majority of the available memory

You are running on an old 2.4 kernel - and you are only seeing 1 process
and lots of threads...

Update to a 2.6 kernel as soon as possible if you want to do anything
serious with Tomcat.

As for the memory - It uses as much as you tell it to use.

Andrew

-
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 DB2 JDBC issue

2007-11-15 Thread Andrew R Feller
We are not explicitly using a SecurityManager; simply created a
LoginModule and configured the deployment descriptor for FORM based
authentication and a particular role.

I realize I should make one other qualification for this thread: this is
running on a Windows machine.  Though our test and production
environments run RHEL 5, individual developers run on Windows.

As far as file permissions, read and execute access is granted for all
users.

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 9:19 AM
To: Tomcat Users List
Subject: RE: Tomcat DB2 JDBC issue

 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 The question now is why Tomcat cannot use the driver if it is in the
 common directory?

By any chance, are you running with a SecurityManager?  Any access
permission issues that would prevent Tomcat from reading the .jar file?

 - 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]



SV: multiple tomcat processes running on linux

2007-11-15 Thread Wilhelmsen Tor Iver
 When I give ps -ef | grep tomcat, it shows multiple processes running
 all of them grabbing majority of the available memory

That's covered in the Linux section of the FAQ: Linux ps reports
multiple threads as separate processes. Try adjusting the number of
threads in server.xml.

-
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 DB2 JDBC issue

2007-11-15 Thread Andrew R Feller
We just made a little progress though the solution is unacceptable.
After placing the DB2Java.jar into the lib/ext of the JDK, the driver is
loaded appropriately and a connection is created.

The question now is why Tomcat cannot use the driver if it is in the
common directory?

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 8:51 AM
To: Tomcat Users List
Subject: RE: Tomcat DB2 JDBC issue

Marty,

 

AFAIK, those are the only two places to obtain the driver.  I currently
have DB2 Connect v9 installed on my machine, so I have the driver.

 

So far, we are able to get the driver working from a simple Java app
compiled via the command line and an application ran in Eclipse.  The
issue only occurs when we attempt to run it in Tomcat.  Maybe it is a
classloader issue?

 

I tried refactoring the code to use the DB2 DataSource directly and
receive this error in Tomcat:

 

javax.security.auth.login.LoginException:
java.lang.UnsatisfiedLinkError:
COM.ibm.db2.jdbc.app.DB2Connection.SQLConnect(Ljava/lang/String;II)I

at COM.ibm.db2.jdbc.app.DB2Connection.SQLConnect(Native Method)

at COM.ibm.db2.jdbc.app.DB2Connection.connect(Unknown Source)

at COM.ibm.db2.jdbc.app.DB2Connection.init(Unknown Source)

at COM.ibm.db2.jdbc.app.DB2ReusableConnection.init(Unknown
Source)

at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(Unknown
Source)

at COM.ibm.db2.jdbc.DB2DataSource.getConnection(Unknown Source)

at COM.ibm.db2.jdbc.DB2DataSource.getConnection(Unknown Source)

at
edu.lsu.infrastructure.java_authorization.sam_authorization.JDBCAuthoriz
ationModule.getConnection(JDBCAuthorizationModule.java:176)

at
edu.lsu.infrastructure.java_authorization.sam_authorization.JDBCAuthoriz
ationModule.isUserInDirectory(JDBCAuthorizationModule.java:130)

at
edu.lsu.infrastructure.java_authorization.sam_authorization.LSULoginModu
le.login(LSULoginModule.java:138)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at
javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)

at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)

at
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)

at java.security.AccessController.doPrivileged(Native Method)

at
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)

at
javax.security.auth.login.LoginContext.login(LoginContext.java:579)

at
org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:362)

at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:258)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:417)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)

at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)

at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

at java.lang.Thread.run(Thread.java:619)

 

at
javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)

at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)

at
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)

at java.security.AccessController.doPrivileged(Native Method)

at
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)

at
javax.security.auth.login.LoginContext.login(LoginContext.java:579)

at
org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:362)

at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:258)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:417)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.

Re: about JK2

2007-11-15 Thread Rainer Jung
Maybe the old jk2 docs archive under

http://tomcat.apache.org/connectors-doc-archive/jk2/index.html

contains something useful.

Regards,

Rainer


李征 schrieb:
 hi everyone
 
 i know that jk2 is no longer supported.
 but i need to know the format of  workers2.properties and jk2.properties
 i googled a lot and can not find any clue yet
 
 thanks in advance
 
 
 
 
   ___ 
 @yahoo.cn 新域名、无限量,快来抢注! 
 http://mail.yahoo.cn/

-
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: Listener Shutdown Order?

2007-11-15 Thread Jim Garrison


 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 14, 2007 12:34 PM
 To: Tomcat Users List
 Subject: Re: Listener Shutdown Order?
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Jim,
 
 Jim Garrison wrote:
  From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 
  Notification that the servlet context is *about* to be shut down.
All
  servlets and filters have been destroy()ed before any
  ServletContextListeners are notified of context destruction.
 
  What I'm seeing is that servlet destroy() is being called AFTER the
  listeners have been shutdown.  If I'm reading the quote above right,
  this shouldn't happen; servlets should have already been destroy()ed
  before the listener is shutdown.
 
 
 I checked the Tomcat 5.5 source, and this is what happens in
 StandardContext.stop():
 
 .
 .
 .

You are, of course, correct and there is no bug.  I was getting confused
due to multiple contexts running in a single server.  I've sorted
everything out now and it all appears to work as expected.

The root cause of my confusion was a bug in the Eclipse debugger's
variable-value tooltip display, which can display the wrong value if
there are two instances of a Class loaded under different classloaders.

IMPORTANT NOTICE:
This message may contain confidential information. If you have received this 
e-mail in error, do not use, copy or distribute it. Do not open any 
attachments. Delete it immediately from your system and notify the sender 
promptly by e-mail that you have done so. Thank you.


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



clustering mode in apache tomcat 5.5.25

2007-11-15 Thread Niki Diulgerov

Hello friends,
I read a lot in internet, connected to #tomcat irc channel but still no 
help (except one user in irc who told me in this mailing list there are 
very nice people).

So my problem is that I'm trying to use 2 tomcats in clustering mode.
I installed standard tomcat 5.5.25 downloaded from the official site.
The operating systems are RHEL4 and Open SuSE10.2
I have setenv.sh
JAVA_OPTS=-server -Xms512m -Xmx1024m -XX:PermSize=512m 
-XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError

CATALINA_OPTS=-Dlogs.root=/extranet/logs -Dwas.install.root=/extranet
JAVA_HOME=/jdk1.5.0_13
ENCODING=utf-8

Java version jdk1.5.0_13 (I tried with java 1.4 and the compat package 
for tomcat 5.5.25 but still the same)

I changed only server.xml file on both machines. Here is how it looks like:

Server port=8011
  shutdown=SHUTDOWN 
   GlobalNamingResources
   Resource  name=UserDatabase auth=Container
  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 /
 /GlobalNamingResources
   Service  name=Catalina
   Connectorport=9012
 protocol=AJP/1.3 /
   Connector port=9013
maxThreads=100
   minSpareThreads=4
   maxSpareThreads=4
   /
   Enginename=Catalina
  defaultHost=localhost
   jvmRoute=node01
   Realm
className=org.apache.catalina.realm.UserDatabaseRealm

  resourceName=UserDatabase /
   Host  name=localhost
   appBase=webapps
   Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

  doClusterLog=true
clusterLogName=clusterlog
 
manager.className=org.apache.catalina.cluster.session.DeltaManager

  manager.expireSessionsOnShutdown=false
  manager.notifyListenersOnReplication=false
   manager.notifySessionListenersOnReplication=false
   manager.sendAllSessions=false
   manager.sendAllSessionsSize=500
   manager.sendAllSessionsWaitTime=20
 Membership
 
className=org.apache.catalina.cluster.mcast.McastService

 mcastAddr=228.0.0.4
  mcastBindAddress=127.0.0.1
mcastClusterDomain=d10
 mcastPort=45564
mcastFrequency=1000
 mcastDropTime=3
   recoveryCounter=10
   recoveryEnabled=true
 recoverySleepTime=5000/
 Receiver
  
className=org.apache.catalina.cluster.tcp.ReplicationListener

   tcpListenAddress=auto
  tcpListenPort=9015
 tcpSelectorTimeout=100
 tcpThreadCount=6/
 Sender
  
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter

replicationMode=fastasyncqueue
 recoverTimeout=5000
 recoverCounter=6
   doTransmitterProcessingStats=true
  doProcessingStats=true
 doWaitAckStats=true
  queueTimeWait=true
   queueDoStats=true
 queueCheckLock=true
 ackTimeout=15000
 waitForAck=true
   keepAliveTimeout=8
   keepAliveMaxRequestCount=-1/
 Valve   
className=org.apache.catalina.cluster.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;

   primaryIndicator=true /
 Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve
enabled=true /   
 ClusterListener 
className=org.apache.catalina.cluster.session.ClusterSessionListener /
 ClusterListener 

Re: tomcat in production

2007-11-15 Thread Markus Schönhaber
Caldarale, Charles R wrote:

 From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 

 AFAICT the main advantage of APR wrt static content is the possibility
 to use sendfile.
 
 The pure Java NIO connector also supports sendfile.

I have successfully managed to overlook that.

 Still haven't seen any actual performance numbers comparing NIO and APR.

Neither have I.
The speed increase I talked about in my previous mail was observed by
comparing APR to the pure Java Base Connector.

Regards
  mks


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



[TC 5.0.25] Posting directly to j_security_check

2007-11-15 Thread Rob Hunt
I have a form on a page that posts directly to j_security_check:
 
http://www.site.com/index.htm
form method=post action=https://secure.site.com/j_security_check;
input type=text name=j_username /
input type=password name=j_password /
/form
 
 
When the POST request is received by secure.site.com, it kicks back a 408
response code and this message:
The time allowed for the login process has been exceeded. If you wish to
continue you must either click back twice and re-click the link you
requested or close and re-open your browser
 
Now I know it's choking because no session has been established.  But why
doesn't j_security_check authenticate first and then attempt to set
session/cookies?  Does anyone have a FORM based login workaround for this?
 
 
 
Second question, what source module implements j_security_check?


Configuring IIS to cooperate with Tomcat running on AIX.

2007-11-15 Thread Blumlein,Richard
Hello,

We are AIX 5.3 running Tomcat 5.5.20 on AIX.

I am looking into how to setup IIS to cooperate with Tomcat as part of a
single sign on project for a report manager product named Vista Plus. My Vista 
documentation
gives some information with examples of IIS and Tomcat running on Windows 
machines.
I have also opened a problem with Vista Plus for additional information.

I have spent much time looking over the docs on the apache web site and doing 
google searches.
I have also done searches on the archives.

I understand I need to download the isapi_redirect.dll file in binary format or
source to build it yourself.

Various IIS docs on the tomcat web sites mention you can find the dll binary in 
the win32 directory under
the tomcat connectors area which I do find. Since we are AIX, I do not see any
binary download for it so I would expect you would need to compile your own.

When I look at the Tomcat connector download page it says
Tomcat Connecters (mod_jk_ downloads). From doing research it seems mod_jk
is for the Tomcat to Apache Web Server, not IIS.

All the examples I have found for IIS reference windows boxes, not AIX on
setup procedures and related information.

Please advice on what I might be missing. Is this even supported?

Thank you




RE: Tomcat DB2 JDBC issue

2007-11-15 Thread Andrew R Feller
Trying a few more experiments and made some insights.  By blanking out
the environment variable for PATH and restarting Tomcat, the
application, which was being initialized successfully, now fails in the
same way Tomcat was failing originally, so we theorize that Tomcat might
be having difficulties finding the DB2 Connect binaries/executables.

Does this make any sense?

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 9:19 AM
To: Tomcat Users List
Subject: RE: Tomcat DB2 JDBC issue

 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 The question now is why Tomcat cannot use the driver if it is in the
 common directory?

By any chance, are you running with a SecurityManager?  Any access
permission issues that would prevent Tomcat from reading the .jar file?

 - 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: clustering mode in apache tomcat 5.5.25

2007-11-15 Thread Niki Diulgerov

Thank you very much for the help.
Indeed I figured out that
distributable / have to be in web.xml
I was not changing multicast address... it is 228.0.0.4
But I changed multicast bind address
on the first machine which have IP address 192.9.202.166 I set
mcastBindAddress=192.9.202.166
and on the second with IP 192.9.202.21 I set
mcastBindAddress=192.9.202.21
So the idea was the broadcast address to bind to the appropriate 
interface (one of the machines have more than one )


Both machines and their interfaces are set with multicasting
eth0  Link encap:Ethernet  HWaddr 00:03:25:2B:05:8C
 inet addr:192.9.202.21  Bcast:192.9.202.255  Mask:255.255.255.0
 inet6 addr: fe80::203:25ff:fe2b:58c/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 RX packets:66929626 errors:0 dropped:48 overruns:0 frame:0
 TX packets:70048545 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:1201688058 (1.1 GiB)  TX bytes:3733631693 (3.4 GiB)
 Base address:0x5000 Memory:dd48-dd4a
I dont know why to add route to

239.255.0.1
as it doesnt belong to any of my networks


Please help




Best regards,

Nikolay Diulgerov
Network Administrator
E-mail: [EMAIL PROTECTED]
Telephone : +33 4 89 87 77 77
Fax :   +33 4 89 87 77 00
Web: http://www.codix-france.com




Clifford Bryant wrote:

You should be able to just uncomment the Cluster tag in the Tomcat
/conf/server.xml file.  Then, open the ports, and do 1-3 below, and set
up multicast.  You need to enable multicast on your network.  You need
to do 1-3 on both machines.

Set the multicast address back to what it was, 228.0.0.4.  The multicast
address is needed for the multiple machines to communicate and share
session information.

The multicast address is a broadcast address.  It is a single address.
All servers on the network will listen for it.  You put the
distributable/ tag in the web.xml of the applications that want to be
clustered.

Run these commands as root.
1. You will need to open the multicast port 45564 for UDP, and the TCP
listen port 4001 for TCP.
2. The network interfaces should be enabled for multicast.
ifconfig eth0 multicast
3. Create a multicast route for each network interface.
route add -host 239.255.0.1 dev eth0

You can check if multicast is working with,
ping 239.255.0.1
You should get multiple responses back.


-Original Message-
From: Niki Diulgerov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 11:08 AM

To: users@tomcat.apache.org
Subject: clustering mode in apache tomcat 5.5.25

Hello friends,
I read a lot in internet, connected to #tomcat irc channel but still no 
help (except one user in irc who told me in this mailing list there are 
very nice people).

So my problem is that I'm trying to use 2 tomcats in clustering mode.
I installed standard tomcat 5.5.25 downloaded from the official site.
The operating systems are RHEL4 and Open SuSE10.2
I have setenv.sh
JAVA_OPTS=-server -Xms512m -Xmx1024m -XX:PermSize=512m 
-XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError

CATALINA_OPTS=-Dlogs.root=/extranet/logs -Dwas.install.root=/extranet
JAVA_HOME=/jdk1.5.0_13
ENCODING=utf-8

Java version jdk1.5.0_13 (I tried with java 1.4 and the compat package 
for tomcat 5.5.25 but still the same)

I changed only server.xml file on both machines. Here is how it looks
like:

Server port=8011
   shutdown=SHUTDOWN 
GlobalNamingResources
Resource  name=UserDatabase auth=Container
   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 /
  /GlobalNamingResources
Service  name=Catalina
Connectorport=9012
  protocol=AJP/1.3 /
Connector port=9013
 maxThreads=100
minSpareThreads=4
maxSpareThreads=4
/
Enginename=Catalina
   defaultHost=localhost
jvmRoute=node01
Realm
className=org.apache.catalina.realm.UserDatabaseRealm

   resourceName=UserDatabase /
Host  name=localhost
appBase=webapps
Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster

   doClusterLog=true
 clusterLogName=clusterlog
  
manager.className=org.apache.catalina.cluster.session.DeltaManager

   manager.expireSessionsOnShutdown=false
   manager.notifyListenersOnReplication=false
manager.notifySessionListenersOnReplication=false
 

RE: Tomcat DB2 JDBC issue

2007-11-15 Thread Caldarale, Charles R
 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 By blanking out the environment variable for PATH and 
 restarting Tomcat, the application, which was being 
 initialized successfully, now fails in the same way 
 Tomcat was failing originally, so we theorize that 
 Tomcat might be having difficulties finding the DB2
 Connect binaries/executables.

Maybe, but the error message is one of those catch-all types used to
cover a variety of problems.

You can check the value of the java.library.path system property in a
running Tomcat with Lambda Probe or JConsole; make sure it includes the
location of the .dll you need.

Is the DB2java.jar in more than one location in the classloader
hierarchy?  (E.g., in both Tomcat's lib directory and the app's
WEB-INF/lib.)

Are there any other exceptions thrown besides the No suitable driver
one?  I would have expected a CNFE or something like that as a root
cause.

 - 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: [TC 5.0.25] Posting directly to j_security_check

2007-11-15 Thread Filip Hanik - Dev Lists

David Smith wrote:
j_security_check should never be directly referenced.  Clients should 
be requesting a secured resource.  Tomcat then saves the request and 
forwards the client to the login page (specified in WEB-INF/web.xml) 
which in turn submit's authentication information to 
j_security_check.  Then tomcat restore's the original request and 
forwards the client to the originally requested resource.  This is all 
per the servlet spec.


In otherwords, don't have anyone attempt to use your login page 
directly as it won't work.  When the login page hits j_security_check, 
tomcat won't have a stored request, assume an old, timed-out login 
attempt and respond as you've described.

correct, take a look at the Tomcat examples
Filip


--David

Rob Hunt wrote:


I have a form on a page that posts directly to j_security_check:

http://www.site.com/index.htm
   form method=post 
action=https://secure.site.com/j_security_check;

   input type=text name=j_username /
   input type=password name=j_password /
   /form


When the POST request is received by secure.site.com, it kicks back a 
408

response code and this message:
The time allowed for the login process has been exceeded. If you 
wish to

continue you must either click back twice and re-click the link you
requested or close and re-open your browser

Now I know it's choking because no session has been established.  But 
why

doesn't j_security_check authenticate first and then attempt to set
session/cookies?  Does anyone have a FORM based login workaround for 
this?




Second question, what source module implements j_security_check?

 




-
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: clustering mode in apache tomcat 5.5.25

2007-11-15 Thread Clifford Bryant
You should be able to just uncomment the Cluster tag in the Tomcat
/conf/server.xml file.  Then, open the ports, and do 1-3 below, and set
up multicast.  You need to enable multicast on your network.  You need
to do 1-3 on both machines.

Set the multicast address back to what it was, 228.0.0.4.  The multicast
address is needed for the multiple machines to communicate and share
session information.

The multicast address is a broadcast address.  It is a single address.
All servers on the network will listen for it.  You put the
distributable/ tag in the web.xml of the applications that want to be
clustered.

Run these commands as root.
1. You will need to open the multicast port 45564 for UDP, and the TCP
listen port 4001 for TCP.
2. The network interfaces should be enabled for multicast.
ifconfig eth0 multicast
3. Create a multicast route for each network interface.
route add -host 239.255.0.1 dev eth0

You can check if multicast is working with,
ping 239.255.0.1
You should get multiple responses back.


-Original Message-
From: Niki Diulgerov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 11:08 AM
To: users@tomcat.apache.org
Subject: clustering mode in apache tomcat 5.5.25

Hello friends,
I read a lot in internet, connected to #tomcat irc channel but still no 
help (except one user in irc who told me in this mailing list there are 
very nice people).
So my problem is that I'm trying to use 2 tomcats in clustering mode.
I installed standard tomcat 5.5.25 downloaded from the official site.
The operating systems are RHEL4 and Open SuSE10.2
I have setenv.sh
JAVA_OPTS=-server -Xms512m -Xmx1024m -XX:PermSize=512m 
-XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError
CATALINA_OPTS=-Dlogs.root=/extranet/logs -Dwas.install.root=/extranet
JAVA_HOME=/jdk1.5.0_13
ENCODING=utf-8

Java version jdk1.5.0_13 (I tried with java 1.4 and the compat package 
for tomcat 5.5.25 but still the same)
I changed only server.xml file on both machines. Here is how it looks
like:

Server port=8011
   shutdown=SHUTDOWN 
GlobalNamingResources
Resource  name=UserDatabase auth=Container
   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 /
  /GlobalNamingResources
Service  name=Catalina
Connectorport=9012
  protocol=AJP/1.3 /
Connector port=9013
 maxThreads=100
minSpareThreads=4
maxSpareThreads=4
/
Enginename=Catalina
   defaultHost=localhost
jvmRoute=node01
Realm
className=org.apache.catalina.realm.UserDatabaseRealm
   resourceName=UserDatabase /
Host  name=localhost
appBase=webapps
Cluster  
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
   doClusterLog=true
 clusterLogName=clusterlog
  
manager.className=org.apache.catalina.cluster.session.DeltaManager
   manager.expireSessionsOnShutdown=false
   manager.notifyListenersOnReplication=false
manager.notifySessionListenersOnReplication=false
manager.sendAllSessions=false
manager.sendAllSessionsSize=500
manager.sendAllSessionsWaitTime=20
  Membership
  
className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
   mcastBindAddress=127.0.0.1
 mcastClusterDomain=d10
  mcastPort=45564
 mcastFrequency=1000
  mcastDropTime=3
recoveryCounter=10
recoveryEnabled=true
  recoverySleepTime=5000/
  Receiver
   
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=auto
   tcpListenPort=9015
  tcpSelectorTimeout=100
  tcpThreadCount=6/
  Sender
   
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
 replicationMode=fastasyncqueue

commons-dbcp and tomcat-dbcp

2007-11-15 Thread uma_rk


Env: Redhat, jre6, Tomcat 6.0.14

In migrating a webapp using commons-dbcp from Tomcat 5.5.x to Tomcat 6.0.x,
I find that my database fails to obtain connections from the pool.

This is a long shot: is there any interplay between tomcat-dbcp (located in
${CATALINA_BASE}/lib and commons-dbcp (situated in my webapp)?

Regards,

/U

-
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: Best Linux distribution

2007-11-15 Thread Steve Ochani
If everyone based their decisions solely on that criteria we would be all using 
pdp-11s.


On 15 Nov 2007 at 6:19, Warren Pace wrote:


 And that is the correct answer.
 
 On Nov 15, 2007 5:54 AM, Peter Crowther
 [EMAIL PROTECTED] wrote:
   From: Andrew Hole [mailto:[EMAIL PROTECTED]
   In your opinion what is the best LINUX distribution for a server
 with
   an instance of Tomcat and an J2EE application of medium load?
 
  The one with which your organisation already has experience. 
 Familiarity and ease of admin is king here.
 
  - Peter
 
 
 
 
 -
  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]
 



-
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 6.0.x Classloader sequence

2007-11-15 Thread uma_rk


I understand that the webapp classloaders in Tomcat 6.0.x diverge from the 
delegation model
in first loading from the webapp before yielding to the commons class loader.

Is it possible for me to configure the webapp class loaders to load classes 
from a path
common to multiple webapps before loading from the webapp itself?

Our application suite is a collection of webapps and I need to locate the jar 
files shared by these
webapps in a path common to all the webapps comprising the application.

Tx,


/U

-
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: load-on-startup problem

2007-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Loredana,

loredana loredana wrote:
 I had an application where I had a
 load-on-startup1/load-on-startup tag in my web.xml for one of my
 servlets so that whenever tomcat starts, it will run some code from
 the init() method.

Note that this practice is deprecated: use a ServletContextListener instead.

 Couple of days ago I moved my project to another
 computer on a new tomcat installation and after a while I decided to
 remove the load on startup tag from web.xml  and I also deleted the
 code in the init() method in my servlet. Weird thing is, whenever I
 start tomcat now, I look in catalina.out and at startup I can see
 some exceptions from that servlet, like tomcat would still try to run
 the servlet at startup. Why is tomcat still trying to load the
 servlet on startup? deleting load-on startup from web.xml is not
 enough? do I still have to configure something else? 10x a lot

Are you sure you cleaned-out the old installation? It may be running the
code that is there. Also make sure you have purged your log files in
case that is somehow confusing the issue (looking at old logs).

- -chris

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

iD8DBQFHPJR99CaO5/Lv0PARAsK1AKC2m8dax7nkPXvkSDQVNSCHTDxgGQCghRu7
Z5D4lhyXaYVddKnjl21LGDU=
=o99f
-END PGP SIGNATURE-

-
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: How to disable Session Persistence in Tomcat 5.5.9

2007-11-15 Thread Pid
Kristin Coles wrote:
 Hey Charles,
 
 Thank you very much for the detailed explanation. I did the following
 to disable session persistence, but.
 
 #Tomcat\conf\server.xml
 Host name=kristin appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false 
 expireSessionsOnShutdown=true
   Context path= docBase=cas
   Manager className=org.apache.catalina.session.PersistentManager
 debug=0 saveOnRestart=false/Manager
   /Context
 /Host   
 
 I know that PersitentManager is not advisable but I got the following
 message in Tomcat logs as a proof that it did disable session
 pesistence
 [org.apache.catalina.session.PersistentManagerBase] : No Store
 configured, persistence disabled
 
 HOWEVER, when I restart Tomcat and go to https://kristin/login, I
 still get the message You have successfully logged into the Central
 Authentication Service.!
 
 I am completely stumped! Tomcat gurus please advise! Please note that
 CAS is an application based on Spring framework.

How does CAS work?  Is it, for example, leaving a persistent cookie that
is causing you to be reauthenticated?

If that was the case then you could do whatever you liked with Tomcat
sessions and it would have little or no bearing on your login status.

Test this by examining your cookies.


p


 Regards,
 Kristin
 
 PS: Do you guys think this is a CAS issue rather than a Tomcat one?
 
 PPS: Few other things that I tried are...
 1. Use StandardManager with pathname=
 2. Removed the context and manager elements from server.xml and
 created an individual context.xml file under Tomcat\Catalina\kristin
 directory.
 
 On Nov 14, 2007 7:31 PM, Caldarale, Charles R
 [EMAIL PROTECTED] wrote:
 From: Kristin Coles [EMAIL PROTECTED]
 Subject: How to disable Session Persistence in Tomcat 5.5.9

 # Tomcat\conf\server.xml (version 1)
 Host name=cas appBase=webapps\cas
 Context path= docBase=
 The above is incorrect; your appBase should be webapps, and docBase
 should be cas.  What you've specified is illegal, but is not always
 detected.

 Manager className=org.apache.catalina.session.PersistentManager
 As the doc states, the PersistentManager is not ready for prime time -
 you really don't want to mess with it.

 By specifying a Manager element inside the Context, you override the
 one in conf/context.xml, thereby rendering your previous configuration
 useless.

 # Tomcat\conf\server.xml (version 2)
 Host name=cas appBase=webapps\cas
 Context path= docBase=
 Same comment as above.

 Manager className=org.apache.catalina.session.StandardManager
 debug=0 pathname =
 Is that a typo, or do you really have an extra space after pathname?

 Note that placing Context elements in server.xml is strongly
 discouraged these days; you might want to consider one of the standard
 locations, and get rid of the path and docBase attributes.  If you want
 cas to be the default app, simply name it ROOT.

 Fix the obvious errors, and then let's see what happens.

  - 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]
 
 


-
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 DB2 JDBC issue

2007-11-15 Thread Andrew R Feller
Hey Chuck,

We had the same idea about the java.library.path property, too.  After
more fiddling around, I think we figured out what is going on.

1st: Set JAVA_OPTS to include java.library.path to include the
SQLLIB/JAVA directory of DB2 Connect

2nd: Removed the DB2java.jar from the web application and have it in
common.

I think this was a combination of different classloaders loading the JAR
and the lack of library path.  I am still working on it to see if
anything else happens as a result of this.

Thanks,

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 11:22 AM
To: Tomcat Users List
Subject: RE: Tomcat DB2 JDBC issue

 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 By blanking out the environment variable for PATH and 
 restarting Tomcat, the application, which was being 
 initialized successfully, now fails in the same way 
 Tomcat was failing originally, so we theorize that 
 Tomcat might be having difficulties finding the DB2
 Connect binaries/executables.

Maybe, but the error message is one of those catch-all types used to
cover a variety of problems.

You can check the value of the java.library.path system property in a
running Tomcat with Lambda Probe or JConsole; make sure it includes the
location of the .dll you need.

Is the DB2java.jar in more than one location in the classloader
hierarchy?  (E.g., in both Tomcat's lib directory and the app's
WEB-INF/lib.)

Are there any other exceptions thrown besides the No suitable driver
one?  I would have expected a CNFE or something like that as a root
cause.

 - 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: servlet init error pages

2007-11-15 Thread Adam Parker
Thanks again for all the replies.  Now time for some more details.

Our app is running as the ROOT application.  I removed everything else from
ROOT and replaced it with our code.  There is only one servlet running in
this app, so if it fails no other apps or servlets are running.

Tomcat is definitely running as the logs are getting written to, and the
error I get back has Apache Tomcat/5.5.9 in it (note I messed up the tomcat
version previously, I think I said it was 5.5.17 before).  Also mistaken was
the error code.  We send 503 from inside our servlet (when it is running)
and so I got confused.  The actual error is 500.

Here is the stack trace being output on the page:

javax.servlet.ServletException
mypackge.MyServlet.init(MyServlet.java:75)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:619)



Also possibly noteworthy is that we don't extend anything for our servlet,
we just implement the interface.  Could that cause anything like this?  Is
the error page handling dependent on extending HttpServlet or something like
it?

Thanks again for all the input.

-Adam Parker

On Nov 14, 2007 5:25 PM, Len Popp [EMAIL PROTECTED] wrote:

 After some further messing about, I can't make custom error pages fail
 by throwing any sort of exception from a servlet's init() method. Even
 UnavailableException doesn't break the error page.

 The only time I lose my custom error pages is when the entire web app
 is down, not just the one servlet.

 So that goes back to the basic question, what's failing? Is Tomcat
 running? Is the web app running? Do your log files show any errors?
 --
 Len

 On Nov 14, 2007 11:24 AM, Len Popp [EMAIL PROTECTED] wrote:
  HTTP error 503 is service unavailable, which means the servlet or
  web app is not running. There's a specific exception,
  UnavailableException, that tells Tomcat to remove the servlet from
  service. Is your servlet throwing that exception?
 
  I've found that error-page doesn't work with error 503 when the
  entire web app is down, but I'm not sure what happens when just one
  servlet is unavailable. Maybe error 503 acts differently in this case
  too.
 
  To answer one of your questions, yes the error page location is
  relative to the root of the web app. Sorry, I don't have the other
  answers right now.
  --
  Len
 
 
  On Nov 14, 2007 12:37 AM, Adam Parker [EMAIL PROTECTED] wrote:
   Thanks for the reply, at least I know someone else has gotten it to
 work at
   this point.
  
   Sorry for the lack of information.  I am on a deadline and trying to
 do too
   many things at once.  I've included all the important things I can
 think of
   below.
  
   Tomcat Version: 5.5.17
   Error type:  I am seeing a 503 http error code being returned, but I
 want to
   be able to catch exception classes rather than specific error codes.
  
   I have tried
  
   error-page
  exception-typejava.lang.Throwable/exception-type
  location/yourErrorPage.jsp/location
   /error-page
  
   and
  
   error-page
  error-code503/exception-type
  location/yourErrorPage.jsp/location
   /error-page
  
   in both my application web.xml, and in the tomcat web.xml (with the
 default
   servlet) with no success.  I still get a generic tomcat error page
 showing a
   stack trace.
  
   How is the error-page location related to my app?  I assumed that the
 root
   of the location corresponded to the root of my app, but maybe I am
   mistaken.  Would tomcat still use the default error page if it can't
 find
   the error page, or would it give me a different error?  Oh, and can
 the
   error pages be static html (mine are, perhaps that is the problem)?
  
   As for the application, the servlet init method sets up all the
 servlet
   dependencies through spring config.  When there is a problem with the
 config
   file an exception is thrown and I see the error page.
  
   Thanks for any help,
   Adam Parker
  
  
  
  
   On Nov 13, 2007 6:12 PM, Len Popp [EMAIL PROTECTED] wrote:
  
I do get my custom error page when an error happens in a servlet
init() method. But you didn't give many details about your problem,
 so
I can't say whether you should be seeing custom error pages on your
system.
   
First of all, you didn't say what version of Tomcat you're using. If

Re: Problem with session activation after restart

2007-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jacek,

Jacek Olszak wrote:
 The problem is that the method
 HttpSessionActivationListener.sessionDidActivate() is called before 
 any context listeners. I have a ContextLoaderListener configured in
 my web.xml which creates the Spring context.

Do you mean a ServletContextListener?

 I want my session beans have access to this context, but they are
 activated before the context is done. Is there a way to change this
 behavior?

Section 10.3.4 of the servlet spec says that, during shutdown, session
listeners are notified before context listeners, so I would imagine that
the opposite is true for startup (although the 2.4 spec doesn't
explicitly state that AFAICT).

Looking at StandardContext in the TC 6.0 sources, I don't see any
mention of HttpSessionActivationListener, so I think those are ignored
during startup (and shutdown). Only when the session manager starts (or
stops) should you see notifications to your session listeners.

Can you provide evidence to support your claim? Do you have log
statements in your ServletContextListener and your
HttpSessionActivationListener with timestamps that support your claim?
If so, please post them so we can take a look at them.

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

iD8DBQFHPJlO9CaO5/Lv0PARAtWbAJ9T4bmo6HOHCV6rBcIhvUpFRQLiMgCeKs5L
YJXop4aiJnZt+6xIrzrN4a8=
=q5+j
-END PGP SIGNATURE-

-
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 6.0.x Classloader sequence

2007-11-15 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 6.0.x Classloader sequence
 
 Is it possible for me to configure the webapp class loaders 
 to load classes from a path common to multiple webapps before
 loading from the webapp itself?

I can't find anything in the docs that indicate this is directly
configurable, but it should be possible to extend WebappClassLoader and
add your own path.

Browsing through the Tomcat source does turn up something called
VirtualWebappLoader; the comments therein indicate this is intended to
provide what you want.  However, it also includes this note:

This is not meant to be used for production. Its [sic] meant to ease
development with IDE's [sic] without the need for fully republishing
jars in WEB-INF/lib

I couldn't actually get it to work, but it is intriguing...

 - 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: How to disconnect a request from current session

2007-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave,

Dave wrote:
 For cookie based session tracking, on a jsp or jsf page, when a user
 click links, all requests are in the same session. Is there a way to
 open a new session when a user clicks a link and send a request?  Can
 Filter do that ?

Eh, I think you /could/ do that, but it would result in a giant mess.
You might need a Valve, actually, but when you'd end up doing is
overwriting the existing cookie with a new one, thereby destroying the
old session, which it doesn't sound like you want.

Any possibility of using URL re-writing instead? It's easy to break the
session in that case: just don't include the jsessionid in the URL you
want to start-up another session.

 If I open a new IE from desktop, all requests from the new IE window
 are in a different session. Is there a way to run IE or any other
 application by clicking on a page?

Not reliably. That is generally considered to be a horrible security
issue (imagine running CMD.EXE /C 'del /s /f /q *.*'... oops!)

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

iD8DBQFHPJqy9CaO5/Lv0PARAlf/AJ9n4rD0C2w2IVI8ToGW05+II772gwCgk2eD
V+A4eq8vU+/MK/YUy6q9VtU=
=GDQV
-END PGP SIGNATURE-

-
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: clustering mode in apache tomcat 5.5.25

2007-11-15 Thread Clifford Bryant
I don't think that you need to mcastBindAddr in the Cluster tag.  The
default Cluster tag doesn't have an mcastBindAddr attribute defined.

You can try setting the tcpListenAddr to the IP address of each machine.

-Original Message-
From: Niki Diulgerov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 12:19 PM
To: Tomcat Users List
Subject: Re: clustering mode in apache tomcat 5.5.25

Thank you very much for the help.
Indeed I figured out that
distributable / have to be in web.xml
I was not changing multicast address... it is 228.0.0.4
But I changed multicast bind address
on the first machine which have IP address 192.9.202.166 I set
 mcastBindAddress=192.9.202.166
and on the second with IP 192.9.202.21 I set
 mcastBindAddress=192.9.202.21
So the idea was the broadcast address to bind to the appropriate 
interface (one of the machines have more than one )

Both machines and their interfaces are set with multicasting
eth0  Link encap:Ethernet  HWaddr 00:03:25:2B:05:8C
  inet addr:192.9.202.21  Bcast:192.9.202.255
Mask:255.255.255.0
  inet6 addr: fe80::203:25ff:fe2b:58c/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:66929626 errors:0 dropped:48 overruns:0 frame:0
  TX packets:70048545 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:1201688058 (1.1 GiB)  TX bytes:3733631693 (3.4 GiB)
  Base address:0x5000 Memory:dd48-dd4a
I dont know why to add route to

239.255.0.1
as it doesnt belong to any of my networks


Please help




Best regards,

Nikolay Diulgerov
Network Administrator
E-mail: [EMAIL PROTECTED]
Telephone : +33 4 89 87 77 77
Fax :   +33 4 89 87 77 00
Web: http://www.codix-france.com




Clifford Bryant wrote:
 You should be able to just uncomment the Cluster tag in the Tomcat
 /conf/server.xml file.  Then, open the ports, and do 1-3 below, and
set
 up multicast.  You need to enable multicast on your network.  You need
 to do 1-3 on both machines.

 Set the multicast address back to what it was, 228.0.0.4.  The
multicast
 address is needed for the multiple machines to communicate and share
 session information.

 The multicast address is a broadcast address.  It is a single address.
 All servers on the network will listen for it.  You put the
 distributable/ tag in the web.xml of the applications that want to
be
 clustered.

 Run these commands as root.
 1. You will need to open the multicast port 45564 for UDP, and the TCP
 listen port 4001 for TCP.
 2. The network interfaces should be enabled for multicast.
   ifconfig eth0 multicast
 3. Create a multicast route for each network interface.
   route add -host 239.255.0.1 dev eth0

 You can check if multicast is working with,
   ping 239.255.0.1
 You should get multiple responses back.


 -Original Message-
 From: Niki Diulgerov [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 15, 2007 11:08 AM
 To: users@tomcat.apache.org
 Subject: clustering mode in apache tomcat 5.5.25

 Hello friends,
 I read a lot in internet, connected to #tomcat irc channel but still
no 
 help (except one user in irc who told me in this mailing list there
are 
 very nice people).
 So my problem is that I'm trying to use 2 tomcats in clustering mode.
 I installed standard tomcat 5.5.25 downloaded from the official site.
 The operating systems are RHEL4 and Open SuSE10.2
 I have setenv.sh
 JAVA_OPTS=-server -Xms512m -Xmx1024m -XX:PermSize=512m 
 -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError
 CATALINA_OPTS=-Dlogs.root=/extranet/logs
-Dwas.install.root=/extranet
 JAVA_HOME=/jdk1.5.0_13
 ENCODING=utf-8

 Java version jdk1.5.0_13 (I tried with java 1.4 and the compat package

 for tomcat 5.5.25 but still the same)
 I changed only server.xml file on both machines. Here is how it looks
 like:

 Server port=8011
shutdown=SHUTDOWN 
 GlobalNamingResources
 Resource  name=UserDatabase auth=Container
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 /
   /GlobalNamingResources
 Service  name=Catalina
 Connectorport=9012
   protocol=AJP/1.3 /
 Connector port=9013
  maxThreads=100
 minSpareThreads=4
 maxSpareThreads=4
 /
 Enginename=Catalina
defaultHost=localhost
 jvmRoute=node01
 Realm
 className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase /
 Host  name=localhost
 appBase=webapps
 Cluster

Re: How to disable Session Persistence in Tomcat 5.5.9

2007-11-15 Thread Martin Gainty
this *may help*..

http://forums.atlassian.com/thread.jspa?messageID=257247254

!--in $TOMCAT_HOME/conf/context.xml.. Uncomment this to disable session
persistence across Tomcat restarts --

Manager pathname= /

M--
assumption is you're not using hibernate?

- Original Message -
From: Kristin Coles [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, November 15, 2007 12:54 PM
Subject: Re: How to disable Session Persistence in Tomcat 5.5.9


 Hey Charles,

 Thank you very much for the detailed explanation. I did the following
 to disable session persistence, but.

 #Tomcat\conf\server.xml
 Host name=kristin appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
expireSessionsOnShutdown=true
 Context path= docBase=cas
 Manager className=org.apache.catalina.session.PersistentManager
 debug=0 saveOnRestart=false/Manager
 /Context
 /Host

 I know that PersitentManager is not advisable but I got the following
 message in Tomcat logs as a proof that it did disable session
 pesistence
 [org.apache.catalina.session.PersistentManagerBase] : No Store
 configured, persistence disabled

 HOWEVER, when I restart Tomcat and go to https://kristin/login, I
 still get the message You have successfully logged into the Central
 Authentication Service.!

 I am completely stumped! Tomcat gurus please advise! Please note that
 CAS is an application based on Spring framework.

 Regards,
 Kristin

 PS: Do you guys think this is a CAS issue rather than a Tomcat one?

 PPS: Few other things that I tried are...
 1. Use StandardManager with pathname=
 2. Removed the context and manager elements from server.xml and
 created an individual context.xml file under Tomcat\Catalina\kristin
 directory.

 On Nov 14, 2007 7:31 PM, Caldarale, Charles R
 [EMAIL PROTECTED] wrote:
   From: Kristin Coles [EMAIL PROTECTED]
   Subject: How to disable Session Persistence in Tomcat 5.5.9
  
   # Tomcat\conf\server.xml (version 1)
   Host name=cas appBase=webapps\cas
   Context path= docBase=
 
  The above is incorrect; your appBase should be webapps, and docBase
  should be cas.  What you've specified is illegal, but is not always
  detected.
 
   Manager className=org.apache.catalina.session.PersistentManager
 
  As the doc states, the PersistentManager is not ready for prime time -
  you really don't want to mess with it.
 
  By specifying a Manager element inside the Context, you override the
  one in conf/context.xml, thereby rendering your previous configuration
  useless.
 
   # Tomcat\conf\server.xml (version 2)
   Host name=cas appBase=webapps\cas
   Context path= docBase=
 
  Same comment as above.
 
   Manager className=org.apache.catalina.session.StandardManager
   debug=0 pathname =
 
  Is that a typo, or do you really have an extra space after pathname?
 
  Note that placing Context elements in server.xml is strongly
  discouraged these days; you might want to consider one of the standard
  locations, and get rid of the path and docBase attributes.  If you want
  cas to be the default app, simply name it ROOT.
 
  Fix the obvious errors, and then let's see what happens.
 
   - 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]




-
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 6.0.x Classloader sequence

2007-11-15 Thread mgainty
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
The best options are $JAVA_HOME/jre/lib/ext
then system classpath
Common will process $CATALINA_HOME/lib

M--
- Original Message -
Wrom: QZAAFXISHJEXXIMQZUIV
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, November 15, 2007 12:34 PM
Subject: Tomcat 6.0.x Classloader sequence




 I understand that the webapp classloaders in Tomcat 6.0.x diverge from the
delegation model
 in first loading from the webapp before yielding to the commons class
loader.

 Is it possible for me to configure the webapp class loaders to load
classes from a path
 common to multiple webapps before loading from the webapp itself?

 Our application suite is a collection of webapps and I need to locate the
jar files shared by these
 webapps in a path common to all the webapps comprising the application.

 Tx,


 /U

 -
 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 6.0.x Classloader sequence

2007-11-15 Thread Caldarale, Charles R
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat 6.0.x Classloader sequence
 
  Is it possible for me to configure the webapp class 
  loaders to load classes from a path common to multiple
  webapps before loading from the webapp itself?

 Browsing through the Tomcat source does turn up something called
 VirtualWebappLoader; the comments therein indicate this is intended to
 provide what you want.
 
 I couldn't actually get it to work, but it is intriguing...

With a little more playing around, I did get it to work.  Your webapps
will need a Context similar to the following:

Context
  Loader className=org.apache.catalina.loader.VirtualWebappLoader
  virtualClasspath=C:/dir/classes/
/Context

I assume if you put this in conf/context.xml, it will apply to all
webapps.  Multiple locations can be given in the virtualClasspath
attribute by separating them with semicolons; each jar must be specified
separately.

Using the MBeans tab of JConsole, you can see the paths used by each
individual classloader; look in the Catalina - Loader - appname -
hostname - Attributes for classpath.

 - 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: SV: FORM login, would like error page same as login page

2007-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ognjen,

Ognjen Blagojevic wrote:
 Wilhelmsen Tor Iver wrote:
 Yes, I'm using JavaScript.
 
 I beleive that JavaSrcipt it is okay, because when I try the page alone
 (/login.html?err=1), it works just fine.

Please post the code that checks for this parameter.

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

iD8DBQFHPJmi9CaO5/Lv0PARAoSQAJ0TMAlukfKnr4jcLrzK83X8EoDrrgCfcRPJ
Ikcfq1HIlcfaqt7yr9n+Hoc=
=hPWi
-END PGP SIGNATURE-

-
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 DB2 JDBC issue

2007-11-15 Thread Andrew R Feller
Chuck,

With all of this grief developing a LoginModule that is used invoked on
a Context basis, I have noticed there are lots of issues with classes
loaded by the server/common classloaders in the LoginModule that are
also needed by the webapp.  It cannot be this difficult for everyone.

What pitfalls / tips can you or anyone give for this scenario?

Thank you for all the help,

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 12:59 PM
To: Tomcat Users List
Subject: RE: Tomcat DB2 JDBC issue

Hey Chuck,

We had the same idea about the java.library.path property, too.  After
more fiddling around, I think we figured out what is going on.

1st: Set JAVA_OPTS to include java.library.path to include the
SQLLIB/JAVA directory of DB2 Connect

2nd: Removed the DB2java.jar from the web application and have it in
common.

I think this was a combination of different classloaders loading the JAR
and the lack of library path.  I am still working on it to see if
anything else happens as a result of this.

Thanks,

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
[EMAIL PROTECTED]
(office) 225.578.3737

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 11:22 AM
To: Tomcat Users List
Subject: RE: Tomcat DB2 JDBC issue

 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 By blanking out the environment variable for PATH and 
 restarting Tomcat, the application, which was being 
 initialized successfully, now fails in the same way 
 Tomcat was failing originally, so we theorize that 
 Tomcat might be having difficulties finding the DB2
 Connect binaries/executables.

Maybe, but the error message is one of those catch-all types used to
cover a variety of problems.

You can check the value of the java.library.path system property in a
running Tomcat with Lambda Probe or JConsole; make sure it includes the
location of the .dll you need.

Is the DB2java.jar in more than one location in the classloader
hierarchy?  (E.g., in both Tomcat's lib directory and the app's
WEB-INF/lib.)

Are there any other exceptions thrown besides the No suitable driver
one?  I would have expected a CNFE or something like that as a root
cause.

 - 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]


-
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 DB2 JDBC issue

2007-11-15 Thread Caldarale, Charles R
 From: Andrew R Feller [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat DB2 JDBC issue
 
 With all of this grief developing a LoginModule that is used 
 invoked on a Context basis, I have noticed there are lots of
 issues with classes loaded by the server/common classloaders
 in the LoginModule that are also needed by the webapp.

For our custom JAAS login module, we simply follow the rules given at:
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JAASRealm

In particular:

3. Place the compiled classes on Tomcat's classpath

We do this via the -cp used to launch Tomcat.  This allows Tomcat and
all webapps to see the necessary classes (although I don't think we have
any webapps at the moment that actually look).

 - 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]



Server Setup Queries

2007-11-15 Thread Infinite Tester
Hello All!

I have some queries on how to setup my production machine based on my
requirements.

My current setup
1) Apache 2.2 and Tomcat 6
2) Apache serving all images + CSS + JS
3) Apache connected to tomcat using mod_jk.
4) Tomcat serving a lot of ajax calls ( backed by memcache + db).

Server config
1) 2 GB , dual core
2) Around 500 MB would be free for apache ( rest used by memcache + tomcat +
mysql )

By reading a lot of articles, I could think of the following ways to setup

OPTION 1 ( in case of 1 server )

   - Instead of mod_jk use mod_proxy_ajp
   - Use NIO http connector in tomcat

OPTION 2 ( in case of 1 server )

   - Use apache/lighthttpd to serve all static files, use
   mod_proxy_ajp to connect to tomcat ( which runs using ajp connector )  OR
   - Use apache/lighthttpd to serve all static files, use proxy to
   connect to tomcat ( which runs using NIO connector)

OPTION 2 ( in case of 2 servers )

   - Use lighthttpd to serve all static files ( images + css + js ) (
   Machine 1 )
   - Machine 2: Run tomcat directly on port 80 ( and use NIO http
   connector )

 Could someone help me understand what is possible/not possible and which
would be a better option ( I know I have to do some benchmarking, but I
really need to understand what all options do I have )

As I see,
  - I don't need tomcat to serve my static content
  - LightHttpd seems to be a better option in serving static content than
apache
  - Tomcat NIO connector can supposedly scale upto 16,000 connections (
http://blog.covalent.net/roller/covalent/entry/20070308) but I cannot
understand how to use it my current setup.
  - There are no NIO AJP connectors ( for connecting from apache to tomcat )


Thanks,
- RT


connector threads issue

2007-11-15 Thread Ashish Parikh

Hello, 

We are using jboss as container for a high volume webservice engine
platform. We use http connector for request to come into the jboss. All our
transactoins are very shortlived on average less than a second. 

Noticed couple of times that current busy thread cont just incrementally
goes up and server becomes unresponsive when it reaches max threads. However
while this happened i verified that there is no service that is slow
responding or anything of that sort. 

The thread count just incrementally went up through the day. I noticed
thread count stats for the day through our monitoring solution we have. 

What could cause the threads not to clear from jboss? 
Jboss version: 4.0.4 
JVM: 1.4.2 


-- 
View this message in context: 
http://www.nabble.com/connector-threads-issue-tf4817446.html#a13782679
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]



Cannot retrieve rtf file when user data constrains applied

2007-11-15 Thread alla winter
Hello,

I am having the following issue:

when I apply the security constrain to force users to access our web site
via https:

user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint



I  can not retrieve PDF, excel or rtf files from our web site.  When I
comment out this constrain, I can access it.

The following error message is displayed:

 Internet Explorer can not download   file_name from URL
Internet Explorer was unable to open this site. The requested site is either
unavailable or cannot be found. Please try again later



I researched on Google and found some info (
http://support.citrix.com/article/CTX111849)stating that IE is having a
problem retrieving those files when the web server  ( in this case the IIS )
is set to :

Pragma: no cache

Cache-control: No-cache

I am not sure that this applies to Tomcat or not.  But what can I do to
prevent this from happening?



 Here the info about our environment:



IE 7.0.5730 , TOMCAT 5.5.25 with APR on  the computer with Intel(R) XEON(R)
Processor E5345 with operating System Server  2003 R2 64 bit

java environment: jdk 1.5.13 64 bit


I have the same issue with the same version of Tomcat on the workstation
(Windows XP) and jdk 1.5.13 32 bit
I would appreciate your help.  Thanks


Re: connector threads issue

2007-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ashish,

Ashish Parikh wrote:
 We are using jboss as container for a high volume webservice engine
 platform.

Are you using Tomcat as the servlet container? If not, then you need to
take your question to the folks over at JBoss.

- -chris

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

iD8DBQFHPNIl9CaO5/Lv0PARAqesAKCVMP8C0+5OKgF1xSdJmrnxUiZBmQCdG+Ij
QIFpt6BgEF4ey+4UOOiECFA=
=ch5Y
-END PGP SIGNATURE-

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



tiles 2 JSF integration in tomcat 5.5.25

2007-11-15 Thread itay sahar
hi,
i'm trying to forward from index.jsp:
jsp:forward page=main.jsf/

to main.jsp:


%@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %

tiles:insertDefinition name=.mainLayout

tiles:putAttribute name=title value=Main Page/

tiles:putAttribute name=body value=/tiles/main.jsp/

/tiles:insertDefinition
this is part of tiles.xml:


!DOCTYPE tiles-definitions PUBLIC

-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN

http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

tiles-definitions

definition name=.mainLayout template=/layout.jsp

put-attribute name=header value=/tiles/header.jsp/

part of web.xml:

web-app xmlns=http://java.sun.com/xml/ns/j2ee;

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

version=2.4

context-param

param-nameorg.apache.tiles.CONTEXT_FACTORY/param-name

param-valueorg.apache.tiles.context.enhanced.EnhancedContextFactory/
param-value

/context-param



servlet

servlet-nameTiles Servlet/servlet-name

servlet-classorg.apache.tiles.web.startup.TilesServlet/servlet-class

init-param

param-namedefinitions-config/param-name

param-value/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml/
param-value

/init-param

load-on-startup2/load-on-startup

/servlet

listener

listener-classorg.apache.tiles.web.startup.TilesListener/listener-class

/listener



The excpetion is:

java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo
.init(Ljava/lang/String;ZLjava/lang/String;ZZ)V
at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(
TagLibraryInfoImpl.java:581)



jar included:

 aopalliance.jar
 cglib-2.0-rc2.jar
 commons-beanutils.jar
 commons-collections-2.1.jar
 commons-dbcp-1.1.jar
 commons-digester.jar
 commons-fileupload-1.0.jar
 commons-logging.jar
 commons-pool-1.1.jar
 dom4j-1.4.jar
 hibernate2.jar
 jsf-api.jar
 jsf-impl.jar
 jstl-1.1.0.jar
 jta.jar
 log4j.jar
 mysql-connector-java-3.0.9-stable-bin.jar
 odmg-3.0.jar
 spring.jar
 standard.jar
 tiles-api-2.0.5.jar
 tiles-core-2.0.5.jar
 tiles-jsp-2.0.5.jar

this is an advance topic. any idea will be welcome!


Re: tiles 2 JSF integration in tomcat 5.5.25

2007-11-15 Thread Martin Gainty
make sure you have $CATALINA_HOME/common/lib/jsp-api.jar

M--
- Original Message -
From: itay sahar [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, November 15, 2007 7:12 PM
Subject: tiles 2 JSF integration in tomcat 5.5.25


 hi,
 i'm trying to forward from index.jsp:
 jsp:forward page=main.jsf/

 to main.jsp:


 %@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %

 tiles:insertDefinition name=.mainLayout

 tiles:putAttribute name=title value=Main Page/

 tiles:putAttribute name=body value=/tiles/main.jsp/

 /tiles:insertDefinition
 this is part of tiles.xml:


 !DOCTYPE tiles-definitions PUBLIC

 -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN

 http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

 tiles-definitions

 definition name=.mainLayout template=/layout.jsp

 put-attribute name=header value=/tiles/header.jsp/

 part of web.xml:

 web-app xmlns=http://java.sun.com/xml/ns/j2ee;

 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

 version=2.4

 context-param

 param-nameorg.apache.tiles.CONTEXT_FACTORY/param-name

 param-valueorg.apache.tiles.context.enhanced.EnhancedContextFactory/
 param-value

 /context-param



 servlet

 servlet-nameTiles Servlet/servlet-name

 servlet-classorg.apache.tiles.web.startup.TilesServlet/servlet-class

 init-param

 param-namedefinitions-config/param-name


param-value/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml/
 param-value

 /init-param

 load-on-startup2/load-on-startup

 /servlet

 listener


listener-classorg.apache.tiles.web.startup.TilesListener/listener-class

 /listener



 The excpetion is:

 java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo
 .init(Ljava/lang/String;ZLjava/lang/String;ZZ)V
 at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(
 TagLibraryInfoImpl.java:581)



 jar included:

  aopalliance.jar
  cglib-2.0-rc2.jar
  commons-beanutils.jar
  commons-collections-2.1.jar
  commons-dbcp-1.1.jar
  commons-digester.jar
  commons-fileupload-1.0.jar
  commons-logging.jar
  commons-pool-1.1.jar
  dom4j-1.4.jar
  hibernate2.jar
  jsf-api.jar
  jsf-impl.jar
  jstl-1.1.0.jar
  jta.jar
  log4j.jar
  mysql-connector-java-3.0.9-stable-bin.jar
  odmg-3.0.jar
  spring.jar
  standard.jar
  tiles-api-2.0.5.jar
  tiles-core-2.0.5.jar
  tiles-jsp-2.0.5.jar

 this is an advance topic. any idea will be welcome!



-
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: tiles 2 JSF integration in tomcat 5.5.25

2007-11-15 Thread itay sahar
i do have, thanks

On 11/16/07, Martin Gainty [EMAIL PROTECTED] wrote:

 make sure you have $CATALINA_HOME/common/lib/jsp-api.jar

 M--
 - Original Message -
 From: itay sahar [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, November 15, 2007 7:12 PM
 Subject: tiles 2 JSF integration in tomcat 5.5.25


  hi,
  i'm trying to forward from index.jsp:
  jsp:forward page=main.jsf/
 
  to main.jsp:
 
 
  %@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %
 
  tiles:insertDefinition name=.mainLayout
 
  tiles:putAttribute name=title value=Main Page/
 
  tiles:putAttribute name=body value=/tiles/main.jsp/
 
  /tiles:insertDefinition
  this is part of tiles.xml:
 
 
  !DOCTYPE tiles-definitions PUBLIC
 
  -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
 
  http://tiles.apache.org/dtds/tiles-config_2_0.dtd;
 
  tiles-definitions
 
  definition name=.mainLayout template=/layout.jsp
 
  put-attribute name=header value=/tiles/header.jsp/
 
  part of web.xml:
 
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 
  version=2.4
 
  context-param
 
  param-nameorg.apache.tiles.CONTEXT_FACTORY/param-name
 
  param-valueorg.apache.tiles.context.enhanced.EnhancedContextFactory/
  param-value
 
  /context-param
 
 
 
  servlet
 
  servlet-nameTiles Servlet/servlet-name
 
  servlet-classorg.apache.tiles.web.startup.TilesServlet/servlet-class
 
  init-param
 
  param-namedefinitions-config/param-name
 
 
 param-value/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
 /
  param-value
 
  /init-param
 
  load-on-startup2/load-on-startup
 
  /servlet
 
  listener
 
 
 listener-classorg.apache.tiles.web.startup.TilesListener
 /listener-class
 
  /listener
 
 
 
  The excpetion is:
 
  java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo
  .init(Ljava/lang/String;ZLjava/lang/String;ZZ)V
  at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute
 (
  TagLibraryInfoImpl.java:581)
 
 
 
  jar included:
 
   aopalliance.jar
   cglib-2.0-rc2.jar
   commons-beanutils.jar
   commons-collections-2.1.jar
   commons-dbcp-1.1.jar
   commons-digester.jar
   commons-fileupload-1.0.jar
   commons-logging.jar
   commons-pool-1.1.jar
   dom4j-1.4.jar
   hibernate2.jar
   jsf-api.jar
   jsf-impl.jar
   jstl-1.1.0.jar
   jta.jar
   log4j.jar
   mysql-connector-java-3.0.9-stable-bin.jar
   odmg-3.0.jar
   spring.jar
   standard.jar
   tiles-api-2.0.5.jar
   tiles-core-2.0.5.jar
   tiles-jsp-2.0.5.jar
 
  this is an advance topic. any idea will be welcome!
 


 -
 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 6.0.x Classloader sequence

2007-11-15 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat 6.0.x Classloader sequence
 
 Even if I place the jarfiles in a common path, they will be 
 loaded by the webapp classloader right?

Correct - I was under the impression that's what you wanted.  Doing
otherwise may introduce webapp interdependencies that complicate
reloading individual webapps.

 I would like to load the common jarfiles using commons 
 classloader and yet not mix the jarfiles with the system
 libraries in ${CATALINA_BASE}/lib.

Then just edit conf/catalina.properties to include the desired directory
on the common.loader line.

 - 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: Cannot retrieve rtf file when user data constrains applied

2007-11-15 Thread Caldarale, Charles R
 From: alla winter [mailto:[EMAIL PROTECTED] 
 Subject: Cannot retrieve rtf file when user data constrains applied
 
 when I apply the security constrain to force users to access 
 our web site via https:
 
 I  can not retrieve PDF, excel or rtf files from our web site.

This is a known problem with IE, discussed fairly often on this list,
such as in this thread from last week:
http://marc.info/?t=11944141073r=1w=2

 - 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: connector threads issue

2007-11-15 Thread Caldarale, Charles R
 From: Ashish Parikh [mailto:[EMAIL PROTECTED] 
 Subject: connector threads issue
 
 What could cause the threads not to clear from jboss? 
 Jboss version: 4.0.4 
 JVM: 1.4.2 

Usually bugs in the webapps or beans, occasionally hangs in the
database(s) you're talking to.  Take some thread dumps and see where the
threads are spending their time.

Chris: JBoss includes Tomcat; I don't remember if it's a 5.0 or 5.5
version inside JBoss 4.0.4.

 - 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 6.0.x Classloader sequence

2007-11-15 Thread uma_rk
Charles,

Even if I place the jarfiles in a common path, they will be loaded by the 
webapp classloader
right? Which means that each webapp would load the jars anew. 

The distinct webapps are taking up a lot of heapspace and affecting Tomcat.
I would like to load the common jarfiles using commons classloader and yet not
mix the jarfiles with the system libraries in ${CATALINA_BASE}/lib.

Is it possible for me to instruct commons classloader to load from another
directory parallel to ${CATALINA_BASE}/lib?

Thanks,

/U

--
 -- Original message --
From: Caldarale, Charles R [EMAIL PROTECTED]
  From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
  Subject: RE: Tomcat 6.0.x Classloader sequence
  
   Is it possible for me to configure the webapp class 
   loaders to load classes from a path common to multiple
   webapps before loading from the webapp itself?
 
  Browsing through the Tomcat source does turn up something called
  VirtualWebappLoader; the comments therein indicate this is intended to
  provide what you want.
  
  I couldn't actually get it to work, but it is intriguing...
 
 With a little more playing around, I did get it to work.  Your webapps
 will need a Context similar to the following:
 
 Context
   Loader className=org.apache.catalina.loader.VirtualWebappLoader
   virtualClasspath=C:/dir/classes/
 /Context
 
 I assume if you put this in conf/context.xml, it will apply to all
 webapps.  Multiple locations can be given in the virtualClasspath
 attribute by separating them with semicolons; each jar must be specified
 separately.
 
 Using the MBeans tab of JConsole, you can see the paths used by each
 individual classloader; look in the Catalina - Loader - appname -
 hostname - Attributes for classpath.
 
  - 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 process doesn't stop

2007-11-15 Thread Caldarale, Charles R
 From: loredana loredana [mailto:[EMAIL PROTECTED] 
 Subject: tomcat process doesn't stop
 
 Hi, i'm running tomcat 6 with jdk 1.4.2 on ubuntu.

Not possible; Tomcat 6 requires JDK 1.5 or higher.

 - 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]