Only a Ip's set in application TOMCAT

2006-06-09 Thread Julio Rios

Hello, I have a Tomcat with these releases:

Versión de Tomcat: Apache Tomcat/5.5.17
Versión JVM: 1.4.2_01-b06
Nombre de SO: Windows XP

I have two applications and one web services (axis)

I like to do the tomcat filter by Ip in my applications and my web service.

For example:

App1 only can acces from 192.168.0.0/24 and 192.168.1.0/24
App2 can acces from 192.168.0.0/24 and the next Ip 100.100.100.1/32
WebService can access only from 100.100.100.1/32 and 100.100.90.1/32

It is possible?

Do you any idea where I have to change the Tomcat conf?

Best regrads, Julio.


Antwort: Re: Error re-starting war application

2006-06-09 Thread ingo . bischofs
Hi

as described before i am using Eclipse WTP 1.x for development of a web 
application and use 
it's 'Export' function for creating the .war file. 
Installing that application on Tomcat 5.5.17 works fine.

Stopping and re-starting the application fails every time with a 
NullPointerException. 
So here is the log file snipplet i've forgotten to attach to my last post:

 INFO: HTMLManager: start: Starting web application at 
'/StageScanApplication'
09.06.2006 10:02:55 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: FEHLER - Anwendung mit Kontext Pfad /StageScanApplication 
konnte nicht gestartet werden
java.lang.NullPointerException
at org.apache.log4j.spi.LocationInfo.init(LocationInfo.java:104)
at 
org.apache.log4j.spi.LoggingEvent.getLocationInformation(LoggingEvent.java:191)
at 
org.apache.log4j.helpers.PatternParser$LocationPatternConverter.convert(PatternParser.java:483)
at 
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:64)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:503)
at 
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
at 
org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:234)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
at 
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
at 
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
at org.apache.log4j.Category.callAppenders(Category.java:203)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at 
org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:110)
at 
org.apache.catalina.session.ManagerBase.init(ManagerBase.java:724)
at 
org.apache.catalina.session.StandardManager.start(StandardManager.java:618)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4137)
at 
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1175)
at 
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:527)
at 
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
09.06.2006 10:02:55 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'


pls hlp, thx

ingo

RE: Content-Disposition and Filename Attribute Not Working In Some Apache 2 Versions

2006-06-09 Thread Rob Baily
In case anyone cares it turns out this is related to compression.  A fix
in mod_setenvif for 2.0.49 and above caused compression to be turned on
for IE.  IE apparently doesn't handle the file name correctly when
compression is involved.  Firefox does though.  Changing Apache to use
compression only on text type responses resolves this.

-Original Message-
From: Rob Baily 
Sent: Thursday, June 08, 2006 1:11 PM
To: 'users@tomcat.apache.org'
Subject: Content-Disposition and Filename Attribute Not Working In Some
Apache 2 Versions

Hi, I've found that when we upgraded from Apache 2.0.48 to 2.0.49 or any
other Apache release up to the current 2.0.58 part of the
content-disposition header seems to stop working.  I opened up bug 39749
in the Apache section for this.  I got a response from a person there
who said they were stumped and suggested I suggest you discuss with the
Tomcat folks which web server behavior influences the generation of that
header field..

Can anyone help me bridge the gap on this to determine where the issue
is?  I've put my bug information from the other bug here.  I'm willing
to run other tests and things in debug mode if I am told what settings
to use and where to look for results or output.  We can reproduce this
on our development system every time.


Thanks!
Rob Baily
 

/-***-/

 

It appears that somewhere between 2.0.48 and 2.0.58 the setting of the
Content-
Disposition to set the file name for content returned broke.  We are
using 
Tomcat 5.0.28 and modJK 1.2.15.  I have put the example servlet code
below.  
When you run the URL the browser pops up with the file name
TestServlet.doc 
instead of test_file_name.doc.  I don't believe this to be a Tomcat
issue 
since it works with HTTP 2.0.48 and not with HTTP 2.0.58.
 
I ran http://dev.servicebench.com/rbaily/servlet/TestServlet on my
system with 
this test servlet.
 
Please let me know if there is anything I can do to clarify or help.
Thanks!
 
