Re: loadbalancing with mod_jk 1.2.8

2005-01-27 Thread John Smith
 I do know how to stop TC, I said the whole idea for people to know I was
thinking about an HA set up using Apache + TC instances

 The part I am most interested in is,namely; how to make the connector at
run time NOT send NEW connections to one the tomcat instances being used for
loadbalancing

- Original Message -
From: Graham Bleach [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, January 26, 2005 6:04 PM
Subject: Re: loadbalancing with mod_jk 1.2.8


 On Wed, Jan 26, 2005 at 01:41:25PM -0500, John Smith wrote:
   Is there any way to make the connector at run time to NOT send NEW
  connections to one the tomcat instances being used for loadbalancing,
and
  then reload this TC instances once all sessions to it have timed out?

 If you stop the tomcat instance with the command
 $CATALINA_HOME/bin/catalina.sh stop

 I believe tomcat waits for threads to finish what they are doing
 before it actually terminates.


 G
 --
 Privacy is a transient notion. It started when people stopped believing
 that God could see everything and stopped when governments realised there
 was a vacancy to be filled.
 -- Roger Needham

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Freezes unexpectedly

2005-01-27 Thread Diego Espada
Hi,
we are having a serious problem with Tomcat 5.0.27. We have a web server 
in production that is supposed to be 7x24, but it keeps hanging after a 
few hours with no apparent cause. We have to keep restarting it. One 
time, Tomcat logged that it was running out of threads (150), so I 
changed this value to 2000 in the xml server config file and only seemed 
to make things worse... now it hangs more often that before, probably 
twice a day or more.

The hangup does not follow any pattern... it can be at any moment in the 
day, some days it doesn't hang and some days it hangs three or four times.

The log doesn't say anything useful. It seems that Tomcat just stops 
logging after the hang up occurs.

My Tomcat is deployed on a Windows 2000 Server with jdk 1.4.2_05 as a 
service. It is not using the server jvm yet.
Any configurations I should look ? any optimizations ? any clues ?

Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


How does Tomcat know that a browser supports cookies?

2005-01-27 Thread Harry Mantheakis
The API for the HttpServletResponse.encodeURL() method states that the
implementation of this method includes the logic to determine whether the
session ID needs to be encoded in the URL.

How does Tomcat know whether or not a browser supports cookies, or session
tracking is turned off?

Is it simply a case of looking for the presence of a Cookie: header in the
request, and assuming that cookies are enabled if the header is found?

And if that is the case, would I be correct in assuming that browsers (when
permitted by their users) will set Cookie: headers in their requests even
if they do NOT actually have any (previously set) cookies to send back to
the server?

I'm just guessing, of course - and I know I should not generalise about
browsers: I'm thinking of IE, Mozilla/Firefox and Opera.

TIA

Harry Mantheakis


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



rowset.jar can't find properties

2005-01-27 Thread Alexander Wöhrer
Hello,
I'm working on this since 2 days and the suggested solutions on the 
tomcat-user archive didn't help me.

Here is my problem.
The following code works fine under a standalone java app:
WebRowSet c1 = new WebRowSetImpl(); //here comes the exception
Using the same code in Tomcat 4.1.29/Win2k/j2sdk1.4.2 I get the 
following error:

java.lang.NullPointerException
at java.io.Reader.init(Reader.java:61)
at java.io.InputStreamReader.init(InputStreamReader.java:80)
at java.util.Properties.load(Properties.java:266)
at 
java.util.PropertyResourceBundle.init(PropertyResourceBundle.java:9
6)
at com.sun.rowset.JdbcRowSetResourceBundle.init(Unknown Source)
at 
com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(U
nknown Source)
at com.sun.rowset.CachedRowSetImpl.init(Unknown Source)
at com.sun.rowset.WebRowSetImpl.init(Unknown Source)

The rowset.jar (which includes the propertie file) is placed in 
/WEB-INF/lib.

I already tried to place the propertie file in 
/WEB-INF/classes/com/sun/rowset/

As I don't have the source code of the rowset.jar I don't know how they 
try to access the file.

Thanks for your time and help,
Alexander Woehrer
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IIS, Tomcat and NTLM Authentication

2005-01-27 Thread Sue Roe
Hi

 

We have just upgraded our server software, running a Java application, as
follows:

 

From:

IIS 4, Tomcat 4.1 - both running on same server - NT4

To:

IIS 5, Tomcat 4.1 - both running on same server - Windows 2000

 

 The application is to be available to all staff, either over the Intranet
or the Internet.

 

An issue has arisen with NTLM authentication. We extract a users
domain\username details using NTLM Authentication, the code is listed at the
bottom of this e-mail. This mechanism worked 100% on the old configuration.
Unfortunately with the IIS server upgrade and change in OS the
authentication details do not seem to be being picked up in two scenarios. 

 

1.  IE 6, unless Enable Integrated Windows Authentication is disabled.
We don't really want Browser settings to affect access.
2.  IE 5! (We are trying to force client sites to upgrade to IE6, but
still why does the NTLM Authentication break down here?)

 

The IIS settings are as follow:

Default Web Site: 

Anonymous Access - OFF

Basic Authentication - ON

Integrated Windows Authentication - ON

Jakarta Virtual Directory:

Anonymous Access - ON

Basic Authentication - ON

Integrated Windows Authentication - ON

 

If anyone has had any similar experiences or knows of any other mechanism to
retrieve domain/username, it would be great to hear.

 

Thanks

Sue

 

 

Code to Extract domain/user Details


***

String auth = request.getHeader(Authorization);

if (auth == null) {

response.setStatus(response.SC_UNAUTHORIZED);

response.setHeader(WWW-Authenticate, NTLM);

return;

}

String domain = ;

String username = ;

if (auth.startsWith(NTLM )) {

byte[] msg = new
sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));

int off = 0, length, offset;

if (msg[8] == 1){

byte z = 0;

byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L',
(byte)'M', (byte)'S', (byte)'S', (byte)'P',

z,(byte)2, z, z, z, z, z, z, z,(byte)40, z, z, z,

(byte)1, (byte)130, z, z,z, (byte)2, (byte)2,

(byte)2, z, z, z, z, z, z, z, z, z, z, z, z};

response.setHeader(WWW-Authenticate, NTLM  +

new sun.misc.BASE64Encoder().encodeBuffer(msg1));

response.sendError(response.SC_UNAUTHORIZED);