/*
 * Created on Jun 7, 2006
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.servicebench.webside.servlet;
 
import java.io.IOException;
 
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.*;
 
/**
 * @author rbaily
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class TestServlet extends HttpServlet {
 
public void doGet(HttpServletRequest req, HttpServletResponse
res)
throws ServletException, IOException
{
   doPost(req, res);
}
 
public void doPost(HttpServletRequest req, HttpServletResponse
res)
throws ServletException, IOException
{
   res.setContentType( application/msword );
   res.setContentLength( 20 );
   // set up file name
   String fileName = filename=\test_file_name.doc\;
System.out.println( filename= + fileName );
   res.setHeader( Content-Disposition, attachment; + 
fileName );
   res.setHeader( Expires, 0 );
   res.setHeader( Cache-Control, must-revalidate, post-
check=0, pre-check=0 );
   ServletOutputStream output = res.getOutputStream();
System.out.println( about to write );  
   output.print( 012345678900987654321 );
   output.flush();
   output.close();
}

}


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



Re: Only a Ip's set in application TOMCAT

2006-06-09 Thread Tim Funk

http://tomcat.apache.org/faq/security.html#restrict

-Tim

Julio Rios wrote:

Hello, I have a Tomcat with these releases:

Versión de Tomcat: Apache Tomcat/5.5.17
Versión JVM: 1.4.2_01-b06
Nombre de SO: Windows XP

I have two applications and one web services (axis)

I like to do the tomcat filter by Ip in my applications and my web service.

For example:

App1 only can acces from 192.168.0.0/24 and 192.168.1.0/24
App2 can acces from 192.168.0.0/24 and the next Ip 100.100.100.1/32
WebService can access only from 100.100.100.1/32 and 100.100.90.1/32

It is possible?

Do you any idea where I have to change the Tomcat conf?

Best regrads, Julio.



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



Re: Tomcat 5.5.17 protected pages JSP examples with valid user and invalid role results in msg 403.

2006-06-09 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
 Hi,
 
 I am having problem with Tomcat 5.5.17 jsp example of accessing
 protected pages
 (example:  http://localhost:8080/jsp-examples/security/protected/)
 
 Logging with valid user and role:
 user/password/role=tomcat/tomcat/tomcat works fine.
 Logging with a valid user and invalid role
 (user/password/role=role1/tomcat/role1) results in msg 403
 (HTTP Status 403 - Access to the requested resource has been denied).
 I am using supplied tomcat-users.xml.
 
 Before experimenting I made this role (role1) invalid by editing
 webapps/jsp-examples/WEB-INF/web.xml file like:
 ...
 auth-constraint
  role-nametomcat/role-name
  !-- role-namerole1/role-name --
 /auth-constraint
 ...
 
 After receiving msg 403 applicatin will not work even with the valid
 user role (msg 403 produced).
 
 I found the same problem for Tomcat4 reported at:
 http://mail-archives.apache.org/mod_mbox/tomcat-dev/200204.mbox/[EMAIL 
 PROTECTED]

This was resolved as INVALID. See
http://issues.apache.org/bugzilla/show_bug.cgi?id=8607

 I also have seen somewhere that it was reported to be fixed for Tomcat4.

Not fixed, it was never an issue. See above.

 
 Did the old problem penetrate to Tomcat 5.5.17 or
 did I forget to configure something?

No, there isn't am issue.

Mark

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



Re: SSL Setup

2006-06-09 Thread Roch

Thanks for the info.  Finally figured out the problem.the certs were
wrong in the keystore.  Thanks for all your help though!
--
View this message in context: 
http://www.nabble.com/SSL-Setup-t1710991.html#a4791758
Sent from the Tomcat - User forum at Nabble.com.


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



Servlet on FileTypes

2006-06-09 Thread Kenneth Østby

Hey..

I'm trying to map **/*.page to a spesific servlet, and I can't find any
documentation about.

Is there a way that I can use url-mapper to eat /**/*.page ?

Kenneth


Re: Servlet on FileTypes

2006-06-09 Thread Parsons Technical Services

Try just using *.page only.