return;

} else if (msg[8] == 3) {

off = 30;

length = msg[off+17]*256 + msg[off+16];

offset = msg[off+19]*256 + msg[off+18];

String remoteHost = new String(msg, offset, length);

length = msg[off+1]*256 + msg[off];

offset = msg[off+3]*256 + msg[off+2];

domain = new String(msg, offset, length);

length = msg[off+9]*256 + msg[off+8];

offset = msg[off+11]*256 + msg[off+10];

username = new String(msg, offset, length);

String employeeNTLogin = domain + \\ + username;

context.log(User NT Login: + employeeNTLogin + ::  +
new Date(System.currentTimeMillis()));

session.setAttribute (Constants.DATABASE,
context.getAttribute(Constants.DATABASE));

Employee userEmployee=null;

// 1. Get Employee Object for NT Login of User  Roles

try {

userEmployee =
myEmployeeDAO_Pool.getDetailsByNTLogin(employeeNTLogin);

} catch (DAOException daoex){

}

session.setAttribute(Constants.USER_EMPLOYEE,
userEmployee);

etc etc

 






**
   ***Disclaimer***

The contents of this Email may be privileged and are confidential. If you are 
not the intended recipient, any disclosure, copying, distribution or any action 
taken or omitted to be taken in reliance on it, is prohibited and may be 
unlawful.

Should you wish to use Email as a mode of communication, CMi plc and its 
subsidiaries are unable to guarantee the security of Email content outside of 
our own computer systems.

This footnote also confirms that this e-mail message has been swept by 
Mimesweeper for the presence of computer viruses. Whilst we run anti-virus 
software, you are solely responsible for ensuring that any  e-mail or 
attachment you receive is virus free. We 

RE: IIS, Tomcat and NTLM Authentication

2005-01-27 Thread Allistair Crossley
Hi,

Sounds like you need to set tomcatAuthentication=false for JK.

Have a look at my blog on upgrading issues here

http://www.adcworks.com/blog/

Allistair.

 -Original Message-
 From: Sue Roe [mailto:[EMAIL PROTECTED]
 Sent: 27 January 2005 11:09
 To: [EMAIL PROTECTED] Apache. Org (tomcat-user@jakarta.apache.org)
 Subject: IIS, Tomcat and NTLM Authentication
 
 
 Hi
 
  
 
 We have just upgraded our server software, running a Java 
 application, as
 follows:
 
  
 
 From:
 
 IIS 4, Tomcat 4.1 - both running on same server - NT4
 
 To:
 
 IIS 5, Tomcat 4.1 - both running on same server - Windows 2000
 
  
 
  The application is to be available to all staff, either over 
 the Intranet
 or the Internet.
 
  
 
 An issue has arisen with NTLM authentication. We extract a users
 domain\username details using NTLM Authentication, the code 
 is listed at the
 bottom of this e-mail. This mechanism worked 100% on the old 
 configuration.
 Unfortunately with the IIS server upgrade and change in OS the
 authentication details do not seem to be being picked up in 
 two scenarios. 
 
  
 
 1.IE 6, unless Enable Integrated Windows Authentication 
 is disabled.
 We don't really want Browser settings to affect access.
 2.IE 5! (We are trying to force client sites to upgrade 
 to IE6, but
 still why does the NTLM Authentication break down here?)
 
  
 
 The IIS settings are as follow:
 
 Default Web Site: 
 
 Anonymous Access - OFF
 
 Basic Authentication - ON
 
 Integrated Windows 
 Authentication - ON
 
 Jakarta Virtual Directory:
 
 Anonymous Access - ON
 
 Basic Authentication - ON
 
 Integrated Windows 
 Authentication - ON
 
  
 
 If anyone has had any similar experiences or knows of any 
 other mechanism to
 retrieve domain/username, it would be great to hear.
 
  
 
 Thanks
 
 Sue
 
  
 
  
 
 Code to Extract domain/user Details
 
 **
 **
 ***
 
 String auth = request.getHeader(Authorization);
 
 if (auth == null) {
 
 response.setStatus(response.SC_UNAUTHORIZED);
 
 response.setHeader(WWW-Authenticate, NTLM);
 
 return;
 
 }
 
 String domain = ;
 
 String username = ;
 
 if (auth.startsWith(NTLM )) {
 
 byte[] msg = new
 sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
 
 int off = 0, length, offset;
 
 if (msg[8] == 1){
 
 byte z = 0;
 
 byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L',
 (byte)'M', (byte)'S', (byte)'S', (byte)'P',
 
 z,(byte)2, z, z, z, z, z, z, 
 z,(byte)40, z, z, z,
 
 (byte)1, (byte)130, z, z,z, (byte)2, (byte)2,
 
 (byte)2, z, z, z, z, z, z, z, z, z, z, z, z};
 
 response.setHeader(WWW-Authenticate, NTLM  +
 
 new 
 sun.misc.BASE64Encoder().encodeBuffer(msg1));
 
 response.sendError(response.SC_UNAUTHORIZED);
 
 return;
 
 } else if (msg[8] == 3) {
 
 off = 30;
 
 length = msg[off+17]*256 + msg[off+16];
 
 offset = msg[off+19]*256 + msg[off+18];
 
 String remoteHost = new String(msg, 
 offset, length);
 
 length = msg[off+1]*256 + msg[off];
 
 offset = msg[off+3]*256 + msg[off+2];
 
 domain = new String(msg, offset, length);
 
 length = msg[off+9]*256 + msg[off+8];
 
 offset = msg[off+11]*256 + msg[off+10];
 
 username = new String(msg, offset, length);
 
 String employeeNTLogin = domain + \\ + username;
 
 context.log(User NT Login: + 
 employeeNTLogin + ::  +
 new Date(System.currentTimeMillis()));
 
 session.setAttribute (Constants.DATABASE,
 context.getAttribute(Constants.DATABASE));
 
 Employee userEmployee=null;
 
 // 1. Get Employee Object for NT Login of 
 User  Roles
 
 try {
 
 userEmployee =
 myEmployeeDAO_Pool.getDetailsByNTLogin(employeeNTLogin);
 
 } catch (DAOException daoex){
 
 }
 
 session.setAttribute(Constants.USER_EMPLOYEE,
 userEmployee);
 
 etc etc
 
  
 
 **
 **
 
 
 
 
 **
***Disclaimer***
 
 The contents of this Email may be privileged and are 
 confidential. If you are not the intended 

RE: IIS, Tomcat and NTLM Authentication

2005-01-27 Thread Allistair Crossley
Sorry! just noticed you are not moving to TC 5. Perhaps this does not solve 
your problem afterall.

 -Original Message-
 From: Allistair Crossley 
 Sent: 27 January 2005 11:28
 To: Tomcat Users List
 Subject: RE: IIS, Tomcat and NTLM Authentication
 
 
 Hi,
 
 Sounds like you need to set tomcatAuthentication=false for JK.
 
 Have a look at my blog on upgrading issues here
 
 http://www.adcworks.com/blog/
 
 Allistair.
 
  -Original Message-
  From: Sue Roe [mailto:[EMAIL PROTECTED]
  Sent: 27 January 2005 11:09
  To: [EMAIL PROTECTED] Apache. Org 
 (tomcat-user@jakarta.apache.org)
  Subject: IIS, Tomcat and NTLM Authentication
  
  
  Hi
  
   
  
  We have just upgraded our server software, running a Java 
  application, as
  follows:
  
   
  
  From:
  
  IIS 4, Tomcat 4.1 - both running on same server - NT4
  
  To:
  
  IIS 5, Tomcat 4.1 - both running on same server - Windows 2000
  
   
  
   The application is to be available to all staff, either over 
  the Intranet
  or the Internet.
  
   
  
  An issue has arisen with NTLM authentication. We extract a users
  domain\username details using NTLM Authentication, the code 
  is listed at the
  bottom of this e-mail. This mechanism worked 100% on the old 
  configuration.
  Unfortunately with the IIS server upgrade and change in OS the
  authentication details do not seem to be being picked up in 
  two scenarios. 
  
   
  
  1.  IE 6, unless Enable Integrated Windows Authentication 
  is disabled.
  We don't really want Browser settings to affect access.
  2.  IE 5! (We are trying to force client sites to upgrade 
  to IE6, but
  still why does the NTLM Authentication break down here?)
  
   
  
  The IIS settings are as follow:
  
  Default Web Site: 
  
  Anonymous Access - OFF
  
  Basic Authentication - ON
  
  Integrated Windows 
  Authentication - ON
  
  Jakarta Virtual Directory:
  
  Anonymous Access - ON
  
  Basic Authentication - ON
  
  Integrated Windows 
  Authentication - ON
  
   
  
  If anyone has had any similar experiences or knows of any 
  other mechanism to
  retrieve domain/username, it would be great to hear.
  
   
  
  Thanks
  
  Sue
  
   
  
   
  
  Code to Extract domain/user Details
  
  **
  **
  ***
  
  String auth = request.getHeader(Authorization);
  
  if (auth == null) {
  
  response.setStatus(response.SC_UNAUTHORIZED);
  
  response.setHeader(WWW-Authenticate, NTLM);
  
  return;
  
  }
  
  String domain = ;
  
  String username = ;
  
  if (auth.startsWith(NTLM )) {
  
  byte[] msg = new
  sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
  
  int off = 0, length, offset;
  
  if (msg[8] == 1){
  
  byte z = 0;
  
  byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L',
  (byte)'M', (byte)'S', (byte)'S', (byte)'P',
  
  z,(byte)2, z, z, z, z, z, z, 
  z,(byte)40, z, z, z,
  
  (byte)1, (byte)130, z, z,z, 
 (byte)2, (byte)2,
  
  (byte)2, z, z, z, z, z, z, z, z, z, 
 z, z, z};
  
  response.setHeader(WWW-Authenticate, NTLM  +
  
  new 
  sun.misc.BASE64Encoder().encodeBuffer(msg1));
  
  response.sendError(response.SC_UNAUTHORIZED);
  
  return;
  
  } else if (msg[8] == 3) {
  
  off = 30;
  
  length = msg[off+17]*256 + msg[off+16];
  
  offset = msg[off+19]*256 + msg[off+18];
  
  String remoteHost = new String(msg, 
  offset, length);
  
  length = msg[off+1]*256 + msg[off];
  
  offset = msg[off+3]*256 + msg[off+2];
  
  domain = new String(msg, offset, length);
  
  length = msg[off+9]*256 + msg[off+8];
  
  offset = msg[off+11]*256 + msg[off+10];
  
  username = new String(msg, offset, length);
  
  String employeeNTLogin = domain + \\ 
 + username;
  
  context.log(User NT Login: + 
  employeeNTLogin + ::  +
  new Date(System.currentTimeMillis()));
  
  session.setAttribute (Constants.DATABASE,
  context.getAttribute(Constants.DATABASE));
  
  Employee userEmployee=null;
  
  // 1. Get Employee Object for NT Login of 
  User  Roles
  
  try {
  
  userEmployee =
  myEmployeeDAO_Pool.getDetailsByNTLogin(employeeNTLogin);
  
  } catch 

mod_jk2 + Apache 2.0.49 + Tomcat 5.0.19

2005-01-27 Thread Arantza Lozano
Hi,
 
I´m configuring mod_jk2 with Apache 2.0.49 and Tomcat 5.0.19
I've read a lot of documentation but I still have doubts about which 
configuration is better. This one:
 
Location /application/*
JkUriSet group ajp13:localhost:8009 
/Location
 
or this one: 
 
[uri:www.home.org/application/*]
group=ajp13:localhost:8009
 
I've read that when using the JkUriSet commands within a Location block the 
configuration gets confused 
between vhosts. Is that true? Why? 
 
I prefer the first configuration because I want to centralize the configuration 
independently in each Virtualhost
instead of having all uri mappings in the workers2.properties file.
 
Could you help me please?
 
Thanks in advanced.
 
Arantza

**  DISCLAIMER ***

This message may contain confidential, proprietary or legally privileged 
information. 
If you are not the intended recipient of this message, please notify it to the 
sender and delete without resending or backing it, as it is legally prohibited.

**  AVISO LEGAL **

Este mensaje puede contener información confidencial, en propiedad o legalmente 
protegida.
Si usted no es el destinatario, le rogamos lo comunique al remitente y proceda 
a borrarlo, sin reenviarlo ni conservarlo, ya que su uso no autorizado está 
prohibido legalmente.
 
**



RHEL, mysql 4.1.9 tomcat 5028, form authentication login failure.

2005-01-27 Thread Pawson, David
After chasing for a day, a nasty arose I thought
others might like to know of.

rhel has /etc/hosts localhost entry as

127.0.0.1   localhost.localdomain localhost


If you use form authentication, with server.xml entries such as

Realm  className=org.apache.catalina.realm.JDBCRealm 
  debug=0  
  driverName=com.mysql.jdbc.Driver
  connectionURL=jdbc:mysql://localhost/tcusers
  connectionName=tomcat 
  connectionPassword=s
  userTable=x 
  userNameCol=y 
  userCredCol=z
 
  /



then the connection is most likely to fail, not allowed, mysql error indicating
that this user is invalid as [EMAIL PROTECTED]

reverse the /etc/hosts entry such that localhost is found first
and it works.

127.0.0.1localhost localhost.localdomain

Sheesh.



regards DaveP.

** snip here **








Regards DaveP.

 snip here *

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Freezes unexpectedly

2005-01-27 Thread VTR Ravi Kumar
This might be something related to number of simultaneous users 
increasing some threshold.

Similar thing happens in our intranet server also and at that time a 
message like Internal Server Error. Your servlet container is bing 
upgraded ... appears.

VTR Ravi Kumar.

Diego Espada wrote:
Hi,
we are having a serious problem with Tomcat 5.0.27. We have a web 
server in production that is supposed to be 7x24, but it keeps hanging 
after a few hours with no apparent cause. We have to keep restarting 
it. One time, Tomcat logged that it was running out of threads (150), 
so I changed this value to 2000 in the xml server config file and only 
seemed to make things worse... now it hangs more often that before, 
probably twice a day or more.

The hangup does not follow any pattern... it can be at any moment in 
the day, some days it doesn't hang and some days it hangs three or 
four times.

The log doesn't say anything useful. It seems that Tomcat just stops 
logging after the hang up occurs.

My Tomcat is deployed on a Windows 2000 Server with jdk 1.4.2_05 as a 
service. It is not using the server jvm yet.
Any configurations I should look ? any optimizations ? any clues ?

Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2005-01-27 Thread Parsons Technical Services
Check the configuration:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
5.5 has a different set up than 5.0 .
You also need a resource link. See:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.html
at the bottom of the page.
It has also be noted on the list that the odbc drivers are not suited for 
production. But this will not cause your problem.

Doug
- Original Message - 
From: Chirag [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 1:15 AM
Subject: Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'


Software
jakarta-tomcat-5.5.2
JDK 1.5
MS Access 2000
Requirements
Connection Pooling in Tomcat
Problem
I inserted a resource Tag in server.xml file
Resource name=aaa type=javax.sql.DataSource/ ResourceParams 
name=aaa parameter   namemaxWait/name   value5000/value 
/parameter parameter   namemaxActive/name   value4/value 
/parameter parameter   namepassword/name   valuepassword/value 
/parameter parameter   nameurl/name   valuejdbc:odbc:aaa/value 
/parameter parameter   namedriverClassName/name 
valuesun.jdbc.odbc.JdbcOdbcDriver/value /parameter parameter 
namemaxIdle/name   value2/value /parameter parameter 
nameusername/name   valueusername/value /parameter 
/ResourceParams

I also inserted the following line in web.xml.
   resource-ref  res-ref-nameaaa/res-ref-name 
res-typejavax.sql.DataSource/res-type 
res-authContainer/res-auth   /resource-ref

After that I tried to access the java.sql.Connection Object by the 
following code in JSP

javax.naming.Context initContext = new 
javax.naming.InitialContext();javax.naming.Context envContext = 
(javax.naming.Context)initContext.lookup(java:/comp/env);javax.sql.DataSource 
ds = (javax.sql.DataSource)envContext.lookup(aaa);java.sql.Connection 
conn = ds.getConnection();System.out.println(conn);conn.close();

The following Exception occured
HTTP Status 
00 -   
type Exception report message  description The server encountered an 
internal error () that prevented it from fulfilling this request. 
exception  javax.servlet.ServletException: Cannot create JDBC driver of 
class '' for connect URL 'null' 
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) 
org.apache.jsp.B2bSite.test_jsp._jspService(org.apache.jsp.B2bSite.test_jsp:105) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
temp.loginServlet.doFilter(loginServlet.java:34)  root cause 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver 
of class '' for connect URL 'null' 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780) 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) 
org.apache.jsp.B2bSite.test_jsp._jspService(org.apache.jsp.B2bSite.test_jsp:88) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:296) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
temp.loginServlet.doFilter(loginServlet.java:34)  note The full stack 
trace of the root cause is available
in the Apache Tomcat/5.5.2 
ogs.   
Apache Tomcat/5.5.2

Thanks in advance
CSJakharia

Subscribe to bermudaEmail:  [input]  [input]  Browse Archives at 
groups-beta.google.com


-
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term' 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Markus Schönhaber
Punit Duggal wrote:
What language is this ??
Dutch.
It would really be nice if those bounce-messages could get filtered out. 
I received 40 of them since Jan 24. which is about 15% of the overall 
traffic on the list since then.

Regards
  mks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Realms getting confused in context reload

2005-01-27 Thread Larry Meadors
I was equally surprised to see this behavior, but my hat is off to the
people who read this specification, and implemented it - the RFCs are
a can of worms.

The RFC for this (#2617 - HTTP Authentication: Basic and Digest
Access Authentication - http://www.ietf.org/rfc/rfc2617.txt) says
that The realm directive (case-insensitive) is required for all
authentication schemes that issue a challenge. The realm value
(case-sensitive), in combination with the canonical root URL (the
absoluteURI for the server whose abs_path is empty; see section 5.1.2
of [2]) of the server being accessed, defines the protection space.

The reference to [2] there is to RFC #2616 - Hypertext Transfer
Protocol -- HTTP/1.1 (http://www.ietf.org/rfc/rfc2616.txt), and
section 5.1.2 of that says nothing about abs_path, which is defined in
RFC #2396 - Uniform Resource Identifiers (URI): Generic Syntax
(http://www.ietf.org/rfc/rfc2396.txt), and says that abs_path is
essentially any path starting with a / character.

Bottom line: Server name + Realm name = protection space.

The protocol HTTP knows nothing of contexts, so when we define a realm
in tomcat, and do not specify a name that includes the context, this
should be expected.

It would be nice if there were a way in tomcat to say include the
context in the authentication realm name.

Larry


On Wed, 26 Jan 2005 15:31:46 -0700, Brandon Goodin
[EMAIL PROTECTED] wrote:
 Here is what solved this. My web.xml in the admin and in the customer
 app were defined as follows:
 
 login-config
 auth-methodBASIC/auth-method
 realm-nameOrder Inquiry/realm-name
 /login-config
 
 Apparently in tomcat you cannot have two contexts with a web.xml that
 shares the the same login-config/realm-name. The behavior is VERY
 bizarre. It would seem that the right way to deal with this would be
 to identify the realms based on context. So, if i use the same realm
 name in my web.xml it is totally irrelevant, because the realm is
 scoped in the context.
 
 Is this a bug?
 
 Brandon
 
 On Wed, 26 Jan 2005 11:51:54 -0700, Brandon Goodin
 [EMAIL PROTECTED] wrote:
  I have some strange behavior showing up with Tomcat 5.0.30.
 
  I have a host configured with two contexts. The contexts are deployed
  as wars. But, they have configuration information in the server.xml.
  Each context has it's own realm defined within the context tag. The
  contexts are named /admin and /customer. The /customer context
  is configured to use a DatasourceRealm for authentication. The
  /admin is configured to use a custom realm called
  ReverseProxyRealm5. Both contexts share a jndi datasource resource
  defined in the DefaultContext tag.
 
  The odd behavior that i am experiencing happens during an auto reload
  of the context after both of the war files have been changed. Once the
  contexts have reloaded and the new war files have been autoDeployed I
  lose the use of my ReverseProxyRealm5 on the admin context.  But, not
  only do i lose it, it also switches to using the DatasourceRealm as
  defined in the customer context.
 
  After i  stop and start tomcat everything is fine again. I have tested
  this out running Tomcat from the command line and within eclipse with
  the same resulting behavior.
 
  I deleted the  /conf/Catalina directory and the /work/Catalina
  directory for good  measure. But, all the behavior continues.
 
  Attached is my server.xml host file without the sensitive info.
 
  Host name=oi debug=0 autoDeploy=true
  appBase=D:\myappbase\projects\oi\dist\war
 
  Logger className=org.apache.catalina.logger.FileLogger
  directory=logs prefix=orderinquiry_log. suffix=.txt
  timestamp=true /
 
  DefaultContext
  Resource name=jdbc/oi auth=Container
  type=javax.sql.DataSource /
 
  ResourceParams name=jdbc/oi
  parameter
  namefactory/name
  value
  org.apache.commons.dbcp.BasicDataSourceFactory
  /value
  /parameter
  parameter
  namedriverClassName/name
  valuecom.ibm.as400.access.AS400JDBCDriver/value
  /parameter
  parameter
  nameurl/name
  value
  jdbc:as400://some.url.here.org;naming=system;date 
  format=iso
  /value
  /parameter
  parameter
  nameusername/name
  valuedudesusername/value
  /parameter
  parameter
  namepassword/name
  valuedudespassword/value
  /parameter
  parameter
  namemaxActive/name
  value20/value
  /parameter
  parameter
  namemaxIdle/name
  value10/value
  /parameter
  parameter
  namemaxWait/name
  value-1/value
   

Re: RHEL, mysql 4.1.9 tomcat 5028, form authentication login failure.

2005-01-27 Thread David Smith
Or grant privileges on the database to 'x'@'localhost' and 
'x'@'localhost.localdomain'.  Then give both accounts the same 
password.  It won't matter which one mysql sees because they'll both work. 

For the record, mysql does a reverse lookup of the host and makes that 
part of the credentials matching it up with the host field in the 
mysql.user table.  I suppose you could use 'x'@'localhost%', but what's 
to stop some fool from naming his system 'localhost-spoof.mydomain.com' 
and attempting a hack.

--David
Pawson, David wrote:
After chasing for a day, a nasty arose I thought
others might like to know of.
rhel has /etc/hosts localhost entry as
127.0.0.1   localhost.localdomain localhost
If you use form authentication, with server.xml entries such as
Realm  className=org.apache.catalina.realm.JDBCRealm 
	  debug=0  
	  driverName=com.mysql.jdbc.Driver
	  connectionURL=jdbc:mysql://localhost/tcusers
	  connectionName=tomcat 
	  connectionPassword=s
	  userTable=x 
	  userNameCol=y 
	  userCredCol=z

  /

then the connection is most likely to fail, not allowed, mysql error indicating
that this user is invalid as [EMAIL PROTECTED]
reverse the /etc/hosts entry such that localhost is found first
and it works.
127.0.0.1localhost localhost.localdomain
Sheesh.

regards DaveP.
** snip here **



Regards DaveP.
 snip here *
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Using native and ld_library_path

2005-01-27 Thread Caldarale, Charles R
 From: Andreas Andersson [mailto:[EMAIL PROTECTED]
 Subject: Re: Using native and ld_library_path
 
 I never use System.loadLibrary() in the javacode that does 
 work (outside tomcat), do I have to?

Take a look at:
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/step1.html

 - Chuck


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: mod_jk2 + Apache 2.0.49 + Tomcat 5.0.19

2005-01-27 Thread Cox, Charlie
Jk2 is deprecated, so you may want to look at mod_jk 1.2.8 which has all the 
jk2 enhancements(but still uses the jk syntax).

If you still need to use jk2, the Location matching works fine with 2.0.49. I 
have been using it for quite a while now with multiple vhosts.

Charlie

 -Original Message-
 From: Arantza Lozano [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 27, 2005 6:48 AM
 To: tomcat-user@jakarta.apache.org
 Subject: mod_jk2 + Apache 2.0.49 + Tomcat 5.0.19
 
 Hi,
 
 I´m configuring mod_jk2 with Apache 2.0.49 and Tomcat 5.0.19
 I've read a lot of documentation but I still have doubts about which
 configuration is better. This one:
 
 Location /application/*
 JkUriSet group ajp13:localhost:8009
 /Location
 
 or this one:
 
 [uri:www.home.org/application/*]
 group=ajp13:localhost:8009
 
 I've read that when using the JkUriSet commands within a Location block the
 configuration gets confused
 between vhosts. Is that true? Why?
 
 I prefer the first configuration because I want to centralize the
 configuration independently in each Virtualhost
 instead of having all uri mappings in the workers2.properties file.
 
 Could you help me please?
 
 Thanks in advanced.
 
 Arantza
 
 **  DISCLAIMER ***
 
 This message may contain confidential, proprietary or legally privileged
 information.
 If you are not the intended recipient of this message, please notify it to the
 sender and delete without resending or backing it, as it is legally
 prohibited.
 
 **  AVISO LEGAL **
 
 Este mensaje puede contener información confidencial, en propiedad o
 legalmente protegida.
 Si usted no es el destinatario, le rogamos lo comunique al remitente y proceda
 a borrarlo, sin reenviarlo ni conservarlo, ya que su uso no autorizado está
 prohibido legalmente.
 
 **


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RHEL, mysql 4.1.9 tomcat 5028, form authentication login failure.

2005-01-27 Thread Pawson, David
 

-Original Message-
From: David Smith

Or grant privileges on the database to 'x'@'localhost' and 
'x'@'localhost.localdomain'.  Then give both accounts the 
same password.  It won't matter which one mysql sees 
because they'll both work. 

Thanks, easier than tweaking each new install of rhel.


For the record, mysql does a reverse lookup of the host and 
makes that part of the credentials matching it up with the 
host field in the mysql.user table. 

I added a note to the mysql man pages, hopefully might
trigger others to avoid this one.

regards DaveP.

** snip here **

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Two versions of Tomcat running on the same pc at the same time

2005-01-27 Thread Inma Marín López
Hello!!!
  
   I would like to have two versions of Tomcat (Tomcat 5.0.25 and Tomcat 
5.5.4) running on the same pc at the same time. Is it possible???
Firstly, I have tried to install Tomcat 5.0.25 first and then Tomcat 5.5.4, but 
when launching either Tomcat, Tomcat 5.5.4 is executing.
Secondly, I have tried to install Tomcat 5.0.25 first, with Start menu items 
disabled, so as to launch it manually. Then, I have installed Tomcat 5.5.4 with 
Start menu items enabled, because it has not a startup/shutdown.bat file. 
In this case, I can only have one Tomcat version executing at the same time. 
Maybe, the problem is related to the service Tomcat5 which has the same name 
in the two Tomcat versions, but only one is installed.

I am not sure if I am following the correct steps.

Could you be so kind as to help me, please?

Thanks in advance.
Cheers,
Inma Marín.

Re: Two versions of Tomcat running on the same pc at the same time

2005-01-27 Thread Viorel Dragomir
See the server.xml and search for 8080 / 8005 / 8009
You can't execute two servers for the same port[s] so you must change this 
value for the second installation.



Viorel Dragomir

.
..
---



- Original Message - 
From: Inma Marín López 
To: tomcat-user@jakarta.apache.org 
Sent: Thursday, January 27, 2005 16:07
Subject: Two versions of Tomcat running on the same pc at the same time


Hello!!!
  
   I would like to have two versions of Tomcat (Tomcat 5.0.25 and Tomcat 
5.5.4) running on the same pc at the same time. Is it possible???
Firstly, I have tried to install Tomcat 5.0.25 first and then Tomcat 5.5.4, but 
when launching either Tomcat, Tomcat 5.5.4 is executing.
Secondly, I have tried to install Tomcat 5.0.25 first, with Start menu items 
disabled, so as to launch it manually. Then, I have installed Tomcat 5.5.4 with 
Start menu items enabled, because it has not a startup/shutdown.bat file. 
In this case, I can only have one Tomcat version executing at the same time. 
Maybe, the problem is related to the service Tomcat5 which has the same name 
in the two Tomcat versions, but only one is installed.

I am not sure if I am following the correct steps.

Could you be so kind as to help me, please?

Thanks in advance.
Cheers,
Inma Marín.

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev
yes, There is code that takes care of that scenario, I believe it was peter who 
coded it.
There is a valve called JvmRouteBinderValve that peter wrote, that you enable 
for your context.
It will rewrite the session id for, and broadbast it to the cluster.

Filip

- Original Message - 
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, January 26, 2005 6:44 PM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5


Filip,

Pen does not really help me out.

My problem is JK I am pretty sure.  It is appending .srv1 to the
session. When srv1 is stopped, it detects this on the next request and
routes the request to srv2. However I notice in the JK output that it
now has .srv2 appended to the session, which of course does not exist,
and I get prompted to re-logon.

Below is the debug output from JK showing the failover attempt.

Any other suggestion?

Thank you - Richard

[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (700): Attempting to map URI
'/stars/gridAction.do' from 1 maps
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context
URI '/stars/*'
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (755): Found a context match
loadbalancer - /stars/
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] jk_handler::mod_jk.c
(1715): Into handler jakarta-servlet worker=loadbalancer r-proxyreq=0
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
wc_get_worker_for_name::jk_worker.c (92): found a worker loadbalancer
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] init_ws_service::mod_jk.c
(479): agsp=443 agsn=redfishsoftware.swamp.home
hostn=redfishsoftware.swamp.home shostn=redfishsoftware.swamp.home
cbsport=0 sport=0 claport=443
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] service::jk_lb_worker.c
(465): service sticky_session=1
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_most_suitable_worker::jk_lb_worker.c (372): total sessionid is
EE9EF7748256B50E03C48A3F3735DE59.srv1.
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_most_suitable_worker::jk_lb_worker.c (383): searching worker for
partial sessionid EE9EF7748256B50E03C48A3F3735DE59.srv1.
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (275): searching for sticky worker
(srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (282): found candidate worker srv1
(0) for match with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (290): found candidate worker srv1
(0) with previous load 100 in search with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (343): found worker srv1 with new
load 100 in search with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
ajp_get_endpoint::jk_ajp_common.c (2016): time elapsed since last
request = 76 seconds
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] service::jk_lb_worker.c
(482): service worker=srv1 jvm_route=srv1 rc=1
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
ajp_marshal_into_msgb::jk_ajp_common.c (551): ajp marshaling done
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
ajp_service::jk_ajp_common.c (1594): processing with 3 retries
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (883): sending to ajp13
pos=4 len=611 max=8192
[Wed Jan 26 17:15:57 2005] [6040:2256] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull
returned -3 with errno=54
[Wed Jan 26 17:15:57 2005] [6040:2256] [error]
ajp_send_request::jk_ajp_common.c (1158): Error sending request try
another pooled connection
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
jk_open_socket::jk_connect.c (159): try to connect socket = 700 to
127.0.0.1:8009
[Wed Jan 26 17:15:58 2005] [6040:2256] [debug]
jk_open_socket::jk_connect.c (177): after connect ret = -1
[Wed Jan 26 17:15:58 2005] [6040:2256] [info]
jk_open_socket::jk_connect.c (183): connect() failed errno = 61
[Wed Jan 26 17:15:58 2005] [6040:2256] [info]
ajp_connect_to_endpoint::jk_ajp_common.c (862): Failed connecting to
tomcat. Tomcat is probably not started or is listening on the wrong
host/port (127.0.0.1:8009). Failed errno = 61
[Wed Jan 26 17:15:58 2005] [6040:2256] [info]
ajp_send_request::jk_ajp_common.c (1186): Error connecting to the Tomcat
process.
[Wed Jan 26 17:15:58 2005] [6040:2256] [info]
ajp_service::jk_ajp_common.c (1665): Sending request to tomcat failed,
recoverable operation attempt=0
[Wed Jan 26 17:15:58 2005] [6040:2256] [debug]
jk_open_socket::jk_connect.c (159): try to connect socket = 700 to
127.0.0.1:8009
[Wed Jan 26 17:15:59 2005] [6040:2256] [debug]
jk_open_socket::jk_connect.c (177): after connect ret = -1
[Wed Jan 26 17:15:59 2005] [6040:2256] [info]
jk_open_socket::jk_connect.c (183): connect() failed errno = 61

Re: How does Tomcat know that a browser supports cookies?

2005-01-27 Thread Javier Villalobos Arancibia
I use a HttpSession object.
HttpSession object = null;
When user access to site, i use:
object = request.getSession();
later i use:
boolean n = object.isNew();
if n = true, then user is not using cookies.
I suppose that tomcat is using Session Cookies and not re-writting politic..
because, tomcat keep session with user using cookies, so.. if session is new
mean that user is new for tomcat, because it can't send cookie.
regards..
Javier
At 10:12 27-01-2005 +, you wrote:
The API for the HttpServletResponse.encodeURL() method states that the
implementation of this method includes the logic to determine whether the
session ID needs to be encoded in the URL.
How does Tomcat know whether or not a browser supports cookies, or session
tracking is turned off?
Is it simply a case of looking for the presence of a Cookie: header in the
request, and assuming that cookies are enabled if the header is found?
And if that is the case, would I be correct in assuming that browsers (when
permitted by their users) will set Cookie: headers in their requests even
if they do NOT actually have any (previously set) cookies to send back to
the server?
I'm just guessing, of course - and I know I should not generalise about
browsers: I'm thinking of IE, Mozilla/Firefox and Opera.
TIA
Harry Mantheakis
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Javier Villalobos Arancibia
Ing. Civ. Electrónico
ImageMaker Information Technology

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


load-on-start and custom class loader

2005-01-27 Thread Kevin L. Cobb
Hi all, I am new to the list but not new to Tomcat. 

 

We have a main servlet that we want instantiated before any pages are
hit. Hence, in the web.xml, we use the directive
load-on-startup1/load-on-startup. In addition, we use a Custom Class
Loader that extends WebapppClassLoader because our core classes are
encrypted.  

 

Here is the rub. The web application works fine but I get an error in
the Catalina log when the app starts, but only when using the Custom
Class Loader. The error basically says that the main servlet that I am
trying to load cannot be found. But, the servlet is found when I hit the
page, or the application would not work at all. The problem does not
seem to be in the Custom Class Loader itself, but in the way the main
servlet is being accessed when the load-on-startup is applied. I
assume that the load-on-startup directive would attempt to load my main
servlet class using the Custom Class Loader, but perhaps it does not? I
have to me missing something here.

 

Any help is appreciated. 

 

Kevin 

 

 

 

~

Kevin L Cobb, MT(ASCP), SCJP2

Senior Software Engineer

Emergint, Inc.

2724 River Green Circle

Louisville, KY 40206

[EMAIL PROTECTED]

502.896.6210 ext 255

502.896.6170 fax

 

 

The preceding e-mail message and attachments, if any, contains
information that is confidential and qualifies as such under the
Definition of Confidential Information in the Non-Disclosure Agreement,
and may constitute non-public information and trade secrets. It is
intended to be conveyed only to the designated recipient(s). If you are
not an intended recipient of this message, please notify the sender at
502-852-1605. 

 



Re: Chirag: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2005-01-27 Thread Chirag

I did changed the code

 

I changed the server.xml file and changed as this

Resource name=B2BSite auth=Container
  type=javax.sql.DataSource 
driverClassName=sun.jdbc.odbc.JdbcOdbcDriver
  url=jdbc:odbc:B2BSite
  username=myuser password=mypasswd maxActive=20 maxIdle=10 
maxWait=-1/

 

But again the same Exception

 

Still could not try our JDBC-ODBC thing in Microsoft Access

 

Thanks in advance

 

CSJakharia



 Subscribe to bermudaEmail:  [input]  [input]  Browse Archives at 
groups-beta.google.com 



-
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'

RE: loadbalancing with mod_jk 1.2.8

2005-01-27 Thread Richard Mixon (qwest)
John,

From what I gather, this is the purpose of the properties local_worker
and local_worker_only properties in the workers.properties file. They
are documented at the bottom of this page:
  http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

Unfortunately the explanation is not clear - partially due to the
English. I say this somewhat apologetically - realizing of course that
the writers command of English if probably far, far better than my
command of their native language.

From what I do understand:
 1) At the point that you decide to do maintenance on one machine, you
need to change your workers.properties and set local_worker=0 for that
particular machine.
 2) Then do a reload on your Apache configuration.
 3) JK will then stop directing new traffic to the designated machine.
 4) After all sessions have expired or quiesced you can stop that Tomcat
instance and do the maintenance.

The above scenario may work for some, but not for my case. I have users
that may work on a session for several hours sometimes. So I need to use
JK and Tomcat session replication which is supposed to let you use the
ant stop command and have all traffic immediately handled by the other
Tomcat instances. There is a separate active thread on this issue. I see
Filip just mentioned a new valve JvmRouteBinderValve that may help
solve my problem.

Hope this helps - Richard

-Original Message-
From: John Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 2:12 AM
To: Tomcat Users List
Subject: Re: loadbalancing with mod_jk 1.2.8


 I do know how to stop TC, I said the whole idea for people to know I
was
thinking about an HA set up using Apache + TC instances

 The part I am most interested in is,namely; how to make the connector
at
run time NOT send NEW connections to one the tomcat instances being used
for
loadbalancing

- Original Message -
From: Graham Bleach [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, January 26, 2005 6:04 PM
Subject: Re: loadbalancing with mod_jk 1.2.8


 On Wed, Jan 26, 2005 at 01:41:25PM -0500, John Smith wrote:
   Is there any way to make the connector at run time to NOT send NEW
  connections to one the tomcat instances being used for
loadbalancing,
and
  then reload this TC instances once all sessions to it have timed
out?

 If you stop the tomcat instance with the command
 $CATALINA_HOME/bin/catalina.sh stop

 I believe tomcat waits for threads to finish what they are doing
 before it actually terminates.


 G
 --
 Privacy is a transient notion. It started when people stopped
believing
 that God could see everything and stopped when governments realised
there
 was a vacancy to be filled.
 -- Roger Needham

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip,

Thank you - that appears to be what I need. Unfortunately the only
documentation I can find is at:
  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/
apache/catalina/cluster/session/JvmRouteBinderValve.html

BEGIN-QUOTE
Valve to handle Tomcat jvmRoute takeover using mod_jk module after node
failure. After a node crashed the next request going to other cluster
node. Now the answering from apache is slower ( make some error
handshaking. Very bad with apache at my windows.). We rewrite now the
cookie jsessionid information to the backup cluster node. After the next
response all client request goes direct to the backup node. The change
sessionid send also to all other cluster nodes. Well, now the session
stickyness work directly to the backup node and traffic don't go back
too restarted cluster nodes! At all cluster node you must configure the
JvmRouteSessionIDBinderListener  with
JvmRouteSessionIDBinderListenerLifecycle  Add this Valve to your
clustered application or setup it to context default
conf/enginename/hostname/context.xml.default for all host application

Context
  Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /
/Context


END-QUOTE

I put the valve statement in my conf/context.xml. But this does not seem
to be enough.

But where can I find information on configuring the
JvmRouteSessionIDBinderListener  with
JvmRouteSessionIDBinderListenerLifecycle?

Thank you - Richard Mixon

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 7:29 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


yes, There is code that takes care of that scenario, I believe it was
peter who coded it.
There is a valve called JvmRouteBinderValve that peter wrote, that you
enable for your context.
It will rewrite the session id for, and broadbast it to the cluster.

Filip

- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, January 26, 2005 6:44 PM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


Filip,

Pen does not really help me out.

My problem is JK I am pretty sure.  It is appending .srv1 to the
session. When srv1 is stopped, it detects this on the next request and
routes the request to srv2. However I notice in the JK output that it
now has .srv2 appended to the session, which of course does not exist,
and I get prompted to re-logon.

Below is the debug output from JK showing the failover attempt.

Any other suggestion?

Thank you - Richard

[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (700): Attempting to map URI
'/stars/gridAction.do' from 1 maps
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context
URI '/stars/*'
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (755): Found a context match
loadbalancer - /stars/
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] jk_handler::mod_jk.c
(1715): Into handler jakarta-servlet worker=loadbalancer r-proxyreq=0
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
wc_get_worker_for_name::jk_worker.c (92): found a worker loadbalancer
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] init_ws_service::mod_jk.c
(479): agsp=443 agsn=redfishsoftware.swamp.home
hostn=redfishsoftware.swamp.home shostn=redfishsoftware.swamp.home
cbsport=0 sport=0 claport=443
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] service::jk_lb_worker.c
(465): service sticky_session=1
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_most_suitable_worker::jk_lb_worker.c (372): total sessionid is
EE9EF7748256B50E03C48A3F3735DE59.srv1.
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_most_suitable_worker::jk_lb_worker.c (383): searching worker for
partial sessionid EE9EF7748256B50E03C48A3F3735DE59.srv1.
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (275): searching for sticky worker
(srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (282): found candidate worker srv1
(0) for match with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (290): found candidate worker srv1
(0) with previous load 100 in search with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (343): found worker srv1 with new
load 100 in search with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
ajp_get_endpoint::jk_ajp_common.c (2016): time elapsed since last
request = 76 seconds
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] service::jk_lb_worker.c
(482): service worker=srv1 jvm_route=srv1 rc=1
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev

Try to configure the JvmRouteSessionIDBinderLifecycleListener like any other 
Lifecycle listener,

Server
  Listener className=o.a.c.c.s.JvmRouteSessionIDBinderLifecycleListener/




Filip

- Original Message - 
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Cc: [EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 9:37 AM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5


Filip,

Thank you - that appears to be what I need. Unfortunately the only
documentation I can find is at:
  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/
apache/catalina/cluster/session/JvmRouteBinderValve.html

BEGIN-QUOTE
Valve to handle Tomcat jvmRoute takeover using mod_jk module after node
failure. After a node crashed the next request going to other cluster
node. Now the answering from apache is slower ( make some error
handshaking. Very bad with apache at my windows.). We rewrite now the
cookie jsessionid information to the backup cluster node. After the next
response all client request goes direct to the backup node. The change
sessionid send also to all other cluster nodes. Well, now the session
stickyness work directly to the backup node and traffic don't go back
too restarted cluster nodes! At all cluster node you must configure the
JvmRouteSessionIDBinderListener  with
JvmRouteSessionIDBinderListenerLifecycle  Add this Valve to your
clustered application or setup it to context default
conf/enginename/hostname/context.xml.default for all host application

Context
  Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /
/Context


END-QUOTE

I put the valve statement in my conf/context.xml. But this does not seem
to be enough.

But where can I find information on configuring the
JvmRouteSessionIDBinderListener  with
JvmRouteSessionIDBinderListenerLifecycle?

Thank you - Richard Mixon

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 7:29 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


yes, There is code that takes care of that scenario, I believe it was
peter who coded it.
There is a valve called JvmRouteBinderValve that peter wrote, that you
enable for your context.
It will rewrite the session id for, and broadbast it to the cluster.

Filip

- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, January 26, 2005 6:44 PM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


Filip,

Pen does not really help me out.

My problem is JK I am pretty sure.  It is appending .srv1 to the
session. When srv1 is stopped, it detects this on the next request and
routes the request to srv2. However I notice in the JK output that it
now has .srv2 appended to the session, which of course does not exist,
and I get prompted to re-logon.

Below is the debug output from JK showing the failover attempt.

Any other suggestion?

Thank you - Richard

[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (700): Attempting to map URI
'/stars/gridAction.do' from 1 maps
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context
URI '/stars/*'
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
map_uri_to_worker::jk_uri_worker_map.c (755): Found a context match
loadbalancer - /stars/
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] jk_handler::mod_jk.c
(1715): Into handler jakarta-servlet worker=loadbalancer r-proxyreq=0
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
wc_get_worker_for_name::jk_worker.c (92): found a worker loadbalancer
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] init_ws_service::mod_jk.c
(479): agsp=443 agsn=redfishsoftware.swamp.home
hostn=redfishsoftware.swamp.home shostn=redfishsoftware.swamp.home
cbsport=0 sport=0 claport=443
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug] service::jk_lb_worker.c
(465): service sticky_session=1
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_most_suitable_worker::jk_lb_worker.c (372): total sessionid is
EE9EF7748256B50E03C48A3F3735DE59.srv1.
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_most_suitable_worker::jk_lb_worker.c (383): searching worker for
partial sessionid EE9EF7748256B50E03C48A3F3735DE59.srv1.
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (275): searching for sticky worker
(srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (282): found candidate worker srv1
(0) for match with sticky (srv1)
[Wed Jan 26 17:15:57 2005] [6040:2256] [debug]
get_suitable_worker::jk_lb_worker.c (290): found candidate worker srv1
(0) with previous load 100 in search with sticky (srv1)
[Wed Jan 26 

Trouble with XSL transforms with JSP

2005-01-27 Thread cknell
I have played with several versions of Tomcat, but now I have decided to study 
JSP in earnest and I downloaded the latest release two days ago. I have also 
upgraded my Java installation. The installation went relatively well and Tomcat 
is running on my machine.

I decided to start with something I know about, so I am attempting to transform 
an XML document to an HTML page via JSP. For a sanity check, I have downloaded 
O'Reilly's source code from JavaServer Pages, 3rd edition. Specifically, 
chapter 15 has an example of what I wish to do. The example works flawlessly, 
but my transform coughs up this error message.

... org.xml.sax.SAXParseException: Content is not allowed in prolog.

I have researched this to some degree and found that this class sometimes gags 
on UTF-8 files. I checked my XML document in the Hex view of my editor and saw 
that there indeed were two bytes at the beginning of the file that were 
suggested as the source of my problem.

So I wrote an XSLT identity transform stylesheet that reproduces the document 
while changing the encoding from UTF-8 to ISO-8859-1. After running the 
transform of my XML document I checked it in the Hex view of my editor and the 
encoding appears now to be ISO-8859-1. I re-wrote my stylesheet so that its 
output encoding is ISO-8859-1 now also.

Nonetheless, I still get the same exception message when I attempt the 
transform. Does anyone know of a cookbook approach or checklist I can use to 
get over this hump? Thanks.

-- 
Charles Knell
[EMAIL PROTECTED] - email

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does Tomcat know that a browser supports cookies?

2005-01-27 Thread Harry Mantheakis
I understand what you are saying, Javier, if you have a round-trip
situation, where you set cookies in one response, and then test for them in
a follow-up request.

But I'm not convinced that's how Tomcat does it.

The first time a client connects to a server, there will not be any cookies,
session or otherwise, for the client browser to send to the server - but
Tomcat can still figure out whether or not cookies are enabled in the client
browser.

At least, that seems to be the case with my application: Tomcat
automatically decides whether or not to apply URL rewriting if I call the
HttpServletResponse.encodeURL() method.

I wonder if anyone here knows for sure?

Regards

Harry


 I use a HttpSession object.
 
 HttpSession object = null;
 
 When user access to site, i use:
 
 object = request.getSession();
 
 later i use:
 
 boolean n = object.isNew();
 
 if n = true, then user is not using cookies.
 
 I suppose that tomcat is using Session Cookies and not re-writting politic..
 
 because, tomcat keep session with user using cookies, so.. if session is new
 mean that user is new for tomcat, because it can't send cookie.
 
 regards..
 
 Javier
 
 At 10:12 27-01-2005 +, you wrote:
 The API for the HttpServletResponse.encodeURL() method states that the
 implementation of this method includes the logic to determine whether the
 session ID needs to be encoded in the URL.
 
 How does Tomcat know whether or not a browser supports cookies, or session
 tracking is turned off?
 
 Is it simply a case of looking for the presence of a Cookie: header in the
 request, and assuming that cookies are enabled if the header is found?
 
 And if that is the case, would I be correct in assuming that browsers (when
 permitted by their users) will set Cookie: headers in their requests even
 if they do NOT actually have any (previously set) cookies to send back to
 the server?
 
 I'm just guessing, of course - and I know I should not generalise about
 browsers: I'm thinking of IE, Mozilla/Firefox and Opera.
 
 TIA
 
 Harry Mantheakis
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 Javier Villalobos Arancibia
 Ing. Civ. Electrónico
 ImageMaker Information Technology
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 4 logging on Windows

2005-01-27 Thread Cervenka, Tom
How do you configure Tomcat 4 on windows to redirect output to a
filelogger type class the creates a new log file every day and releases
old log file handles so the log can be rotated? 

I am talking about global output that normally goes to the console
window, stdout and stderr, not context logging. Looking at the
server.xml one would believe that this is already configured:

!-- Global logger unless overridden at lower levels --
Logger className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt timestamp=true/

But this doesn't seem to do anything. 

-Tom


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: loadbalancing with mod_jk 1.2.8

2005-01-27 Thread Mladen Turk
Richard Mixon (qwest) wrote:
John,
From what I gather, this is the purpose of the properties local_worker
and local_worker_only properties in the workers.properties file. They
are documented at the bottom of this page:
  http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
Unfortunately the explanation is not clear - partially due to the
English. I say this somewhat apologetically - realizing of course that
the writers command of English if probably far, far better than my
command of their native language.
Well, It was written by the person which native language is English,
so perhaps this is the reason why it's so confusing :).

From what I do understand:
 1) At the point that you decide to do maintenance on one machine, you
need to change your workers.properties and set local_worker=0 for that
particular machine.
 2) Then do a reload on your Apache configuration.
 3) JK will then stop directing new traffic to the designated machine.
 4) After all sessions have expired or quiesced you can stop that Tomcat
instance and do the maintenance.
No.
This means that you will need to disable the connector (using JMX)
on Tomcat. That will cause new connections being rejected, and new
sessions will come from another node.
Use JMX console and invoke stop() method on connector.
New sessions should failover to another node.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How does Tomcat know that a browser supports cookies?

2005-01-27 Thread Mike Curwen
So you're saying that you've seen Tomcat *not* rewrite URLs in a response to
a first request from a client that *does* support cookies, and *does*
rewrite the URLs in a response to a first request from a client that doesn't
support cookies? That would indeed be very powerful software.  

Tomcat needs at least one request/response cycle to be able to determine if
cookies are enabled or not; which it does on the subsequent request/response
cycle.

Your request comes in.  You have no cookie (either because you don't allow
them, or it's your first visit this session)
 
Tomcat responds with a session cookie, and if you've run URLs through that
method, URLs are rewritten too.

The next time you request something, your browser sends back the cookie (if
you allowed the cookie).  Tomcat sees this cookie, and then stops rewriting
URLs.  If your browser doesn't send back a cookie with the next request, the
method continues to rewrite URLs.  

My only doubt is:  Does it continue to also send the cookie in a 'faint
hope' that it might one day be accepted?  This could be easily investigated
with liveheaders in firefox. Come to think of it, liveheaders would help you
confirm what I've just said. ;)


Mike Curwen


 -Original Message-
 From: Harry Mantheakis [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 27, 2005 10:12 AM
 To: Tomcat Users List
 Subject: Re: How does Tomcat know that a browser supports cookies?
 
 
 I understand what you are saying, Javier, if you have a 
 round-trip situation, where you set cookies in one response, 
 and then test for them in a follow-up request.
 
 But I'm not convinced that's how Tomcat does it.
 
 The first time a client connects to a server, there will not 
 be any cookies, session or otherwise, for the client browser 
 to send to the server - but Tomcat can still figure out 
 whether or not cookies are enabled in the client browser.
 
 At least, that seems to be the case with my application: 
 Tomcat automatically decides whether or not to apply URL 
 rewriting if I call the
 HttpServletResponse.encodeURL() method.
 
 I wonder if anyone here knows for sure?
 
 Regards
 
 Harry
 
 
  I use a HttpSession object.
  
  HttpSession object = null;
  
  When user access to site, i use:
  
  object = request.getSession();
  
  later i use:
  
  boolean n = object.isNew();
  
  if n = true, then user is not using cookies.
  
  I suppose that tomcat is using Session Cookies and not re-writting 
  politic..
  
  because, tomcat keep session with user using cookies, so.. 
 if session 
  is new mean that user is new for tomcat, because it can't 
 send cookie.
  
  regards..
  
  Javier
  
  At 10:12 27-01-2005 +, you wrote:
  The API for the HttpServletResponse.encodeURL() method states that 
  the implementation of this method includes the logic to determine 
  whether the session ID needs to be encoded in the URL.
  
  How does Tomcat know whether or not a browser supports cookies, or 
  session tracking is turned off?
  
  Is it simply a case of looking for the presence of a 
 Cookie: header 
  in the request, and assuming that cookies are enabled if 
 the header 
  is found?
  
  And if that is the case, would I be correct in assuming 
 that browsers 
  (when permitted by their users) will set Cookie: headers 
 in their 
  requests even if they do NOT actually have any (previously set) 
  cookies to send back to the server?
  
  I'm just guessing, of course - and I know I should not generalise 
  about
  browsers: I'm thinking of IE, Mozilla/Firefox and Opera.
  
  TIA
  
  Harry Mantheakis
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  Javier Villalobos Arancibia
  Ing. Civ. Electrónico
  ImageMaker Information Technology
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: loadbalancing with mod_jk 1.2.8

2005-01-27 Thread John Smith
 Well, it definitely looks like something to look into.

 Thank you.

 I was thinking about HA options and found this one to be so easy, that
wonder why people are not using it.

 Now, you say,

I have users that may work on a session for several hours sometimes

 Is this a think-time issue (are they editing a text or something?) or
long-running back end queries? I don't know exactly 'where the shoe hurts',
but in the first case I would just give them a JNL-based application to play
with and for the second case I would use run JDBC queries from JMS and
somehow keep a tag on the query.

 I hope this gave you some ideas

- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:15 AM
Subject: RE: loadbalancing with mod_jk 1.2.8


 John,

 From what I gather, this is the purpose of the properties local_worker
 and local_worker_only properties in the workers.properties file. They
 are documented at the bottom of this page:
   http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

 Unfortunately the explanation is not clear - partially due to the
 English. I say this somewhat apologetically - realizing of course that
 the writers command of English if probably far, far better than my
 command of their native language.

 From what I do understand:
  1) At the point that you decide to do maintenance on one machine, you
 need to change your workers.properties and set local_worker=0 for that
 particular machine.
  2) Then do a reload on your Apache configuration.
  3) JK will then stop directing new traffic to the designated machine.
  4) After all sessions have expired or quiesced you can stop that Tomcat
 instance and do the maintenance.

 The above scenario may work for some, but not for my case. I have users
 that may work on a session for several hours sometimes. So I need to use
 JK and Tomcat session replication which is supposed to let you use the
 ant stop command and have all traffic immediately handled by the other
 Tomcat instances. There is a separate active thread on this issue. I see
 Filip just mentioned a new valve JvmRouteBinderValve that may help
 solve my problem.

 Hope this helps - Richard

 -Original Message-
 From: John Smith [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 27, 2005 2:12 AM
 To: Tomcat Users List
 Subject: Re: loadbalancing with mod_jk 1.2.8


  I do know how to stop TC, I said the whole idea for people to know I
 was
 thinking about an HA set up using Apache + TC instances

  The part I am most interested in is,namely; how to make the connector
 at
 run time NOT send NEW connections to one the tomcat instances being used
 for
 loadbalancing

 - Original Message -
 From: Graham Bleach [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Wednesday, January 26, 2005 6:04 PM
 Subject: Re: loadbalancing with mod_jk 1.2.8


  On Wed, Jan 26, 2005 at 01:41:25PM -0500, John Smith wrote:
Is there any way to make the connector at run time to NOT send NEW
   connections to one the tomcat instances being used for
 loadbalancing,
 and
   then reload this TC instances once all sessions to it have timed
 out?
 
  If you stop the tomcat instance with the command
  $CATALINA_HOME/bin/catalina.sh stop
 
  I believe tomcat waits for threads to finish what they are doing
  before it actually terminates.
 
 
  G
  --
  Privacy is a transient notion. It started when people stopped
 believing
  that God could see everything and stopped when governments realised
 there
  was a vacancy to be filled.
  -- Roger Needham
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Oracle JDBC

2005-01-27 Thread Nathan Aaron
I have the Oracle jdbc driver installed in Tomcat's shared/lib 
directory.  I have a JSP file that resides in the webapps/jsp-examples 
that connects to an Oracle database successfully.  When I move it to a 
context (/opt/application/appname) outside one of the contexts that are 
included with Tomcat 5.0.28 the jsp stops connecting to the database.  I 
get java.sql.SQLException: No suitable driver like it can't load the 
JDBC driver.  What is odd is that I have a servlet that connects to the 
database fine and it is in the /opt/application/appname/WEB-INF/lib 
directory.  Any help would be greatly appreciated.

Nathan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 5.5 Package installation Administration

2005-01-27 Thread Susan G. Conger
Hi,

I am new to Tomcat.  I have it installed using the Tomcat5.5.4.exe.  However
this doesn't include the Administration package.  I am having trouble
figuring out exactly how to install the administration package.  I have
searched the web and I have not found any information on how to install the
extra packages that are not included with Tomcat in version 5.5.  Can
someone please send me the steps?

Thanks,
Susan

==
Susan G. Conger Custom Windows  Macintosh Development
PresidentWeb Site Design  Development
YOERIC Corporation   Database Design  Development
256 Windy Ridge Road
Chapel Hill, NC  27517
Phone/Fax: (919)542-0071
[EMAIL PROTECTED]
www.yoeric.com
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



precompilation and jspf

2005-01-27 Thread Marcus Beyer
Hello!
I trigger org.apache.jasper.JspC of Tomcat 5.0.26 from ant to precompile 
my JSPs.

It seems that incremental compilation does not check if included files 
(*.jspf) have changed. Is that right?

Is there any workaround for this? To always clean can take minutes ... 
Perhaps we could check if *any* jspf has changed after last build and 
then do a full clean (delete the servlets) if true. Has someone wrote an 
ant task for this? That would be great!

thanx!
Marcus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip/all,

Thank you - with your suggestion I was able to get it configured as
follows:

1) After the Server  line in server.xml I added
 Listener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
fecycleListener /

2) I added to the conf/context.xml this line:
 Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /

All starts fine. But I still get prompted to logon when the failover
occurs from srv1 to srv2.

Here are the Tomcat logs (I have mostly just the cluster logging
enabled. Can you see anything that is not correct?

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=15]
 DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer stopped.
TOMCAT LOG - SRV1 END

TOMCAT LOG - SRV2 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4001,192.168.1.140,4001, alive=4046]
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer 

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev
As mentioned, you can't have the persistence manager, with clustering.


DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars


 
- Original Message - 
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:55 AM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5


Filip/all,

Thank you - with your suggestion I was able to get it configured as
follows:

1) After the Server  line in server.xml I added
 Listener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
fecycleListener /

2) I added to the conf/context.xml this line:
 Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /

All starts fine. But I still get prompted to logon when the failover
occurs from srv1 to srv2.

Here are the Tomcat logs (I have mostly just the cluster logging
enabled. Can you see anything that is not correct?

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=15]
 DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer stopped.
TOMCAT LOG - SRV1 END

TOMCAT LOG - SRV2 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting 

Invoker workaround on AIX

2005-01-27 Thread Flaffer
I am migrating around 10 apps from Tomcat 4.0.6 (Sun JDK 1.3.1) to
Tomcat 4.0.6 on AIX 5.2 using IBMs JDK 1.3.1sr7).

I am having an issue working around the invoker servlet. I have the
workaround(where you explicitely map the /servlet context ) working on
Solaris. But when I bring the config over to AIX, the URI  /servlet
cannot be mapped to a context.

Here are the two configs. The first one does not work. It throws this
error in the engine log:

2005-01-27 10:20:39 StandardHost[pdw0stl5]: Mapping request URI
'/servlet/com.bo.hsal.servlet'
2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the longest
context path prefix
2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the default context
2005-01-27 10:20:39 StandardHost[pdw0stl5]: MAPPING configuration
error for request URI

The access log shows a 500 error thrown on the request. Here is the
pertinent part of the web.xml for the application server instance
(i.e., conf/web.xml):

?xml version=1.0 encoding=ISO-8859-1 ?
 !DOCTYPE web-app (View Source for full doctype...)
web-app
servlet
 servlet-namedefault/servlet-name
 servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
 param-namedebug/param-name
 param-value0/param-value
 /init-param
init-param
 param-namelistings/param-name
 param-valuefalse/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet

- !--  Mapping to replace Invoker servlet. NOTE: USED ONLY BY BO APPS.
 --
!--  LEAVE COMMENTED OUT FOR OTHER APPS. This addresses a securty concern.
 --
!--  See http://marc.theaimsgroup.com/?l=tomcat-userm=103945394724196w=2
 --

servlet
 servlet-nameservlet/servlet-name
 servlet-classcom.bo.hsal.HSALServlet/servlet-class
 /servlet

servlet
 servlet-namejsp/servlet-name
 servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
 param-namelogVerbosityLevel/param-name
 param-valueWARNING/param-value
 /init-param
 load-on-startup3/load-on-startup
 /servlet

!--   Built In Servlet Mappings =
 --
servlet-mapping
 servlet-namedefault/servlet-name
 url-pattern//url-pattern
 /servlet-mapping

!--  Uncomment for BO Apps Only. See Invoker replacement above.
 --

servlet-mapping
 servlet-nameservlet/servlet-name
 url-pattern/servlet/*/url-pattern
 /servlet-mapping

servlet-mapping
 servlet-namejsp/servlet-name
 url-pattern*.jsp/url-pattern
 /servlet-mapping

The config that works is the default one which loads the invoker
servlet and maps it.

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

 servlet
   servlet-namedefault/servlet-name
   servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
   init-param
 param-namedebug/param-name
 param-value0/param-value
   /init-param
   init-param
 param-namelistings/param-name
 param-valuefalse/param-value
   /init-param
   load-on-startup1/load-on-startup
 /servlet

servlet
   servlet-nameinvoker/servlet-name
   servlet-classorg.apache.catalina.servlets.InvokerServlet/servlet-class
   init-param
 param-namedebug/param-name
 param-value0/param-value
   /init-param
   load-on-startup2/load-on-startup
 /servlet

 servlet
   servlet-namejsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
 param-namelogVerbosityLevel/param-name
 param-valueWARNING/param-value
   /init-param
   load-on-startup3/load-on-startup
 /servlet

 !--  Built In Servlet Mappings = --

 servlet-mapping
   servlet-namedefault/servlet-name
   url-pattern//url-pattern
 /servlet-mapping

 !-- The mapping for the invoker servlet --

 servlet-mapping
   servlet-nameinvoker/servlet-name
   url-pattern/servlet/*/url-pattern
 /servlet-mapping

Any ideas?

-- 
Ben Ricker
He's just this guy, you know?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Robert F. Hall
Dutch?
Punit Duggal wrote:
What language is this ??
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Subject: Re: Re: JK, Session Replication/Clustering, SSL and failover 
in Tomcat 5
Date: 26 Jan 2005 23:13:47 -

Geachte relatie,
Het door u gebruikte e-mailadres is niet meer actief. U kunt uw 
e-mailbericht sturen naar [EMAIL PROTECTED] of dit bericht 
beantwoorden.

Bedankt voor uw medewerking,
Met vriendelijke groet,
ATP Hypotheken
Het Spoor 40
3994 AK Houten
Tel. 030 750 25 33
Fax. 030 750 25 88
[EMAIL PROTECTED]
 -- DIT IS EEN AUTOMATISCH GEGENEREERD E-MAILBERICHT --

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Express yourself instantly with MSN Messenger! Download today - it's 
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5.5 Package installation Administration

2005-01-27 Thread Edmon Begoli
Susan,
Download the admin package available on the Tomcat main site
Unzip the contents in the webapps directory under the root directory of 
your Tomcat 5.5.x installation

Change tomcat-users.xml file - add user and role admin with password 
admin, or add role admin, and add that role to any existing user

Start up the tomcat
Go to http://yourserver:8080/admin
Login as e.g admin/admin
Regards,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software
Susan G. Conger wrote:
Hi,
I am new to Tomcat.  I have it installed using the Tomcat5.5.4.exe.  However
this doesn't include the Administration package.  I am having trouble
figuring out exactly how to install the administration package.  I have
searched the web and I have not found any information on how to install the
extra packages that are not included with Tomcat in version 5.5.  Can
someone please send me the steps?
Thanks,
Susan
==
Susan G. Conger Custom Windows  Macintosh Development
PresidentWeb Site Design  Development
YOERIC Corporation   Database Design  Development
256 Windy Ridge Road
Chapel Hill, NC  27517
Phone/Fax: (919)542-0071
[EMAIL PROTECTED]
www.yoeric.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How does Tomcat know that a browser supports cookies?

2005-01-27 Thread Harry Mantheakis
Thanks Mike - and Javier

I installed 'livehttpheaders' (cool!) and all was revealed - pretty much as
you and Javier said.

First time requests always result in URLs being rewritten to include the
session cookie ID - and it carries on that way if the client browser has
cookies disabled. 

If cookies are enabled at the browser, then URL rewriting stops after the
first request.

I should figured this out myself, so I'm sorry to have wasted the bandwidth.

What made me slip out of gear on this was Zone Alarm Pro mangling the
request session cookies, but somehow fooling Tomcat into *not* rewriting the
URLs which meant that persistence went out the window :-/

Thanks again for the replies - I recommend 'livehttpheaders' which works
with both Mozilla and Firefox.

Harry Mantheakis



 So you're saying that you've seen Tomcat *not* rewrite URLs in a response to
 a first request from a client that *does* support cookies, and *does*
 rewrite the URLs in a response to a first request from a client that doesn't
 support cookies? That would indeed be very powerful software.
 
 Tomcat needs at least one request/response cycle to be able to determine if
 cookies are enabled or not; which it does on the subsequent request/response
 cycle.
 
 Your request comes in.  You have no cookie (either because you don't allow
 them, or it's your first visit this session)
 
 Tomcat responds with a session cookie, and if you've run URLs through that
 method, URLs are rewritten too.
 
 The next time you request something, your browser sends back the cookie (if
 you allowed the cookie).  Tomcat sees this cookie, and then stops rewriting
 URLs.  If your browser doesn't send back a cookie with the next request, the
 method continues to rewrite URLs.
 
 My only doubt is:  Does it continue to also send the cookie in a 'faint
 hope' that it might one day be accepted?  This could be easily investigated
 with liveheaders in firefox. Come to think of it, liveheaders would help you
 confirm what I've just said. ;)
 
 
 Mike Curwen
 
 
 -Original Message-
 From: Harry Mantheakis [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 27, 2005 10:12 AM
 To: Tomcat Users List
 Subject: Re: How does Tomcat know that a browser supports cookies?
 
 
 I understand what you are saying, Javier, if you have a
 round-trip situation, where you set cookies in one response,
 and then test for them in a follow-up request.
 
 But I'm not convinced that's how Tomcat does it.
 
 The first time a client connects to a server, there will not
 be any cookies, session or otherwise, for the client browser
 to send to the server - but Tomcat can still figure out
 whether or not cookies are enabled in the client browser.
 
 At least, that seems to be the case with my application:
 Tomcat automatically decides whether or not to apply URL
 rewriting if I call the
 HttpServletResponse.encodeURL() method.
 
 I wonder if anyone here knows for sure?
 
 Regards
 
 Harry
 
 
 I use a HttpSession object.
 
 HttpSession object = null;
 
 When user access to site, i use:
 
 object = request.getSession();
 
 later i use:
 
 boolean n = object.isNew();
 
 if n = true, then user is not using cookies.
 
 I suppose that tomcat is using Session Cookies and not re-writting
 politic..
 
 because, tomcat keep session with user using cookies, so..
 if session 
 is new mean that user is new for tomcat, because it can't
 send cookie.
 
 regards..
 
 Javier
 
 At 10:12 27-01-2005 +, you wrote:
 The API for the HttpServletResponse.encodeURL() method states that
 the implementation of this method includes the logic to determine
 whether the session ID needs to be encoded in the URL.
 
 How does Tomcat know whether or not a browser supports cookies, or
 session tracking is turned off?
 
 Is it simply a case of looking for the presence of a
 Cookie: header
 in the request, and assuming that cookies are enabled if
 the header 
 is found?
 
 And if that is the case, would I be correct in assuming
 that browsers 
 (when permitted by their users) will set Cookie: headers
 in their 
 requests even if they do NOT actually have any (previously set)
 cookies to send back to the server?
 
 I'm just guessing, of course - and I know I should not generalise
 about
 browsers: I'm thinking of IE, Mozilla/Firefox and Opera.
 
 TIA
 
 Harry Mantheakis
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 Javier Villalobos Arancibia
 Ing. Civ. Electrónico
 ImageMaker Information Technology
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
However,

First, Filip, thank you sincerely for your persistence in helping me. I
am committed to writing up a HOWTO for this general use case when done
and will post the same. But I am not quite there :(

After placing this statement in my application context xml file
  Manager className=org.apache.catalina.session.StandardManager/
it still does not fail over without requiring a new logon.

I am not seeing session replication occuring in my tomcat.log - or am I
looking in the wrong place.

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=16]
 DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at /stars
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer stopped.
TOMCAT LOG - SRV1 END

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4001,192.168.1.140,4001, alive=4593]
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -

Kill context from the shell

2005-01-27 Thread Kristian Hellquist
Hi!

Is there any alternative way to close/reload a context on Tomcat and not
using the Manager? 
I would like to just call a command like shutdown foo from the shell.
I have seen examples by making a telnet call and providing username and
password to the manager-context, but is there any other way?

Thanks!
Kristian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 403 Forbidden

2005-01-27 Thread James Sys
Hi Soren and Wendy,

I wondered if either of you have made progress with this problem. It's so=
mething I too would like to use, so I'm keen to pick your brains.

Thanks,

James.
--

Have you tried this.
WEB_INF/web.xml
error-page
error-code403/error-code
location/errorpages/403.jsp/location
/error-page



From: Søren Blidorf [EMAIL PROTECTED]

Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org
To: tomcat-user@jakarta.apache.org
Subject: 403 Forbidden
Date: Thu, 20 Jan 2005 00:08:15 +0100

Hi.

I have setup my web.xml error page 403 Forbidden to go to my page
restrictedError.jsp

I cannot get it to work!

Can it be because I use a danish browser where the error code is 403
Forbudt

BR

Soren



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev
why are you insisting on using a self defined manager?
Remove the manager element.

Filip

- Original Message - 
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Cc: [EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 12:36 PM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5


However,

First, Filip, thank you sincerely for your persistence in helping me. I
am committed to writing up a HOWTO for this general use case when done
and will post the same. But I am not quite there :(

After placing this statement in my application context xml file
  Manager className=org.apache.catalina.session.StandardManager/
it still does not fail over without requiring a new logon.

I am not seeing session replication occuring in my tomcat.log - or am I
looking in the wrong place.

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=16]
 DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at /stars
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve stopped)
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer stopped.
TOMCAT LOG - SRV1 END

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO 

Re: Tomcat 5.5 Package installation Administration

2005-01-27 Thread David Smith
The admin webapp should be placed in $TOMCAT_HOME/server/webapps right 
next to the manager webapp instead of in the general 
$TOMCAT_HOME/webapps directory.  The admin.xml file is written to look 
for it here.

--David
Edmon Begoli wrote:
Susan,
Download the admin package available on the Tomcat main site
Unzip the contents in the webapps directory under the root directory 
of your Tomcat 5.5.x installation

Change tomcat-users.xml file - add user and role admin with password 
admin, or add role admin, and add that role to any existing user

Start up the tomcat
Go to http://yourserver:8080/admin
Login as e.g admin/admin
Regards,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software
Susan G. Conger wrote:
Hi,
I am new to Tomcat.  I have it installed using the Tomcat5.5.4.exe.  
However
this doesn't include the Administration package.  I am having trouble
figuring out exactly how to install the administration package.  I have
searched the web and I have not found any information on how to 
install the
extra packages that are not included with Tomcat in version 5.5.  Can
someone please send me the steps?

Thanks,
Susan
==
Susan G. Conger Custom Windows  Macintosh Development
PresidentWeb Site Design  Development
YOERIC Corporation   Database Design  Development
256 Windy Ridge Road
Chapel Hill, NC  27517
Phone/Fax: (919)542-0071
[EMAIL PROTECTED]
www.yoeric.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat datasource not persisting across restarts

2005-01-27 Thread Johnny Tolliver
I've built a simple web app using Sun JSCreator. It accesses a MySQL database,
and I've deployed on Tomcat 5.0.28. It took a little haggling to get the
datasource registration in Tomcat just right, but it finally works. I used
Tomcat's admin GUI to register the data source, and I deploy the web app by
using a context file.

However, I have noticed that stopping and restarting Tomcat somehow messes up
the datasource registration. All appears well in the admin GUI, but the app
doesn't work. The error is a database login error where the database username
and/or password are not recognized. Deleting and rebuilding the datasource
registration fixes the problem.

Is this a Tomcat problem or maybe a database problem? (The command line
interface to MySQL continues to work even when the web app complains of a bad
user/password).

Any ideas what's going on? Any similar experiences?

Thanks,
Johnny S. Tolliver
Oak Ridge National Laboratory
[EMAIL PROTECTED], 865-574-1305




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Never mind. Sorry for the dumb questions, its in my application
ontext.  - Richard

-Original Message-
From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 11:09 AM
To: Tomcat Users List
Cc: Filip Hanik - Dev [EMAIL PROTECTED]
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


Filip,

Yes you did say that earlier. However I do not reference
PersistentManager anywhere in my server.xml. How is it getting enable?
Here is the clustering part if my server.xml (I can send the entire
server.xml if necessary).


Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 managerClassName=org.apache.catalina.cluster.session.D
eltaManager
 expireSessionsOnShutdown=true
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastServic
e
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationLi
stener
tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTr
ansmitter
replicationMode=pooled
ackTimeout=15000/

Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
   filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.ht
ml;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=c:/jakarta-tomcat-5.5.7/temp
  deployDir=c:/jakarta-tomcat-5.5.7/webapps
  watchDir=c:/jakarta-tomcat-5.5.7-deployer/build/w
ebapp
  watchEnabled=false/
/Cluster

Thank you - Richard


-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 10:34 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


As mentioned, you can't have the persistence manager, with clustering.


DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars



- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:55 AM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


Filip/all,

Thank you - with your suggestion I was able to get it configured as
follows:

1) After the Server  line in server.xml I added
 Listener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
fecycleListener /

2) I added to the conf/context.xml this line:
 Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /

All starts fine. But I still get prompted to logon when the failover
occurs from srv1 to srv2.

Here are the Tomcat logs (I have mostly just the cluster logging
enabled. Can you see anything that is not correct?

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -

Re: Oracle JDBC

2005-01-27 Thread Dustin
You need to place the driver in common/lib.

Dustin

--- Nathan Aaron [EMAIL PROTECTED] wrote:

 I have the Oracle jdbc driver installed in Tomcat's
 shared/lib 
 directory.  I have a JSP file that resides in the
 webapps/jsp-examples 
 that connects to an Oracle database successfully. 
 When I move it to a 
 context (/opt/application/appname) outside one of
 the contexts that are 
 included with Tomcat 5.0.28 the jsp stops connecting
 to the database.  I 
 get java.sql.SQLException: No suitable driver like
 it can't load the 
 JDBC driver.  What is odd is that I have a servlet
 that connects to the 
 database fine and it is in the
 /opt/application/appname/WEB-INF/lib 
 directory.  Any help would be greatly appreciated.
 
 Nathan
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip,

Yes you did say that earlier. However I do not reference
PersistentManager anywhere in my server.xml. How is it getting enable?
Here is the clustering part if my server.xml (I can send the entire
server.xml if necessary).


Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 managerClassName=org.apache.catalina.cluster.session.D
eltaManager
 expireSessionsOnShutdown=true
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastServic
e
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationLi
stener
tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTr
ansmitter
replicationMode=pooled
ackTimeout=15000/

Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
   filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.ht
ml;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=c:/jakarta-tomcat-5.5.7/temp
  deployDir=c:/jakarta-tomcat-5.5.7/webapps
  watchDir=c:/jakarta-tomcat-5.5.7-deployer/build/w
ebapp
  watchEnabled=false/
/Cluster

Thank you - Richard


-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 10:34 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


As mentioned, you can't have the persistence manager, with clustering.


DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars



- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:55 AM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


Filip/all,

Thank you - with your suggestion I was able to get it configured as
follows:

1) After the Server  line in server.xml I added
 Listener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
fecycleListener /

2) I added to the conf/context.xml this line:
 Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /

All starts fine. But I still get prompted to logon when the failover
occurs from srv1 to srv2.

Here are the Tomcat logs (I have mostly just the cluster logging
enabled. Can you see anything that is not correct?

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member

logging remote IP address

2005-01-27 Thread Mark
Hi,
Can anybody help how to log remote IP internal address using catalina
logger (org.apache.catalina.*) classes and Http request class?

request.getRemoteAddr() returns only one IP, but I'd like to see if
the request came from subnewtwork or not:

I'm looking for both values external IP and internal so my log will
look like:

200.200.200.200 (192.168.1.2) - - [5/Jan/2005:15:56:23 -0500] GET
/test/index.jsp HTTP/1.0 200 354

Thanks,
Mark.



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev
you said you enabled it in your context.xml file, if so remove it


Filip

- Original Message - 
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Cc: [EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 12:08 PM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5


Filip,

Yes you did say that earlier. However I do not reference
PersistentManager anywhere in my server.xml. How is it getting enable?
Here is the clustering part if my server.xml (I can send the entire
server.xml if necessary).


Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 managerClassName=org.apache.catalina.cluster.session.D
eltaManager
 expireSessionsOnShutdown=true
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership
className=org.apache.catalina.cluster.mcast.McastServic
e
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver
className=org.apache.catalina.cluster.tcp.ReplicationLi
stener
tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTr
ansmitter
replicationMode=pooled
ackTimeout=15000/

Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
   filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.ht
ml;.*\.css;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=c:/jakarta-tomcat-5.5.7/temp
  deployDir=c:/jakarta-tomcat-5.5.7/webapps
  watchDir=c:/jakarta-tomcat-5.5.7-deployer/build/w
ebapp
  watchEnabled=false/
/Cluster

Thank you - Richard


-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 10:34 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


As mentioned, you can't have the persistence manager, with clustering.


DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars



- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:55 AM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5


Filip/all,

Thank you - with your suggestion I was able to get it configured as
follows:

1) After the Server  line in server.xml I added
 Listener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
fecycleListener /

2) I added to the conf/context.xml this line:
 Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /

All starts fine. But I still get prompted to logon when the failover
occurs from srv1 to srv2.

Here are the Tomcat logs (I have mostly just the cluster logging
enabled. Can you see anything that is not correct?

TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.png
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.htm
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.html
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.css
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.txt
 INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -

Re: Oracle JDBC

2005-01-27 Thread Nathan Aaron
Already tried it. Still doesn't work. Thanks for the interest though!
Nathan
Dustin wrote:
You need to place the driver in common/lib.
Dustin
--- Nathan Aaron [EMAIL PROTECTED] wrote:
 

I have the Oracle jdbc driver installed in Tomcat's
shared/lib 
directory.  I have a JSP file that resides in the
webapps/jsp-examples 
that connects to an Oracle database successfully. 
When I move it to a 
context (/opt/application/appname) outside one of
the contexts that are 
included with Tomcat 5.0.28 the jsp stops connecting
to the database.  I 
get java.sql.SQLException: No suitable driver like
it can't load the 
JDBC driver.  What is odd is that I have a servlet
that connects to the 
database fine and it is in the
/opt/application/appname/WEB-INF/lib 
directory.  Any help would be greatly appreciated.

Nathan
   

-
 

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
   


		
__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Oracle JDBC

2005-01-27 Thread dshort
Not sure if you can have your JSPs/servlets outside of the Tomcat contexts 
structure.  I think Tomcat, actually I think Servlet spec 2.3, expects a 
certain directory tree to be in place.  So, it will look in the application 
context WEB-INF/lib directory, then up the tree to the shared/lib directory and 
then up the tree to the common/lib directory for jar files.

Someone, please correct me if I'm wrong here.

Why don't you just replicate your application structure within Tomcat's context 
structure (i.e., tomcat/webapps/appname.  That's basically the standard.



- Original Message -
From: Nathan Aaron [EMAIL PROTECTED]
Date: Thursday, January 27, 2005 12:58 pm
Subject: Re: Oracle JDBC

 Already tried it. Still doesn't work. Thanks for the interest though!
 
 Nathan
 
 Dustin wrote:
 
 You need to place the driver in common/lib.
 
 Dustin
 
 --- Nathan Aaron [EMAIL PROTECTED] wrote:
 
   
 
 I have the Oracle jdbc driver installed in Tomcat's
 shared/lib 
 directory.  I have a JSP file that resides in the
 webapps/jsp-examples 
 that connects to an Oracle database successfully. 
 When I move it to a 
 context (/opt/application/appname) outside one of
 the contexts that are 
 included with Tomcat 5.0.28 the jsp stops connecting
 to the database.  I 
 get java.sql.SQLException: No suitable driver like
 it can't load the 
 JDBC driver.  What is odd is that I have a servlet
 that connects to the 
 database fine and it is in the
 /opt/application/appname/WEB-INF/lib 
 directory.  Any help would be greatly appreciated.
 
 Nathan
 
 
 
 
 --
 ---
   
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 
 
 
  
 __ 
 Do you Yahoo!? 
 The all-new My Yahoo! - Get yours free! 
 http://my.yahoo.com 
  
 
 
 --
 ---
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Oracle JDBC

2005-01-27 Thread dshort
Not sure if you can have your JSPs/servlets outside of the Tomcat contexts 
structure.  I think Tomcat, actually I think Servlet spec 2.3, expects a 
certain directory tree to be in place.  So, it will look in the application 
context WEB-INF/lib directory, then up the tree to the shared/lib directory and 
then up the tree to the common/lib directory for jar files.

Someone, please correct me if I'm wrong here.

Why don't you just replicate your application structure within Tomcat's context 
structure (i.e., tomcat/webapps/appname.  That's basically the standard.


- Original Message -
From: Nathan Aaron [EMAIL PROTECTED]
Date: Thursday, January 27, 2005 12:58 pm
Subject: Re: Oracle JDBC

 Already tried it. Still doesn't work. Thanks for the interest though!
 
 Nathan
 
 Dustin wrote:
 
 You need to place the driver in common/lib.
 
 Dustin
 
 --- Nathan Aaron [EMAIL PROTECTED] wrote:
 
   
 
 I have the Oracle jdbc driver installed in Tomcat's
 shared/lib 
 directory.  I have a JSP file that resides in the
 webapps/jsp-examples 
 that connects to an Oracle database successfully. 
 When I move it to a 
 context (/opt/application/appname) outside one of
 the contexts that are 
 included with Tomcat 5.0.28 the jsp stops connecting
 to the database.  I 
 get java.sql.SQLException: No suitable driver like
 it can't load the 
 JDBC driver.  What is odd is that I have a servlet
 that connects to the 
 database fine and it is in the
 /opt/application/appname/WEB-INF/lib 
 directory.  Any help would be greatly appreciated.
 
 Nathan
 
 
 
 
 --
 ---
   
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 
 
 
  
 __ 
 Do you Yahoo!? 
 The all-new My Yahoo! - Get yours free! 
 http://my.yahoo.com 
  
 
 
 --
 ---
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Oracle JDBC

2005-01-27 Thread Nathan Aaron
The pain factor of moving the app would be too great at this point.
What doesn't make sense is that I have a servlet that runs and uses the 
jdbc driver in shared/libs the servlet code is in 
/opt/application/appname/WEB-INF/lib. The jsp page is located in 
/opt/application/appname. My application is deployed under 
/opt/application/appname.

It is strange.
Nathan
[EMAIL PROTECTED] wrote:
Not sure if you can have your JSPs/servlets outside of the Tomcat contexts 
structure.  I think Tomcat, actually I think Servlet spec 2.3, expects a 
certain directory tree to be in place.  So, it will look in the application 
context WEB-INF/lib directory, then up the tree to the shared/lib directory and 
then up the tree to the common/lib directory for jar files.
Someone, please correct me if I'm wrong here.
Why don't you just replicate your application structure within Tomcat's context 
structure (i.e., tomcat/webapps/appname.  That's basically the standard.
- Original Message -
From: Nathan Aaron [EMAIL PROTECTED]
Date: Thursday, January 27, 2005 12:58 pm
Subject: Re: Oracle JDBC
 

Already tried it. Still doesn't work. Thanks for the interest though!
Nathan
Dustin wrote:
   

You need to place the driver in common/lib.
Dustin
--- Nathan Aaron [EMAIL PROTECTED] wrote:

 

I have the Oracle jdbc driver installed in Tomcat's
shared/lib 
directory.  I have a JSP file that resides in the
webapps/jsp-examples 
that connects to an Oracle database successfully. 
When I move it to a 
context (/opt/application/appname) outside one of
the contexts that are 
included with Tomcat 5.0.28 the jsp stops connecting
to the database.  I 
get java.sql.SQLException: No suitable driver like
it can't load the 
JDBC driver.  What is odd is that I have a servlet
that connects to the 
database fine and it is in the
/opt/application/appname/WEB-INF/lib 
directory.  Any help would be greatly appreciated.

Nathan
  

   

--
 

---
   


 

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
  

   

  	
__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 


--
 

---
   

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Oracle JDBC

2005-01-27 Thread dshort
You may have to deploy an appname.xml file under the /conf/catalina/localhost 
directory.  In the file put the following:

Context docBase=appname path=/opt/application/appname /

Tomcat needs to find the jsp file unlike the servlet class file, which resides 
in a jar file in your appname/WEB-INF/lib directory.  Tomcat will compile the 
jsp, if it hasn't already done so, and place the class file in the 
/tomcat/work/catalina/localhost/appname directory, from which it will get 
executed.

- Original Message -
From: Nathan Aaron [EMAIL PROTECTED]
Date: Thursday, January 27, 2005 1:33 pm
Subject: Re: Oracle JDBC

 The pain factor of moving the app would be too great at this point.
 
 What doesn't make sense is that I have a servlet that runs and 
 uses the 
 jdbc driver in shared/libs the servlet code is in 
 /opt/application/appname/WEB-INF/lib. The jsp page is located in 
 /opt/application/appname. My application is deployed under 
 /opt/application/appname.
 
 It is strange.
 
 Nathan
 
 [EMAIL PROTECTED] wrote:
 
 Not sure if you can have your JSPs/servlets outside of the Tomcat 
 contexts structure.  I think Tomcat, actually I think Servlet spec 
 2.3, expects a certain directory tree to be in place.  So, it will 
 look in the application context WEB-INF/lib directory, then up the 
 tree to the shared/lib directory and then up the tree to the 
 common/lib directory for jar files.
 
 Someone, please correct me if I'm wrong here.
 
 Why don't you just replicate your application structure within 
 Tomcat's context structure (i.e., tomcat/webapps/appname.  That's 
 basically the standard.
 
 
 - Original Message -
 From: Nathan Aaron [EMAIL PROTECTED]
 Date: Thursday, January 27, 2005 12:58 pm
 Subject: Re: Oracle JDBC
 
   
 
 Already tried it. Still doesn't work. Thanks for the interest 
 though!
 Nathan
 
 Dustin wrote:
 
 
 
 You need to place the driver in common/lib.
 
 Dustin
 
 --- Nathan Aaron [EMAIL PROTECTED] wrote:
 
  
 
   
 
 I have the Oracle jdbc driver installed in Tomcat's
 shared/lib 
 directory.  I have a JSP file that resides in the
 webapps/jsp-examples 
 that connects to an Oracle database successfully. 
 When I move it to a 
 context (/opt/application/appname) outside one of
 the contexts that are 
 included with Tomcat 5.0.28 the jsp stops connecting
 to the database.  I 
 get java.sql.SQLException: No suitable driver like
 it can't load the 
 JDBC driver.  What is odd is that I have a servlet
 that connects to the 
 database fine and it is in the
 /opt/application/appname/WEB-INF/lib 
 directory.  Any help would be greatly appreciated.
 
 Nathan
 
 

 
 
 
 
 --
   
 
 ---
 
 
  
 
   
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

 
 
 
 

 __ 
 Do you Yahoo!? 
 The all-new My Yahoo! - Get yours free! 
 http://my.yahoo.com 
 
 
 
 
 --
   
 
 ---
 
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: tomcat-user-
 [EMAIL PROTECTED]
 
  
 
   
 
 -
 --
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 --
 ---
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
 
 
 ---
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: loadbalancing with mod_jk 1.2.8

2005-01-27 Thread Richard Mixon (qwest)
Mladen Turk wrote:
 Richard Mixon (qwest) wrote:
 John,
  SNIP
 From what I do understand:
  1) At the point that you decide to do maintenance on one machine,
 you need to change your workers.properties and set local_worker=0
  for that particular machine. 2) Then do a reload on your Apache
  configuration. 3) JK will then stop directing new traffic to the
  designated machine. 4) After all sessions have expired or quiesced
 you can stop that Tomcat instance and do the maintenance.


 No.
 This means that you will need to disable the connector (using JMX)
 on Tomcat. That will cause new connections being rejected, and new
 sessions will come from another node.
 Use JMX console and invoke stop() method on connector.
 New sessions should failover to another node.

Mladen,

Thanks. I am trying to use the Tomcat Admin console to do this (I
believe this uses JMX). The only option it provides is to delete the
connection. I tried deleting the port 8009 connection in the first
Tomcat instance, leaving port 9009 running on the second Tomcat
instance. However JK continues to direct traffic to the first Tomcat,
apparently successfullly.

Any suggestions?

Thank you - Richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip,

Thanks so much for some reason taking the Manager  statement
completely out of the context worked.

I can now see session replication occurring, which then identified some
objects that were not serializable. I have fixed these and can see the
session replicating correctly in the log messages.

I quickly realized that I could not just run catalina stop as this
caused the session to be deleted on both the tomcat instance that was
stopping and on the remaining Tomcat instance - hence the reason I was
always prompted to re-login in.

So how do I trigger the maintenance failover? If I use the Admin
console to delete the port 8009 connector (first Tomcat instance), this
does not prevent JK from continuing to route traffic to this instance.

I also tried using ant stop from the tomcat-deployer, but this results
in a HTTP Status 503 - This application is not currently available
message.

I feel like I'm very close, but not quite there.

Thank you - Richard

Filip Hanik - Dev wrote:
 you said you enabled it in your context.xml file, if so remove it


 Filip

 - Original Message -
 From: Richard Mixon (qwest) [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Cc: 
 Sent: Thursday, January 27, 2005 12:08 PM
 Subject: RE: JK, Session Replication/Clustering, SSL and failover in
 Tomcat 5


 Filip,

 Yes you did say that earlier. However I do not reference
 PersistentManager anywhere in my server.xml. How is it getting enable?
 Here is the clustering part if my server.xml (I can send the entire
 server.xml if necessary).


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

 managerClassName=org.apache.catalina.cluster.session.D eltaManager
  expireSessionsOnShutdown=true
  useDirtyFlag=true
  notifyListenersOnReplication=true

 Membership

 className=org.apache.catalina.cluster.mcast.McastServic
 e
 mcastAddr=228.0.0.4
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000/

 Receiver

 className=org.apache.catalina.cluster.tcp.ReplicationLi stener
 tcpListenAddress=auto
 tcpListenPort=4001
 tcpSelectorTimeout=100
 tcpThreadCount=6/

 Sender

 className=org.apache.catalina.cluster.tcp.ReplicationTr ansmitter
 replicationMode=pooled
 ackTimeout=15000/

 Valve
 className=org.apache.catalina.cluster.tcp.ReplicationValve

 filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.ht
 ml;.*\.css;.*\.txt;/

 Deployer
 className=org.apache.catalina.cluster.deploy.FarmWarDeployer
   tempDir=c:/jakarta-tomcat-5.5.7/temp
   deployDir=c:/jakarta-tomcat-5.5.7/webapps

 watchDir=c:/jakarta-tomcat-5.5.7-deployer/build/w ebapp
   watchEnabled=false/
 /Cluster

 Thank you - Richard


 -Original Message-
 From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 27, 2005 10:34 AM
 To: Tomcat Users List
 Cc: [EMAIL PROTECTED]
 Subject: Re: JK, Session Replication/Clustering, SSL and failover in
 Tomcat 5


 As mentioned, you can't have the persistence manager, with clustering.


 DEBUG TP-Processor3
 org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
 DeltaManager [EMAIL PROTECTED] at
 /stars



 - Original Message -
 From: Richard Mixon (qwest) [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Thursday, January 27, 2005 10:55 AM
 Subject: RE: JK, Session Replication/Clustering, SSL and failover in
 Tomcat 5


 Filip/all,

 Thank you - with your suggestion I was able to get it configured as
 follows:

 1) After the Server  line in server.xml I added
  Listener

className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
 fecycleListener /

 2) I added to the conf/context.xml this line:
  Valve
 className=org.apache.catalina.cluster.session.JvmRouteBinderValve /

 All starts fine. But I still get prompted to logon when the failover
 occurs from srv1 to srv2.

 Here are the Tomcat logs (I have mostly just the cluster logging
 enabled. Can you see anything that is not correct?

 TOMCAT LOG - SRV1 BEGIN
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
 Setting replcation mode to pooled
  DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
 request

filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
  DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
 filter=.*\.gif
  DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
 filter=.*\.js
  DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
 filter=.*\.jpg
  DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
 filter=.*\.png
  DEBUG main 

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Robert F. Hall
Try killing one of the Tomcat JVM's at the OS level.
-Robert
Richard Mixon (qwest) wrote:
Filip,
Thanks so much for some reason taking the Manager  statement
completely out of the context worked.
I can now see session replication occurring, which then identified some
objects that were not serializable. I have fixed these and can see the
session replicating correctly in the log messages.
I quickly realized that I could not just run catalina stop as this
caused the session to be deleted on both the tomcat instance that was
stopping and on the remaining Tomcat instance - hence the reason I was
always prompted to re-login in.
So how do I trigger the maintenance failover? If I use the Admin
console to delete the port 8009 connector (first Tomcat instance), this
does not prevent JK from continuing to route traffic to this instance.
I also tried using ant stop from the tomcat-deployer, but this results
in a HTTP Status 503 - This application is not currently available
message.
I feel like I'm very close, but not quite there.
Thank you - Richard
Filip Hanik - Dev wrote:
 

you said you enabled it in your context.xml file, if so remove it
 snip - this was getting really long...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev lists
expireSessionsOnShutdown=true
set this property to false!
this will not kill the sessions on the other servers during shutdown.
but, yes kill -9 or taskmanager killing it, will work too
Filip

Richard Mixon (qwest) wrote:
Filip,
Thanks so much for some reason taking the Manager  statement
completely out of the context worked.
I can now see session replication occurring, which then identified some
objects that were not serializable. I have fixed these and can see the
session replicating correctly in the log messages.
I quickly realized that I could not just run catalina stop as this
caused the session to be deleted on both the tomcat instance that was
stopping and on the remaining Tomcat instance - hence the reason I was
always prompted to re-login in.
So how do I trigger the maintenance failover? If I use the Admin
console to delete the port 8009 connector (first Tomcat instance), this
does not prevent JK from continuing to route traffic to this instance.
I also tried using ant stop from the tomcat-deployer, but this results
in a HTTP Status 503 - This application is not currently available
message.
I feel like I'm very close, but not quite there.
Thank you - Richard
Filip Hanik - Dev wrote:
 

you said you enabled it in your context.xml file, if so remove it
Filip
- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Cc: 
Sent: Thursday, January 27, 2005 12:08 PM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5
Filip,
Yes you did say that earlier. However I do not reference
PersistentManager anywhere in my server.xml. How is it getting enable?
Here is the clustering part if my server.xml (I can send the entire
server.xml if necessary).
   Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
managerClassName=org.apache.catalina.cluster.session.D eltaManager
expireSessionsOnShutdown=true
useDirtyFlag=true
notifyListenersOnReplication=true
   Membership
className=org.apache.catalina.cluster.mcast.McastServic
e
   mcastAddr=228.0.0.4
   mcastPort=45564
   mcastFrequency=500
   mcastDropTime=3000/
   Receiver
className=org.apache.catalina.cluster.tcp.ReplicationLi stener
   tcpListenAddress=auto
   tcpListenPort=4001
   tcpSelectorTimeout=100
   tcpThreadCount=6/
   Sender
className=org.apache.catalina.cluster.tcp.ReplicationTr ansmitter
   replicationMode=pooled
   ackTimeout=15000/
   Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.ht
ml;.*\.css;.*\.txt;/
   Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
 tempDir=c:/jakarta-tomcat-5.5.7/temp
 deployDir=c:/jakarta-tomcat-5.5.7/webapps
watchDir=c:/jakarta-tomcat-5.5.7-deployer/build/w ebapp
 watchEnabled=false/
   /Cluster
Thank you - Richard
-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 10:34 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5
As mentioned, you can't have the persistence manager, with clustering.
DEBUG TP-Processor3
org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster
DeltaManager [EMAIL PROTECTED] at
/stars

- Original Message -
From: Richard Mixon (qwest) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:55 AM
Subject: RE: JK, Session Replication/Clustering, SSL and failover in
Tomcat 5
Filip/all,
Thank you - with your suggestion I was able to get it configured as
follows:
1) After the Server  line in server.xml I added
Listener
   

className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
 

fecycleListener /
2) I added to the conf/context.xml this line:
Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve /
All starts fine. But I still get prompted to logon when the failover
occurs from srv1 to srv2.
Here are the Tomcat logs (I have mostly just the cluster logging
enabled. Can you see anything that is not correct?
TOMCAT LOG - SRV1 BEGIN
DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter -
Setting replcation mode to pooled
DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading
request
   

filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
 

DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.gif
DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.js
DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request
filter=.*\.jpg
DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - 

RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Robert F. Hall wrote:
 Try killing one of the Tomcat JVM's at the OS level.

Robert - thanks! That worked. - Richard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip Hanik - Dev lists wrote:
 expireSessionsOnShutdown=true

 set this property to false!

 this will not kill the sessions on the other servers during shutdown.
 but, yes kill -9 or taskmanager killing it, will work too

Filip,

Thank you so much. Setting expireSessionsOnShutdown=false allowed
failover to occur without prompting the user to login again. Wonderful!

However, I then brought srv1 back up I got a number of exceptions when
they tried to re-synchronize with the still running srv2. Any ideas on
how to resolve this?

Thanks again - Richard

TOMCAT LOG:
INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
 DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
 INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=153297]
 INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
 INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
 DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating
ClusterManager for context /stars using class
org.apache.catalina.cluster.session.DeltaManager
 DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are
synched: Replication took=141 ms.
 DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session B8CBD8B217266316C21F64ED963EB502.srv2
 DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session D0FC475D32E30BD6BDC4814DDFED39F7.srv2
 ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.struts.util.MessageResourcesFactory -
MessageResourcesFactory.createFactory
 java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1
19)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso
urcesFactory.java:150)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResou
rces.java:495)
at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63)
at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
at
java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641
)
at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47)
at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at
java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172
)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693
)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession
.java:1414)
at
org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes
sion.java:910)
at
org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav
a:391)
at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa
nager.java:842)
at
org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(Del
taManager.java:712)
at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim
pleTcpCluster.java:619)
at
org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:69
)
at
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep
licationThread.java:126)
at
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT
hread.java:64)
DEBUG 

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev lists
Interesting, I haven't done any work with the latest work of tomcat 
because of engagements elsewhere. but you have the time to create a very 
small simple war file where this occurs, I will look at it tomorrow.

It looks like the context class loader is not getting set properly, and 
this could be an actual bug. I'll try to get this running tomorrow.

Filip
Richard Mixon (qwest) wrote:
Filip Hanik - Dev lists wrote:
 

expireSessionsOnShutdown=true
set this property to false!
this will not kill the sessions on the other servers during shutdown.
but, yes kill -9 or taskmanager killing it, will work too
   

Filip,
Thank you so much. Setting expireSessionsOnShutdown=false allowed
failover to occur without prompting the user to login again. Wonderful!
However, I then brought srv1 back up I got a number of exceptions when
they tried to re-synchronize with the still running srv2. Any ideas on
how to resolve this?
Thanks again - Richard
TOMCAT LOG:
INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=153297]
INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating
ClusterManager for context /stars using class
org.apache.catalina.cluster.session.DeltaManager
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are
synched: Replication took=141 ms.
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session B8CBD8B217266316C21F64ED963EB502.srv2
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session D0FC475D32E30BD6BDC4814DDFED39F7.srv2
ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.struts.util.MessageResourcesFactory -
MessageResourcesFactory.createFactory
java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1
19)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso
urcesFactory.java:150)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResou
rces.java:495)
at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63)
at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
at
java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641
)
at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47)
at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at
java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172
)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693
)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession
.java:1414)
at
org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes
sion.java:910)
at
org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav
a:391)
at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa
nager.java:842)
at
org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(Del
taManager.java:712)
at

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev lists
I meant, if you have time to create a simple test app, that I can work 
with, it will speed up the process

Filip
Filip Hanik - Dev lists wrote:
Interesting, I haven't done any work with the latest work of tomcat 
because of engagements elsewhere. but you have the time to create a 
very small simple war file where this occurs, I will look at it tomorrow.

It looks like the context class loader is not getting set properly, 
and this could be an actual bug. I'll try to get this running tomorrow.

Filip
Richard Mixon (qwest) wrote:
Filip Hanik - Dev lists wrote:
 

expireSessionsOnShutdown=true
set this property to false!
this will not kill the sessions on the other servers during shutdown.
but, yes kill -9 or taskmanager killing it, will work too
  

Filip,
Thank you so much. Setting expireSessionsOnShutdown=false allowed
failover to occur without prompting the user to login again. Wonderful!
However, I then brought srv1 back up I got a number of exceptions when
they tried to re-synchronize with the still running srv2. Any ideas on
how to resolve this?
Thanks again - Richard
TOMCAT LOG:
INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=153297]
INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating
ClusterManager for context /stars using class
org.apache.catalina.cluster.session.DeltaManager
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are
synched: Replication took=141 ms.
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session B8CBD8B217266316C21F64ED963EB502.srv2
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session D0FC475D32E30BD6BDC4814DDFED39F7.srv2
ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.struts.util.MessageResourcesFactory -
MessageResourcesFactory.createFactory
java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1
19)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso
urcesFactory.java:150)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResou
rces.java:495)
at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63)
at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
at
java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641
)
at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47)
at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at
java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172
)
at 
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693
)
at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession
.java:1414)
at
org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes
sion.java:910)
at
org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav
a:391)
at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa
nager.java:842)
at
org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(Del
taManager.java:712)
at

Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev lists
another thought,
this object com.ltoj.webapp.util.ClassGrid
does it contain a reference to a struts object, and maybe that is why 
the loading doesn't work, just a thought.

Filip
Filip Hanik - Dev lists wrote:
Interesting, I haven't done any work with the latest work of tomcat 
because of engagements elsewhere. but you have the time to create a 
very small simple war file where this occurs, I will look at it tomorrow.

It looks like the context class loader is not getting set properly, 
and this could be an actual bug. I'll try to get this running tomorrow.

Filip
Richard Mixon (qwest) wrote:
Filip Hanik - Dev lists wrote:
 

expireSessionsOnShutdown=true
set this property to false!
this will not kill the sessions on the other servers during shutdown.
but, yes kill -9 or taskmanager killing it, will work too
  

Filip,
Thank you so much. Setting expireSessionsOnShutdown=false allowed
failover to occur without prompting the user to login again. Wonderful!
However, I then brought srv1 back up I got a number of exceptions when
they tried to re-synchronize with the still running srv2. Any ideas on
how to resolve this?
Thanks again - Richard
TOMCAT LOG:
INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is
about to start
DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking
addValve on StandardEngine[Catalina].StandardHost[localhost] with
class=org.apache.catalina.cluster.tcp.ReplicationValve
DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener -
Starting replication listener on address:192.168.1.140
INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for
2000 secs to establish cluster membership
INFO Cluster-MembershipReceiver
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140:
4002,192.168.1.140,4002, alive=153297]
INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster
FarmWarDeployer started.
INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve -
JvmRouteBinderValve started
DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating
ClusterManager for context /stars using class
org.apache.catalina.cluster.session.DeltaManager
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are
synched: Replication took=141 ms.
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session B8CBD8B217266316C21F64ED963EB502.srv2
DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.catalina.cluster.session.DeltaManager - readObject() loading
session D0FC475D32E30BD6BDC4814DDFED39F7.srv2
ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2]
org.apache.struts.util.MessageResourcesFactory -
MessageResourcesFactory.createFactory
java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1
19)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso
urcesFactory.java:150)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResou
rces.java:495)
at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63)
at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
at
java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641
)
at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47)
at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175)
at java.security.AccessController.doPrivileged(Native Method)
at
java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172
)
at 
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693
)
at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession
.java:1414)
at
org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes
sion.java:910)
at
org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav
a:391)
at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa
nager.java:842)
at

RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip Hanik - Dev lists wrote:
 another thought,

 this object com.ltoj.webapp.util.ClassGrid

 does it contain a reference to a struts object, and maybe that is why
 the loading doesn't work, just a thought.

 Filip Hanik - Dev lists wrote:

 Interesting, I haven't done any work with the latest work of tomcat
 because of engagements elsewhere. but you have the time to create a
 very small simple war file where this occurs, I will look at it
 tomorrow.

 It looks like the context class loader is not getting set properly,
 and this could be an actual bug. I'll try to get this running
 tomorrow.

Filip, I believe you hit it once again. I've got code such as:

  ...
  public class ClassGrid implements java.io.Serializable
  {
static MessageResources msgRsrcs =
MessageResources.getMessageResources(ApplicationResources);
private static Log log = LogFactory.getLog(ClassGrid.class);
  

Both the variables log and msgRsrcs are static initialized and would
be a problem when replicating from one JVM to another.

The instance variable log should not even be static - can fix that.

The variable msgRsrcs I'm not sure how to fix. I've been fighting with
too much reference to Struts in my business logic for a while. I know
better, but have had problems seeing around how to handle such things as
i18n message resource handling which Struts does so well. Any
suggestions? I realize this is quite off-topic.

Thank you much - Richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Make Tomcat use one JVM for JSPs accessed from multiple URL paths

2005-01-27 Thread Ethan Herdrick (ReAtlas)
How do I get Tomcat to serve the same JSPs from the same directory for URLs
with different requested paths, yet use a single JVM instance?  I know that
I can create two different contexts that use the same docBase, but
unfortunately each context will have its own JVM.

So, is there a way to get Tomcat to use a single JVM across multiple
contexts? Or, is there a way to make virtual directories that point to one
real directory within a single context?

I'm currently using Tomcat 5.0.27.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Filip Hanik - Dev lists
Hi Richard,
Static variable don't get serialized with an object (anyone correct me 
if I am wrong), so that is not the problem.
I believe it to be a bug. Struts is taking a class loader and loading 
the data, my guess is that its taking the context classloader, and that 
one is not set properly.

Let me see what I can dig up before I send you off to do something crazy :)
Filip
Richard Mixon (qwest) wrote:
Filip Hanik - Dev lists wrote:
 

another thought,
this object com.ltoj.webapp.util.ClassGrid
does it contain a reference to a struts object, and maybe that is why
the loading doesn't work, just a thought.
Filip Hanik - Dev lists wrote:
   

Interesting, I haven't done any work with the latest work of tomcat
because of engagements elsewhere. but you have the time to create a
very small simple war file where this occurs, I will look at it
tomorrow.
It looks like the context class loader is not getting set properly,
and this could be an actual bug. I'll try to get this running
tomorrow.
 

Filip, I believe you hit it once again. I've got code such as:
 ...
 public class ClassGrid implements java.io.Serializable
 {
   static MessageResources msgRsrcs =
MessageResources.getMessageResources(ApplicationResources);
   private static Log log = LogFactory.getLog(ClassGrid.class);
 
Both the variables log and msgRsrcs are static initialized and would
be a problem when replicating from one JVM to another.
The instance variable log should not even be static - can fix that.
The variable msgRsrcs I'm not sure how to fix. I've been fighting with
too much reference to Struts in my business logic for a while. I know
better, but have had problems seeing around how to handle such things as
i18n message resource handling which Struts does so well. Any
suggestions? I realize this is quite off-topic.
Thank you much - Richard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Make Tomcat use one JVM for JSPs accessed from multiple URL paths

2005-01-27 Thread Caldarale, Charles R
 From: Ethan Herdrick (ReAtlas) [mailto:[EMAIL PROTECTED]
 Subject: Make Tomcat use one JVM for JSPs accessed from multiple URL paths
 
 I can create two different contexts that use the same docBase, but
 unfortunately each context will have its own JVM.

??? I think there's a little confusion here - there's only one JVM per Tomcat 
execution, regardless of the number of contexts deployed within a Tomcat.

What are you really trying to do?

 - Chuck


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: logging remote IP address

2005-01-27 Thread Parsons Technical Services
If what you are trying to see is the private IP of a machine then you will 
only have success if the machine was named the IP. Not likely. The IP is not 
stored in the HTTP header (Unless I missed it) but is derived from the 
TCP/IP packet. When a machine is on a private network this address is 
rewritten by the router the provides NAT or PAT translation.

The one IP that is returned is the IP given by the router. Or is the 
actual IP of the machine.

If I misunderstood what you needed let me know.
Doug
- Original Message - 
From: Mark [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 3:28 PM
Subject: logging remote IP address


Hi,
Can anybody help how to log remote IP internal address using catalina
logger (org.apache.catalina.*) classes and Http request class?
request.getRemoteAddr() returns only one IP, but I'd like to see if
the request came from subnewtwork or not:
I'm looking for both values external IP and internal so my log will
look like:
200.200.200.200 (192.168.1.2) - - [5/Jan/2005:15:56:23 -0500] GET
/test/index.jsp HTTP/1.0 200 354
Thanks,
Mark.

__
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5

2005-01-27 Thread Richard Mixon (qwest)
Filip Hanik - Dev lists wrote:
 Hi Richard,
 Static variable don't get serialized with an object (anyone correct me
 if I am wrong), so that is not the problem.
 I believe it to be a bug. Struts is taking a class loader and loading
 the data, my guess is that its taking the context classloader, and
 that one is not set properly.

 Let me see what I can dig up before I send you off to do something
 crazy :)

Filip, I'll wait to hear and do some general cleanup in the meanwhile.
Will let you know if that makes a difference.

Regards - Richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make Tomcat use one JVM for JSPs accessed from multiple URL paths

2005-01-27 Thread Parsons Technical Services
I think he may be looking for the alias attribute in the context. Different 
URLs served by the same app.

Give an example and we can probably give you an answer.
Doug
- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 10:20 PM
Subject: RE: Make Tomcat use one JVM for JSPs accessed from multiple URL 
paths


From: Ethan Herdrick (ReAtlas) [mailto:[EMAIL PROTECTED]
Subject: Make Tomcat use one JVM for JSPs accessed from multiple URL paths
I can create two different contexts that use the same docBase, but
unfortunately each context will have its own JVM.
??? I think there's a little confusion here - there's only one JVM per 
Tomcat execution, regardless of the number of contexts deployed within a 
Tomcat.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Invoker workaround on AIX

2005-01-27 Thread Parsons Technical Services
I have not worked with TC4 but I think your problem is that the mappings for 
the servlets should be in the web.xml for the app and not in the general 
web.xml. Also when you do the mappings in the app web.xml you do not need 
fully qualified paths.

Doug
- Original Message - 
From: Flaffer [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 12:37 PM
Subject: Invoker workaround on AIX


I am migrating around 10 apps from Tomcat 4.0.6 (Sun JDK 1.3.1) to
Tomcat 4.0.6 on AIX 5.2 using IBMs JDK 1.3.1sr7).
I am having an issue working around the invoker servlet. I have the
workaround(where you explicitely map the /servlet context ) working on
Solaris. But when I bring the config over to AIX, the URI  /servlet
cannot be mapped to a context.
Here are the two configs. The first one does not work. It throws this
error in the engine log:
2005-01-27 10:20:39 StandardHost[pdw0stl5]: Mapping request URI
'/servlet/com.bo.hsal.servlet'
2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the longest
context path prefix
2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the default context
2005-01-27 10:20:39 StandardHost[pdw0stl5]: MAPPING configuration
error for request URI
The access log shows a 500 error thrown on the request. Here is the
pertinent part of the web.xml for the application server instance
(i.e., conf/web.xml):
?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE web-app (View Source for full doctype...)
web-app
servlet
servlet-namedefault/servlet-name
servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
init-param
param-namelistings/param-name
param-valuefalse/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
- !--  Mapping to replace Invoker servlet. NOTE: USED ONLY BY BO APPS.
--
!--  LEAVE COMMENTED OUT FOR OTHER APPS. This addresses a securty 
concern.
--
!--  See 
http://marc.theaimsgroup.com/?l=tomcat-userm=103945394724196w=2
--

servlet
servlet-nameservlet/servlet-name
servlet-classcom.bo.hsal.HSALServlet/servlet-class
/servlet
servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueWARNING/param-value
/init-param
load-on-startup3/load-on-startup
/servlet
!--   Built In Servlet Mappings =
--
servlet-mapping
servlet-namedefault/servlet-name
url-pattern//url-pattern
/servlet-mapping
!--  Uncomment for BO Apps Only. See Invoker replacement above.
--
servlet-mapping
servlet-nameservlet/servlet-name
url-pattern/servlet/*/url-pattern
/servlet-mapping
servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping
The config that works is the default one which loads the invoker
servlet and maps it.
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
servlet
  servlet-namedefault/servlet-name
servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
  init-param
param-namedebug/param-name
param-value0/param-value
  /init-param
  init-param
param-namelistings/param-name
param-valuefalse/param-value
  /init-param
  load-on-startup1/load-on-startup
/servlet
servlet
  servlet-nameinvoker/servlet-name
servlet-classorg.apache.catalina.servlets.InvokerServlet/servlet-class
  init-param
param-namedebug/param-name
param-value0/param-value
  /init-param
  load-on-startup2/load-on-startup
/servlet
servlet
  servlet-namejsp/servlet-name
  servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
  init-param
param-namelogVerbosityLevel/param-name
param-valueWARNING/param-value
  /init-param
  load-on-startup3/load-on-startup
/servlet
!--  Built In Servlet Mappings 
= --

servlet-mapping
  servlet-namedefault/servlet-name
  url-pattern//url-pattern
/servlet-mapping
!-- The mapping for the invoker servlet --
servlet-mapping
  servlet-nameinvoker/servlet-name
  url-pattern/servlet/*/url-pattern
/servlet-mapping
Any ideas?
--
Ben Ricker
He's just this guy, you know?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat datasource not persisting across restarts

2005-01-27 Thread Parsons Technical Services
Post your config files. server.xml and web.xml from ../conf/ and the web and 
context files for you app.

Doug
- Original Message - 
From: Johnny Tolliver [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 2:07 PM
Subject: Tomcat datasource not persisting across restarts


I've built a simple web app using Sun JSCreator. It accesses a MySQL 
database,
and I've deployed on Tomcat 5.0.28. It took a little haggling to get the
datasource registration in Tomcat just right, but it finally works. I used
Tomcat's admin GUI to register the data source, and I deploy the web app 
by
using a context file.

However, I have noticed that stopping and restarting Tomcat somehow messes 
up
the datasource registration. All appears well in the admin GUI, but the 
app
doesn't work. The error is a database login error where the database 
username
and/or password are not recognized. Deleting and rebuilding the datasource
registration fixes the problem.

Is this a Tomcat problem or maybe a database problem? (The command line
interface to MySQL continues to work even when the web app complains of a 
bad
user/password).

Any ideas what's going on? Any similar experiences?
Thanks,
Johnny S. Tolliver
Oak Ridge National Laboratory
[EMAIL PROTECTED], 865-574-1305

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Basic Authentication Window

2005-01-27 Thread Gia Thornton
Hi,
   I am using Tomcat Container managed security: Basic Authentication by adding 
the following to web.xml.
 

  security-constraint
web-resource-collection
  web-resource-nameThe Entire Web Application/web-resource-name
  url-pattern/XMLServlet/url-pattern
/web-resource-collection
auth-constraint
  role-nametomcat/role-name
/auth-constraint
  /security-constraint
 login-config
auth-methodBASIC/auth-method
realm-nameUserDatabase/realm-name
  /login-config
  security-role
description
  An example role defined in conf/tomcat-users.xml
/description
role-nametomcat/role-name
  /security-role
 
-
I have used a form in my jsp:
 
form name=update method=POST action=/abc/XMLServlet
input  type=button name=save_change value=Save onclick=saveChange(event)
input  type=button name=cancel_change value=Cancel 
onclick=cancelChange(event)
input type=button name=edit value=Edit onclick=checkLogin(event)
/form
 
If I click on Edit button, the javascript checkLogin will submit the form.  
If the user has not logged in, an authentication window will pop up.  After the 
first-time authentication, the page is directed to the same page containing the 
above form.  I intentionally set setMaxInactiveInterval to be like 10 seconds 
in XMLServlet.  When the session expires, I click the Edit button again, now 
the page directly go to XMLServlet without the authentication window poped up.  
 
Does anyone know what causes this?  How can I get the authentication window pop 
up when the session expires?  Thank you for your help.
 
 
Gia
 
 


-
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'

RE: Make Tomcat use one JVM for JSPs accessed from multiple URL paths

2005-01-27 Thread Ethan Herdrick (ReAtlas)
Hmm.  I guess I jumped to a conclusion.

Here's my situation: I've been running a web app for a while now that has
multiple contexts that use the same docBase.  What I have found is that the
values of the static fields of my classes are not shared across contexts.  I
need to make all my contexts share these static fields.

I had asssumed that I was dealing with a different JVM per context, but
simply having a different classloader per context would also cause this.  So
I shouldn't have said anything about JVMs.

So I guess what I should ask is, how do I share static fields across Tomcat
contexts?  An alternate way to solve this would be to use just one context
and somehow cause requests to  multiple directories to resolve to a single
directory.  Doug - I think this is what you are suggesting, but I was under
the impression that the alias is for hosts.  I'll look into it now.

Thanks in advance!

Ethan

 Parsons Technical Services  [EMAIL PROTECTED] to Tomcat
  Show options  7:34pm (32 minutes ago)

 I think he may be looking for the alias attribute in the context.
Different
 URLs served by the same app.

 Give an example and we can probably give you an answer.

 Doug

 From: Ethan Herdrick (ReAtlas) [mailto:[EMAIL PROTECTED]
 Subject: Make Tomcat use one JVM for JSPs accessed from multiple URL paths

 I can create two different contexts that use the same docBase, but
 unfortunately each context will have its own JVM.

??? I think there's a little confusion here - there's only one JVM per
Tomcat execution, regardless of the number of contexts deployed within a
Tomcat.

What are you really trying to do?

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

- Show quoted text -

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  ReplyForwardInvite Charles R to Gmail





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make Tomcat use one JVM for JSPs accessed from multiple URL paths

2005-01-27 Thread Parsons Technical Services
You are correct. that's what I get for trying to remember stuff.
Alias is on the host element. Pointing different URLs to the same host.
So you are using one URL with several paths. And are wanting the apps to be 
able to share info.

Two ways one might do this:
Use a database or outside resource.
Or
There is a setting to allow crossContext on the context element. I haven't 
used this but one might be able to do a call for the other context and 
set/get variables.

A search of the archives might find something on this.
As for your conclusion you are correct IF:
Quote from sun site.
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html
In the case of a web application marked distributed in its deployment 
descriptor, there will be one context instance for each virtual machine. In 
this situation, the context cannot be used as a location to share global 
information (because the information won't be truly global). Use an external 
resource like a database instead.

So it will depend.
Doug
- Original Message - 
From: Ethan Herdrick (ReAtlas) [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, January 27, 2005 11:15 PM
Subject: RE: Make Tomcat use one JVM for JSPs accessed from multiple URL 
paths


Hmm.  I guess I jumped to a conclusion.
Here's my situation: I've been running a web app for a while now that has
multiple contexts that use the same docBase.  What I have found is that 
the
values of the static fields of my classes are not shared across contexts. 
I
need to make all my contexts share these static fields.

I had asssumed that I was dealing with a different JVM per context, but
simply having a different classloader per context would also cause this. 
So
I shouldn't have said anything about JVMs.

So I guess what I should ask is, how do I share static fields across 
Tomcat
contexts?  An alternate way to solve this would be to use just one context
and somehow cause requests to  multiple directories to resolve to a single
directory.  Doug - I think this is what you are suggesting, but I was 
under
the impression that the alias is for hosts.  I'll look into it now.

Thanks in advance!
Ethan
Parsons Technical Services  [EMAIL PROTECTED] to Tomcat
 Show options  7:34pm (32 minutes ago)

I think he may be looking for the alias attribute in the context.
Different
URLs served by the same app.

Give an example and we can probably give you an answer.

Doug

From: Ethan Herdrick (ReAtlas) [mailto:[EMAIL PROTECTED]
Subject: Make Tomcat use one JVM for JSPs accessed from multiple URL 
paths

I can create two different contexts that use the same docBase, but
unfortunately each context will have its own JVM.
??? I think there's a little confusion here - there's only one JVM per
Tomcat execution, regardless of the number of contexts deployed within a
Tomcat.
What are you really trying to do?
- 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.

- Show quoted text -
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 ReplyForwardInvite Charles R to Gmail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]