- Original Message - 
From: Kenneth Østby [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Friday, June 09, 2006 8:39 AM
Subject: Servlet on FileTypes



Hey..

I'm trying to map **/*.page to a spesific servlet, and I can't find any
documentation about.

Is there a way that I can use url-mapper to eat /**/*.page ?

Kenneth





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



How to redirect HTTP request to HTTPS on Tomcat

2006-06-09 Thread Siddesh Prabhu

Hi Gurus,
   
  I am using Tomcat 5.0.28, I have configured SSL. Now i want to know whether 
it is possible to redirect http request to https using server.xml file, meaning 
if  i give http://localhost:8080 it should go to https://localhost:8443, I 
googled a lot but did not get a firm solution on this topic.
   
  Any ideas.
  TIA
  -Siddesh



 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Servlet on FileTypes

2006-06-09 Thread Tim Funk

You can do prefix or suffix matching. Not both. (Darn servlet spec)

-Tim

Kenneth Østby wrote:


Hey..

I'm trying to map **/*.page to a spesific servlet, and I can't find any
documentation about.

Is there a way that I can use url-mapper to eat /**/*.page ?

Kenneth



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



Re: Servlet on FileTypes

2006-06-09 Thread Kenneth Østby

On 6/9/06, Parsons Technical Services [EMAIL PROTECTED]
wrote:


Try just using *.page only.




That will only work on /*.page, not  in every  subdir.



- Original Message -

From: Kenneth Østby [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Friday, June 09, 2006 8:39 AM
Subject: Servlet on FileTypes


 Hey..

 I'm trying to map **/*.page to a spesific servlet, and I can't find any
 documentation about.

 Is there a way that I can use url-mapper to eat /**/*.page ?

 Kenneth




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




RE: How to redirect HTTP request to HTTPS on Tomcat

2006-06-09 Thread Peter Crowther
 From: Siddesh Prabhu [mailto:[EMAIL PROTECTED] 
   I am using Tomcat 5.0.28, I have configured SSL. Now i want 
 to know whether it is possible to redirect http request to 
 https using server.xml file, meaning if  i give 
 http://localhost:8080 it should go to https://localhost:8443, 
 I googled a lot but did not get a firm solution on this topic.

Not that I'm aware of, but I'm not an expert.

One trick would be to put a filter in front of your webappthat examines
the incoming request, checks the protocol and redirects to the same
server and path if it is not https - this is then a solution that you
can deploy per-webapp where needed.

- Peter

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



Tomcat 5.5.17 - undeploy fails for app containing log4j.properties

2006-06-09 Thread Hawkes, Rycharde \(HP Labs\)
I have a web-app that uses log4j-1.2.13.  I specify my own
log4j.properties file which is contained in a jar file in WEB-INF/lib.
 
Deployment is fine.  When I try to undeploy everything seems to work,
and the manager confirms this, however one file remains - the jar file
containing the log4j.properties file!  Any further attempts to undeploy
or deploy are unsuccessful and the server has to be stopped and the
remaining file (and folder structure deleted).
 
If I remove this file from the jar prior to the initial deployment then
undeploy works fine.
 
Anyone else seen this/is this a known problem?
 
Regards,
 
Rych
 


Re: Tomcat 5.5.17 - undeploy fails for app containing log4j.properties

2006-06-09 Thread Marc Farrow

What platform are you on?  I do know that the manager app will say it
undeployed the application even if it does not have permission to delete
all the files.  Then when you try to deploy/undeploy again it will fail.  If
the log4j file is the only file not being deleted, then start with
permissions on this file.

On 6/9/06, Hawkes, Rycharde (HP Labs) [EMAIL PROTECTED] wrote:


I have a web-app that uses log4j-1.2.13.  I specify my own
log4j.properties file which is contained in a jar file in WEB-INF/lib.

Deployment is fine.  When I try to undeploy everything seems to work,
and the manager confirms this, however one file remains - the jar file
containing the log4j.properties file!  Any further attempts to undeploy
or deploy are unsuccessful and the server has to be stopped and the
remaining file (and folder structure deleted).

If I remove this file from the jar prior to the initial deployment then
undeploy works fine.

Anyone else seen this/is this a known problem?

Regards,

Rych






--
Marc Farrow


RE: Tomcat 5.5.17 - undeploy fails for app containing log4j.properties

2006-06-09 Thread Hawkes, Rycharde \(HP Labs\)
Windows XP SP2.

The log4j.properties file is in a .jar file.  All the other jar files
are removed OK.   They are all created in the same way during the build
process so I don't think permissions are related to this.

It seems that Tomcat's internal logging system is picking up the
log4j.properties file in my jar file and not releasing it when I
undeploy.

Rych

 -Original Message-
 From: Marc Farrow [mailto:[EMAIL PROTECTED] 
 Sent: 09 June 2006 14:23
 To: Tomcat Users List
 Subject: Re: Tomcat 5.5.17 - undeploy fails for app 
 containing log4j.properties
 
 What platform are you on?  I do know that the manager app will say it
 undeployed the application even if it does not have 
 permission to delete
 all the files.  Then when you try to deploy/undeploy again it 
 will fail.  If
 the log4j file is the only file not being deleted, then start with
 permissions on this file.
 
 On 6/9/06, Hawkes, Rycharde (HP Labs) [EMAIL PROTECTED] wrote:
 
  I have a web-app that uses log4j-1.2.13.  I specify my own
  log4j.properties file which is contained in a jar file in 
 WEB-INF/lib.
 
  Deployment is fine.  When I try to undeploy everything 
 seems to work,
  and the manager confirms this, however one file remains - 
 the jar file
  containing the log4j.properties file!  Any further attempts 
 to undeploy
  or deploy are unsuccessful and the server has to be stopped and the
  remaining file (and folder structure deleted).
 
  If I remove this file from the jar prior to the initial 
 deployment then
  undeploy works fine.
 
  Anyone else seen this/is this a known problem?
 
  Regards,
 
  Rych
 
 
 
 
 
 -- 
 Marc Farrow
 

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



RE: Servlet on FileTypes

2006-06-09 Thread Tim Lucia
Are you sure?  How would Struts handle modules with a generic action servlet
mapping for *.do?  I.e., I can have module actions like /mod1/action1.do,
/mod1/action2.do, /mod2/action1.do, etc., all stemming from the single *.do
mapping to the action servlet.

Tim

-Original Message-
From: Kenneth Østby [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 8:54 AM
To: Tomcat Users List
Subject: Re: Servlet on FileTypes

On 6/9/06, Parsons Technical Services [EMAIL PROTECTED]
wrote:

 Try just using *.page only.



That will only work on /*.page, not  in every  subdir.



- Original Message -
 From: Kenneth Østby [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Friday, June 09, 2006 8:39 AM
 Subject: Servlet on FileTypes


  Hey..
 
  I'm trying to map **/*.page to a spesific servlet, and I can't find any
  documentation about.
 
  Is there a way that I can use url-mapper to eat /**/*.page ?
 
  Kenneth
 



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




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



RE: Tomcat 5.5.17 - undeploy fails for app containing log4j.properties

2006-06-09 Thread Tim Lucia
Do you have a LogFactory.release() in your ServletContextListener?  i.e.,
mine says:

public void contextDestroyed(ServletContextEvent sce) 
{
logger.info(Application context destroyed.);
LogFactory.release(Thread.currentThread().getContextClassLoader());
}

Tim

-Original Message-
From: Hawkes, Rycharde (HP Labs) [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 9:27 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.17 - undeploy fails for app containing
log4j.properties

Windows XP SP2.

The log4j.properties file is in a .jar file.  All the other jar files
are removed OK.   They are all created in the same way during the build
process so I don't think permissions are related to this.

It seems that Tomcat's internal logging system is picking up the
log4j.properties file in my jar file and not releasing it when I
undeploy.

Rych

 -Original Message-
 From: Marc Farrow [mailto:[EMAIL PROTECTED] 
 Sent: 09 June 2006 14:23
 To: Tomcat Users List
 Subject: Re: Tomcat 5.5.17 - undeploy fails for app 
 containing log4j.properties
 
 What platform are you on?  I do know that the manager app will say it
 undeployed the application even if it does not have 
 permission to delete
 all the files.  Then when you try to deploy/undeploy again it 
 will fail.  If
 the log4j file is the only file not being deleted, then start with
 permissions on this file.
 
 On 6/9/06, Hawkes, Rycharde (HP Labs) [EMAIL PROTECTED] wrote:
 
  I have a web-app that uses log4j-1.2.13.  I specify my own
  log4j.properties file which is contained in a jar file in 
 WEB-INF/lib.
 
  Deployment is fine.  When I try to undeploy everything 
 seems to work,
  and the manager confirms this, however one file remains - 
 the jar file
  containing the log4j.properties file!  Any further attempts 
 to undeploy
  or deploy are unsuccessful and the server has to be stopped and the
  remaining file (and folder structure deleted).
 
  If I remove this file from the jar prior to the initial 
 deployment then
  undeploy works fine.
 
  Anyone else seen this/is this a known problem?
 
  Regards,
 
  Rych
 
 
 
 
 
 -- 
 Marc Farrow
 

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


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



Re: Servlet on FileTypes

2006-06-09 Thread Tim Funk

*.do goes to struts.

Then struts does the appropriate re-mapping to the correct action.

-Tim

Tim Lucia wrote:


Are you sure?  How would Struts handle modules with a generic action servlet
mapping for *.do?  I.e., I can have module actions like /mod1/action1.do,
/mod1/action2.do, /mod2/action1.do, etc., all stemming from the single *.do
mapping to the action servlet.

Tim

-Original Message-
From: Kenneth Østby [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 8:54 AM

To: Tomcat Users List
Subject: Re: Servlet on FileTypes

On 6/9/06, Parsons Technical Services [EMAIL PROTECTED]
wrote:


Try just using *.page only.





That will only work on /*.page, not  in every  subdir.



- Original Message -


From: Kenneth Østby [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Friday, June 09, 2006 8:39 AM
Subject: Servlet on FileTypes




Hey..

I'm trying to map **/*.page to a spesific servlet, and I can't find any
documentation about.

Is there a way that I can use url-mapper to eat /**/*.page ?



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



RE: Servlet on FileTypes

2006-06-09 Thread Tim Lucia
That's what I thought.  There is a solution then (for the OP's problem), but
it does involve writing a dispatcher and mapping *.page to the dispatcher,
and having it parse the context path the way struts does.

*.jsp is the same exact case, actually.


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 9:53 AM
To: Tomcat Users List
Subject: Re: Servlet on FileTypes

*.do goes to struts.

Then struts does the appropriate re-mapping to the correct action.

-Tim

Tim Lucia wrote:

 Are you sure?  How would Struts handle modules with a generic action
servlet
 mapping for *.do?  I.e., I can have module actions like /mod1/action1.do,
 /mod1/action2.do, /mod2/action1.do, etc., all stemming from the single
*.do
 mapping to the action servlet.
 
 Tim
 
 -Original Message-
 From: Kenneth Østby [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 09, 2006 8:54 AM
 To: Tomcat Users List
 Subject: Re: Servlet on FileTypes
 
 On 6/9/06, Parsons Technical Services [EMAIL PROTECTED]
 wrote:
 
Try just using *.page only.
 
 
 
 
 That will only work on /*.page, not  in every  subdir.
 
 
 
 - Original Message -
 
From: Kenneth Østby [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Friday, June 09, 2006 8:39 AM
Subject: Servlet on FileTypes



Hey..

I'm trying to map **/*.page to a spesific servlet, and I can't find any
documentation about.

Is there a way that I can use url-mapper to eat /**/*.page ?


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


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



RE: Tomcat 5.5.17 - undeploy fails for app containing log4j.properties

2006-06-09 Thread Jim Freeby
This is related to Windows and your Context setup.  For some reason Windows 
locks some jars (don't know why), so when you undeploy, the exploded war 
directory cannot be deleted.

Try setting up your context with the following settings.

reloadable=true
antiResourceLocking=true


Let me know if this works.

-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED]
Sent: Friday, June 09, 2006 6:44 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.5.17 - undeploy fails for app containing
log4j.properties


Do you have a LogFactory.release() in your ServletContextListener?  i.e.,
mine says:

public void contextDestroyed(ServletContextEvent sce) 
{
logger.info(Application context destroyed.);
LogFactory.release(Thread.currentThread().getContextClassLoader());
}

Tim

-Original Message-
From: Hawkes, Rycharde (HP Labs) [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 9:27 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5.17 - undeploy fails for app containing
log4j.properties

Windows XP SP2.

The log4j.properties file is in a .jar file.  All the other jar files
are removed OK.   They are all created in the same way during the build
process so I don't think permissions are related to this.

It seems that Tomcat's internal logging system is picking up the
log4j.properties file in my jar file and not releasing it when I
undeploy.

Rych

 -Original Message-
 From: Marc Farrow [mailto:[EMAIL PROTECTED] 
 Sent: 09 June 2006 14:23
 To: Tomcat Users List
 Subject: Re: Tomcat 5.5.17 - undeploy fails for app 
 containing log4j.properties
 
 What platform are you on?  I do know that the manager app will say it
 undeployed the application even if it does not have 
 permission to delete
 all the files.  Then when you try to deploy/undeploy again it 
 will fail.  If
 the log4j file is the only file not being deleted, then start with
 permissions on this file.
 
 On 6/9/06, Hawkes, Rycharde (HP Labs) [EMAIL PROTECTED] wrote:
 
  I have a web-app that uses log4j-1.2.13.  I specify my own
  log4j.properties file which is contained in a jar file in 
 WEB-INF/lib.
 
  Deployment is fine.  When I try to undeploy everything 
 seems to work,
  and the manager confirms this, however one file remains - 
 the jar file
  containing the log4j.properties file!  Any further attempts 
 to undeploy
  or deploy are unsuccessful and the server has to be stopped and the
  remaining file (and folder structure deleted).
 
  If I remove this file from the jar prior to the initial 
 deployment then
  undeploy works fine.
 
  Anyone else seen this/is this a known problem?
 
  Regards,
 
  Rych
 
 
 
 
 
 -- 
 Marc Farrow
 

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


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


!DSPAM:44897b5516561804284693!


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



mod_jk - querystring

2006-06-09 Thread Arnar Gestsson

Hi,

I have a setup of Apache2.0.54, mod_jk1.2.15 and tomcat 4.1.31 and I'm 
requesting page with a long querystring, as soon as it becomes longer 
than 3200chars the application seems to break.  I've somewhere seen that 
querystring can be upto 8K  So I'm wondering if mod_jk has further 
limits. I'm looking for causes in the application but have not been 
successful finding bug so I wonder.


TIA

Arnar Gestsson

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



Re: mod_jk - querystring

2006-06-09 Thread Marc Farrow

In my experience in the past, 3200 chars was a more than I could ever get a
successful get method.  It would always truncate the query string.  How are
are you submitting the data?  Can you change it to use a form/post
submission?

On 6/9/06, Arnar Gestsson [EMAIL PROTECTED] wrote:


Hi,

I have a setup of Apache2.0.54, mod_jk1.2.15 and tomcat 4.1.31 and I'm
requesting page with a long querystring, as soon as it becomes longer
than 3200chars the application seems to break.  I've somewhere seen that
querystring can be upto 8K  So I'm wondering if mod_jk has further
limits. I'm looking for causes in the application but have not been
successful finding bug so I wonder.

TIA

Arnar Gestsson

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





--
Marc Farrow


RE: Tomcat 5.5.17 - undeploy fails for app containing log4j.properties

2006-06-09 Thread Hawkes, Rycharde \(HP Labs\)
Yes, that's fixed it.  Thanks! 

 -Original Message-
 From: Jim Freeby [mailto:[EMAIL PROTECTED] 
 Sent: 09 June 2006 16:03
 To: Tomcat Users List
 Subject: RE: Tomcat 5.5.17 - undeploy fails for app 
 containing log4j.properties
 
 This is related to Windows and your Context setup.  For some 
 reason Windows locks some jars (don't know why), so when you 
 undeploy, the exploded war directory cannot be deleted.
 
 Try setting up your context with the following settings.
 
 reloadable=true
 antiResourceLocking=true
 
 
 Let me know if this works.
 
 -Original Message-
 From: Tim Lucia [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 09, 2006 6:44 AM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 5.5.17 - undeploy fails for app containing
 log4j.properties
 
 
 Do you have a LogFactory.release() in your 
 ServletContextListener?  i.e.,
 mine says:
 
 public void contextDestroyed(ServletContextEvent sce) 
 {
 logger.info(Application context destroyed.);
 
 LogFactory.release(Thread.currentThread().getContextClassLoader());
 }
 
 Tim
 
 -Original Message-
 From: Hawkes, Rycharde (HP Labs) [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 09, 2006 9:27 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 5.5.17 - undeploy fails for app containing
 log4j.properties
 
 Windows XP SP2.
 
 The log4j.properties file is in a .jar file.  All the other jar files
 are removed OK.   They are all created in the same way during 
 the build
 process so I don't think permissions are related to this.
 
 It seems that Tomcat's internal logging system is picking up the
 log4j.properties file in my jar file and not releasing it when I
 undeploy.
 
 Rych
 
  -Original Message-
  From: Marc Farrow [mailto:[EMAIL PROTECTED] 
  Sent: 09 June 2006 14:23
  To: Tomcat Users List
  Subject: Re: Tomcat 5.5.17 - undeploy fails for app 
  containing log4j.properties
  
  What platform are you on?  I do know that the manager app 
 will say it
  undeployed the application even if it does not have 
  permission to delete
  all the files.  Then when you try to deploy/undeploy again it 
  will fail.  If
  the log4j file is the only file not being deleted, then start with
  permissions on this file.
  
  On 6/9/06, Hawkes, Rycharde (HP Labs) 
 [EMAIL PROTECTED] wrote:
  
   I have a web-app that uses log4j-1.2.13.  I specify my own
   log4j.properties file which is contained in a jar file in 
  WEB-INF/lib.
  
   Deployment is fine.  When I try to undeploy everything 
  seems to work,
   and the manager confirms this, however one file remains - 
  the jar file
   containing the log4j.properties file!  Any further attempts 
  to undeploy
   or deploy are unsuccessful and the server has to be 
 stopped and the
   remaining file (and folder structure deleted).
  
   If I remove this file from the jar prior to the initial 
  deployment then
   undeploy works fine.
  
   Anyone else seen this/is this a known problem?
  
   Regards,
  
   Rych
  
  
  
  
  
  -- 
  Marc Farrow
  
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 !DSPAM:44897b5516561804284693!
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: mod_jk - querystring

2006-06-09 Thread Seak, Teng-Fong

Arnar Gestsson wrote:

Hi,

I have a setup of Apache2.0.54, mod_jk1.2.15 and tomcat 4.1.31 and I'm 
requesting page with a long querystring, as soon as it becomes longer 
than 3200chars the application seems to break.  I've somewhere seen 
that querystring can be upto 8K

   Actually, there's no limit on the length:
http://rfc.net/rfc2616.html#s3.2.1

   But it's very unwise to use excessively long URI.  I agree with some 
authors that 100 to 200 characters are long enough for GET.  Use POST 
instead:

http://htmlhelp.com/reference/html40/forms/form.html
  So I'm wondering if mod_jk has further limits. I'm looking for 
causes in the application but have not been successful finding bug so 
I wonder.


TIA

Arnar Gestsson



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



Re: JSPs will not load with virtual domain

2006-06-09 Thread Mladen Adamovic

Dave Kennell wrote:
I have a rather intresting but probably simple problem, as I am 
basically new to tomcat. Currently I am running Tomcat 5.5.17 on a 
Windows 2000 server. I installed the admin tool and setup a connector 
for port 80 and then a host of www.btdt.com (which I handle locally on 
my DNS).


Here is the kicker. If I goto www.btdt.com/index.jsp it will not 
load...however if I goto 192.168.0.101/btdt the page renders fine. So 
I tried something static. if I goto www.btdt.com/static.htm it will 
load fine... as will 192.168.0.101/btdt/static.htm  I am absoultly 
baffled as to why the virtual host fails to render the JSPs


Can anyone help?

huh, as I see you haven't receive any answer so I will try something...
Check tomcat/logs directory... catalina.out and other files for any 
meaningful error. 
If you cannot see anything there post your server.xml file (without 
comments and unnecessary burden here) and I will try to look at it.



--
Mladen Adamovic
http://home.blic.net/adamm  http://www.shortopedia.com 
http://www.froola.com   http://www.online-utility.org



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



Re: few fat contexts of many lean contexts?

2006-06-09 Thread Javier Gonzalez

Actually, I don't - this server provides web services only and *very
small* set of reports pages, so going through the hassle of setting up
Apache in front of tomcat wasn't deemed to be worth it.

It doesn't have any impact on performance? I would have thought that
multiple contexts would eventually lead to duplicated libraries which
would ultimately lead to wasting memory.

Thanks for taking the time to answer my question.

On 6/7/06, Tim Funk [EMAIL PROTECTED] wrote:

 From a performance point of view - it doesn't matter.

 From a  maintenaince point of view - I prefer many lean clients. That way -
if one of them behaves badly - off they go into a  new JVM (assuming you have
  apache in front of tomcat)



-Tim

Javier Gonzalez wrote:
 Hi,

 I'm running a tomcat that provides services for a lot of clients.

 Each client one has a number of services (via axis) on their own
 context. Now I'm migratingto a bigger machine, and I got the doubt: is
 it better (for performance) to group as many services as possible by
 context, or have each service live in it's own context?

 In more general terms, is it better to group as much functionality as
 possible per context, or try to separate where it can be done?

 Thanks in advance,


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





--
Javier González Nicolini

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



Re: few fat contexts of many lean contexts?

2006-06-09 Thread Tim Funk
Duplicate libraries wasting some extra memory is a tiny penalty compared to 
being trapped, unable to upgrade web service when another service relies on 
the same library(and is incompatible with newer versions). (Or replace 
service with webapp)



-Tim

Javier Gonzalez wrote:


Actually, I don't - this server provides web services only and *very
small* set of reports pages, so going through the hassle of setting up
Apache in front of tomcat wasn't deemed to be worth it.

It doesn't have any impact on performance? I would have thought that
multiple contexts would eventually lead to duplicated libraries which
would ultimately lead to wasting memory.

Thanks for taking the time to answer my question.

On 6/7/06, Tim Funk [EMAIL PROTECTED] wrote:


 From a performance point of view - it doesn't matter.

 From a  maintenaince point of view - I prefer many lean clients. That 
way -
if one of them behaves badly - off they go into a  new JVM (assuming 
you have

  apache in front of tomcat)



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



Tomcat service stops

2006-06-09 Thread Marr, Richard \(HRW-ATX\)
Hi,
 
I've looked all over to try to find out what's going on with this
particular server.
 
I have a Javascript and Flash based program that uses Tomcat as an
application server, Apache as the Web Server and MySQL as the database
server.
 
Occasionally, the following error pops up in the event logs:
  
Event ID 4096
The Java Virtual Machine has exited with a code of 1, the service being
stopped.
And the Tomcat service stops and my app is hosed until the Tomcat
service is manually restarted.  
 
Anyone have any ideas as to why this may be happening?, or can point me
in another direction to look at?
I do not claim to be any kind of developer and have no connection to the
source code.
 
Thanks in advance,
 
Rich
 
Software and hardware versions:
 
Tomcat v4.1.31
Apache v1.39
MySQL v4.1.10a
Java v5.0.20.9
 
 
HP Proliant DL360 G3
Windows 2003 Server Enterprise Edition SP1
4G RAM 
 

Richard Marr

Harcourt Achieve/Steck-Vaughn 3rd Level Technical Support


 


Apache mod_jk JBoss Loadbalancing issue

2006-06-09 Thread Sanjeev Kumar Bhat, Noida

Hi,
 
We are facing a problem with respect to load balancing using mod_jk. I surfed 
through various mailing lists and otehr websites for a couple of days but could 
find nothing that could help me resolve the issue. I got your mail id from one 
of these archives and that is why I am sending you this email.
 
The scenario is as follows:
 
We have one Apache server (2.0.55) and two Jboss servers (jboss-4.0.3SP1). One 
of the Jboss instances is on the same server that has the Apache. The setup is 
on AIX machines. We have done the necessary configuration required to have the 
load balancing in place but when we do a load test the load is going to only 
one server (incidently it is the same server that also runs the apache server). 
If I shutdown this instance oif JBoss, then the load goes to the other server. 
The version of mod_jk that we are using is: 1.2.15
 
The contents from relevant files are mentioned below. Pls could you have a look 
and let me know what is it that I am missing.
 
Thanks and regards
Sanjeev
 
 
workers.properties
# Define list of workers that will be used
# for mapping requests
worker.list=loadbalancer,status
#worker.list=node1
 
# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=168.146.16.215
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.cachesize=10
 
# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=168.146.16.214
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.cachesize=10
 
# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1
 
# Status worker for managing load balancer
worker.status.type=status

 
httpd.conf relevant section
 
VirtualHost 168.146.16.215:80
ServerAdmin [EMAIL PROTECTED]
ServerName oldtut012.pearsontc.net
DocumentRoot /usr1/app/apache/htdocs/oldtut012
DirectoryIndex index.html index.jsp
ErrorLog /usr1/logs/oldtut012-error_log
CustomLog /usr1/logs/oldtut012-access_log common
 JkMount /*.jsp loadbalancer 
 JkMount /web-console loadbalancer 
 JkMount /web-console/* loadbalancer 
 JkMount /jmx-console loadbalancer 
 JkMount /jmx-console/* loadbalancer 
 JkMount /pims loadbalancer 
 JkMount /pims/*.jsp loadbalancer
 JkMount /pims/*.do loadbalancer

/VirtualHost

jboss-service.xml
 
attribute name=UseJKtrue/attribute
 
server.xml (First)
Engine name=jboss.web defaultHost=localhost jvmRoute=node2
 
server.xml(Second)
Engine name=jboss.web defaultHost=localhost jvmRoute=node1
 
 


DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---

What triggers jspDestroy?

2006-06-09 Thread Bob Damato
I have a page that renders a very large report using the apache jstl
tags. When the page has finished running, my memory usage jumps up 70MB.
Even if I force a full garbage collection (verified in my garbage
collector log), memory usage does not decrease. There is no data being
cached or stored in the user's session, it's simply dumped into the
request and rendered by the JSP. I've found that if I un-deploy the war
and force a full garbage collection, memory usage drops 70MB. I've also
found that after waiting about 30 minutes, the memory is released.

When I did memory snapshots before and after running that page, I could
still see the page exists in memory (org.apache.jsp.ContactReport_jsp)
and appears to be holding on to that 70MB. From what I've read
(http://issues.apache.org/bugzilla/show_bug.cgi?id=25623) , it's seems
like the memory that is used by the jstl foreach tag is not released
until the page is destroyed. I'd like to verify this is truly the case
and I'd also like to find out exactly what triggers the call to
jspDestroy. Is there a timer, a thread, a memory threshold? Is there
something I can/should configure to keep the page from eating up all of
that memory for so long? I've tried disabling tag pooling, but that had
no effect.

Thanks!!



_
Bob Damato
Cox Target Media
Internet Technology Manager
Largo, Florida

Our greatest glory is not in never falling, but in rising every time we
fall.  -- Confucius



Re: Apache mod_jk JBoss Loadbalancing issue

2006-06-09 Thread Wiley Snyder
I think you need to define 2 workers, 1 for each instance of jboss. 
not 1 worker for 2 instances of jboss



At 10:39 AM 6/9/2006, you wrote:


Hi,

We are facing a problem with respect to load balancing using mod_jk. 
I surfed through various mailing lists and otehr websites for a 
couple of days but could find nothing that could help me resolve the 
issue. I got your mail id from one of these archives and that is why 
I am sending you this email.


The scenario is as follows:

We have one Apache server (2.0.55) and two Jboss servers 
(jboss-4.0.3SP1). One of the Jboss instances is on the same server 
that has the Apache. The setup is on AIX machines. We have done the 
necessary configuration required to have the load balancing in place 
but when we do a load test the load is going to only one server 
(incidently it is the same server that also runs the apache server). 
If I shutdown this instance oif JBoss, then the load goes to the other server.

The version of mod_jk that we are using is: 1.2.15

The contents from relevant files are mentioned below. Pls could you 
have a look and let me know what is it that I am missing.


Thanks and regards
Sanjeev


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

# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=168.146.16.215
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.cachesize=10

# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=168.146.16.214
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.cachesize=10

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1

# Status worker for managing load balancer
worker.status.type=status


httpd.conf relevant section

VirtualHost 168.146.16.215:80
ServerAdmin [EMAIL PROTECTED]
ServerName oldtut012.pearsontc.net
DocumentRoot /usr1/app/apache/htdocs/oldtut012
DirectoryIndex index.html index.jsp
ErrorLog /usr1/logs/oldtut012-error_log
CustomLog /usr1/logs/oldtut012-access_log common
 JkMount /*.jsp loadbalancer
 JkMount /web-console loadbalancer
 JkMount /web-console/* loadbalancer
 JkMount /jmx-console loadbalancer
 JkMount /jmx-console/* loadbalancer
 JkMount /pims loadbalancer
 JkMount /pims/*.jsp loadbalancer
 JkMount /pims/*.do loadbalancer

/VirtualHost

jboss-service.xml

attribute name=UseJKtrue/attribute

server.xml (First)
Engine name=jboss.web defaultHost=localhost jvmRoute=node2

server.xml(Second)
Engine name=jboss.web defaultHost=localhost jvmRoute=node1




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential 
and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its 
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily 
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, 
modification, distribution and / or publication of
this message without the prior written consent of the author of this 
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and

attachments please check them for viruses and defect.
---



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



Database Persistance And Session Replication

2006-06-09 Thread David Ron

Hey everybody,
I would like to configure Tomcat for both session replication across
  3 servers and database session persistence.  The database persistence
lags several seconds which is why I don't think that I can simply
replicate sessions over many servers using the database.

I can get the sessions to persist to the database using
org.apache.catalina.session.PersistentManager, and I can get session to
replicate in memory using
org.apache.catalina.cluster.session.DeltaManager, but how to I use both
at the same time?


Here is server.xml with the in-memory replication that works:


Server port=8005 shutdown=SHUTDOWN

  Service name=Catalina
Connector className=org.apache.coyote.tomcat5.CoyoteConnector
port=80 minProcessors=5 maxProcessors=75
enableLookups=true address=192.168.0.250 redirectPort=443/

Engine name=Catalina defaultHost=tomcat
  Host name=tomcat appBase=webapps

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

managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false debug=true
 useDirtyFlag=false

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

Receiver

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

Sender

className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

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

filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/

Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/

Context path= docBase=.
!--
Manager className=org.apache.catalina.session.PersistentManager
 distributable=true
 debug=10
 checkInterval=1
 saveOnRestart=true
 maxActiveSessions=-1
 minIdleSwap=-1
 maxIdleSwap=1
 maxIdleBackup=1

 Store className=org.apache.catalina.session.JDBCStore
 debug=100


connectionURL=jdbc:mysql://192.168.0.253/tomcat?user=abcamp;password=efg
 driverName=com.mysql.jdbc.Driver
 sessionDataCol=session_data
 sessionAppCol=app_name
 sessionIdCol=session_id
 sessionLastAccessedCol=last_access
 sessionMaxInactiveCol=max_inactive
 sessionTable=tomcat_sessions
 sessionValidCol=valid_session
 /Store
/Manager
--
/Context

  /Cluster
  /Host
/Engine
  /Service
/Server


--
David Ron
IT Director - BandMerch
5126 Clareton Drive #140
Agoura Hills, CA 91301
877-502-3728 x5201
[EMAIL PROTECTED]




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

How to pass advanced GC options to tomcat 5.5.16 on windows XP running with IIS

2006-06-09 Thread davecat

Tomcat 5.5.16

Java 1.5.0_06

IIS

 


I'm trying to pass some advanced GC options to tomcat.

 

I've tried putting GC options such as -verbose:gc and 
-XX:MaxHeapFreeRatio=40 into the registry


   HKEY_LOCAL_MACHINE  SOFTWARE  Apache Software 
Foundation  Procrun 2.0  MyWebApp  Parameters  
Java  Params


 

I'm using the usual tomcat5w.exe //ES// interface (aka 
prunmgr) to specify the options and put them into the 
registry.  The options are going into the registry as 
expected, but they seem to be ignored when Tomcat starts. 
When I put in some illegal options Tomcat fails to start, 
so it's not that I'm putting options in the wrong place in 
the registry.


 

-verbose:gc and -XX:MaxHeapFreeRatio seem to be ignored, 
possibly because procrun may ignore all but -D and -X 
(implied by 
http://jakarta.apache.org/commons/daemon/procrun.html but 
unspecific on whether -XX is included under -X); or 
possibly because the documentation I've been following 
describes itself as obsolete 
(http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html).


 

Suggestions greatly appreciated, including pointers to 
relevant docs.


 

 


David Hornig

Touchtown Inc.
215 Allegheny Ave., Oakmont PA 15139
412-826-0460
[EMAIL PROTECTED] - email
www.hq.touchtown.us - our corporate website
www.touchtown.tv - our TV+ service

 


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



how to install php on tomcat?

2006-06-09 Thread Nikita Tovstoles
I know nothing about php, so this may be a dumb question, but how do I 
add php support to tomcat?


thanks
-nikita

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

Re: how to install php on tomcat?

2006-06-09 Thread Hassan Schroeder

On 6/9/06, Nikita Tovstoles [EMAIL PROTECTED] wrote:

I know nothing about php, so this may be a dumb question, but how do I
add php support to tomcat?


A PHP servlet can be built from source in PHP4; last time I looked
that feature wasn't in PHP5. But I haven't looked in quite a while :-)

The PHP4 servlet worked, but wasn't all that stable, in my limited
experience. And when it crashed it took the whole JVM with it, so
I didn't think it suitable for production. YMMV.

HTH!
--
Hassan Schroeder  [EMAIL PROTECTED]

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



RE: how to install php on tomcat?

2006-06-09 Thread ScottAnders
A better idea would be to put Apache in from of Tomcat and compile PHP
into that.  There are instructions on the PHP site on how to do that:
http://www.php.net/manual/en/install.php

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 09, 2006 3:16 PM
To: Tomcat Users List
Subject: Re: how to install php on tomcat?

On 6/9/06, Nikita Tovstoles [EMAIL PROTECTED] wrote:
 I know nothing about php, so this may be a dumb question, but how do I
 add php support to tomcat?

A PHP servlet can be built from source in PHP4; last time I looked
that feature wasn't in PHP5. But I haven't looked in quite a while :-)

The PHP4 servlet worked, but wasn't all that stable, in my limited
experience. And when it crashed it took the whole JVM with it, so
I didn't think it suitable for production. YMMV.

HTH!
-- 
Hassan Schroeder  [EMAIL PROTECTED]

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


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



Re: how to install php on tomcat?

2006-06-09 Thread Gregg Leichtman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The most common and apparently more stable approach appears to use
Apache to run PHP apps with Tomcat connected through mod_jk to run
Java/JSP/etc. apps.

-= Gregg =-

Hassan Schroeder wrote:
 On 6/9/06, Nikita Tovstoles [EMAIL PROTECTED] wrote:
 I know nothing about php, so this may be a dumb question, but how
 do I add php support to tomcat?

 A PHP servlet can be built from source in PHP4; last time I looked
 that feature wasn't in PHP5. But I haven't looked in quite a while
 :-)

 The PHP4 servlet worked, but wasn't all that stable, in my limited
 experience. And when it crashed it took the whole JVM with it, so I
 didn't think it suitable for production. YMMV.

 HTH!
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEie6rMcSsEtbyA2cRAn32AJ9xOVIDE8pvQn+Oiwafd3XxCt8GvQCfZOT4
OFE78z24pDPhp45ME5YJrtw=
=FRz9
-END PGP SIGNATURE-

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



Re: how to install php on tomcat?

2006-06-09 Thread Hassan Schroeder

On 6/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

A better idea would be to put Apache in from of Tomcat and compile PHP
into that.


And an even better idea, if you *must* have PHP, would be to run
Apache *alongside* Tomcat on a separate IP, and not add pointless
complication to your operating environment.   IMHO  :-)

--
Hassan Schroeder  [EMAIL PROTECTED]

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



authentication problem deploying app to tomcat via ant

2006-06-09 Thread Anne Wilson

Hi,

I am trying to manage my tomcat webapp via ant, that is, start it, stop 
it, list apps, etc.  But I keep bumping up against an authentication 
problem.


I have read this:

http://tomcat.apache.org/tomcat-5.0-doc/manager-howto.html#Configuring%20Manager%20Application%20Access

and several other similar documents and related FAQs, etc., but am 
finding nothing that ties the error to this particular situation.



I have these and some other similar snippets in my build.xml:

property name=tomcat.home location=/opt/tomcat/
property name=tomcat.manager.url
   value=http://localhost:8080/manager/
property name=tomcat.manager.username value=/
property name=tomcat.manager.password value=y/

taskdef name=list classname=org.apache.catalina.ant.ListTask
  classpath
path location=${tomcat.home}/server/lib/catalina-ant.jar/
  /classpath
/taskdef

target name=list description=List Tomcat applications
  list url=${tomcat.manager.url}
username=${tomcat.manager.username}
password=${tomcat.manager.password}/
/target

Ant's [tidied] output is this (I may have munged the html):

list:
 [list] htmlheadtitleApache Tomcat/5.0.30 - Error 
report/titlestyle h1HTTP Status 401 - /h1 btype/b Status 
report/ppbmessage/b u/u/ppbdescription/b uThis 
request requires HTTP authentication ()./u

BUILD SUCCESSFUL
Total time: 1 second

I've checked the username and password multiple times against 
tomcat-users.xml so I believe they are correct.  (I didn't have it right 
at first, and the error then was Connection refused.  That error went 
away after I corrected them, so I think they are right now.)


I'm using java 1.5, tomcat 5.0.30, and ant 1.6.5 on Linux Fedora Core 5.

Any insights, suggestions or tips would be greatly appreciated!

TIA!

Anne





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