Re: truncated server.xml got when storing config on condition that more than one vitual host with same application base directory "webapps" were defined.

2006-01-18 Thread Peter Rossbach

Strange, but it work for me!

I have also testet with the admin app and all is going as aspected.

regards
Peter

Am 18.01.2006 um 04:46 schrieb Yong Gou:


Hi Peter,

I downloaded the 5.5.15 beta from Apache Tomcat downloads page and  
installed it on my desktop. But I found the same issue was still  
there with this version when I used its admin console webapp to add  
a new host and store config to the server.xml. The following is the  
resultant server.xml.




  className="org.apache.catalina.core.AprLifecycleListener"/>
  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener 
"/>
  className="org.apache.catalina.storeconfig.StoreConfigLifecycleListene 
r"/>
  className="org.apache.catalina.mbeans.ServerLifecycleListener"/>

  


  
  





  
  
  
  


Thanks,
Eric



-Original Message-
From: Peter Rossbach [mailto:[EMAIL PROTECTED]
Sent: 2006年1月16日 18:30
To: Tomcat Developers List
Subject: Re: truncated server.xml got when storing config on  
condition that more than one vitual host with same application base  
directory "webapps" were defined.


It storeconfig server.xml saving after add a new host works for me!

I have tested with current svn head.

create host with fixed MBean descriptor from MBeanFactory (Thanks for
this)
and store server.xml with mbean StoreConfig.storeConfig().

Regards
Peter

My saved server.xml looks like this:



   className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener 
"/



   className="org.apache.catalina.storeconfig.StoreConfigLifecycleListene 
r"

/>
   
   
 
   
   
 
 
 
 
 
   
   
   
   
   
 
   


Am 16.01.2006 um 11:03 schrieb Yong Gou:


Hi Peter,

There were just some info, no severe exception was thrown. You can
try it in your environment.

Thanks,
Eric


-Original Message-
From: Peter Rossbach [mailto:[EMAIL PROTECTED]
Sent: 2006年1月16日 17:39
To: Tomcat Developers List
Subject: Re: truncated server.xml got when storing config on
condition that more than one vitual host with same application base
directory "webapps" were defined.

Hey,

see you any exception inside your log?

Regards
peter


Am 16.01.2006 um 09:29 schrieb Yong Gou:


The version of Tomcat server is 5.5.12

-Original Message-
From: Yong Gou
Sent: 2006年1月16日 16:24
To: dev@tomcat.apache.org
Subject: truncated server.xml got when storing config on condition
that more than one vitual host with same application base directory
"webapps" were defined.

Hi,



I am not sure if the following is an issue of Tomcat JMX server  
or an

improper usage? Is there anyone who has experienced the same?

In addition to the virtual host localhost which is predefined by
Tomcat
server as the default on a Tomcat server, I created another virtual
host
testvh on the server with its attribute appBase being specified as
webapps and other attributes having their default values via Tomcat
admin console webapp, and then clicked the "commit changes"  
button to

save all configurations to the server's server.xml file. The
operations
resulted in the following server.xml.

NOTE that the Host, Engine, Service and Server elements are not
closed.
This is an incomplete server.xml. However if I specified another
value
other than webapps for its attribute appBase when the virtual host
testvh was created, the issue would disappear and I could get a
correct
server.xml. You can try to define more virtual hosts with the same
appBase webapps if two cannot reproduce the issue.







  

  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListen 
e

r
"/




  className="org.apache.catalina.storeconfig.StoreConfigLifecycleListe 
n

e
r"
/>

  

  



   
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>


  

  











  

  




d:\javadev\apache\tomcat2\conf\context.xml



  

  

gy




d:\javadev\apache\tomcat2\conf\context.xml





Thanks,

Eric








 
-

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]




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





-
To unsubscribe, e-m

DO NOT REPLY [Bug 38307] New: - Giving DataSource in context.xml works, but not in server.xml.

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38307

   Summary: Giving DataSource in context.xml works, but not in
server.xml.
   Product: Tomcat 5
   Version: 5.5.14
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P1
 Component: Unknown
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Datasource Definition is:


I put the driver into common/lib and into webapps/.../WEB-INF/lib.

happens with 5.5.12 and 5.5.15 beta.

stacktrace is:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.
createDataSource(BasicDataSource.java:780)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.
getConnection(BasicDataSource.java:540)
at dti.common.logic.impl.ConnectionPool.
getConnectionInternal(ConnectionPool.java:106)
at dti.common.logic.impl.ConnectionPool.getConnection(ConnectionPool.
java:34)
at dti.common.logic.impl.UserManagerWrapper.doLogin(UserManagerWrapper.
java:21)
at dti.common.actions.LoginAction$DoList.process(LoginAction.java:41)
at dti.common.actions.PasAction.processRequest(PasAction.java:153)
at dti.common.actions.PasAction.execute(PasAction.java:58)
at org.apache.struts.action.RequestProcessor.
processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.
java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:
1164)
at dti.common.control.PasActionServlet.process(PasActionServlet.java:98)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
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.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:667)
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(Thread.java:595)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.
createDataSource(BasicDataSource.java:773)
... 28 more

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r370082 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/core/StandardServer.java catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml webapps/docs/chan

2006-01-18 Thread pero
Author: pero
Date: Wed Jan 18 01:17:33 2006
New Revision: 370082

URL: http://svn.apache.org/viewcvs?rev=370082&view=rev
Log:
Add jmx serverInfo attribute to Server mbean

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java?rev=370082&r1=370081&r2=370082&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 Wed Jan 18 01:17:33 2006
@@ -42,6 +42,7 @@
 import org.apache.catalina.deploy.NamingResources;
 import org.apache.catalina.util.LifecycleSupport;
 import org.apache.catalina.util.StringManager;
+import org.apache.catalina.util.ServerInfo;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.modeler.Registry;
@@ -247,6 +248,14 @@
 
 }
 
+/**
+ * Report the current Tomcat Server Release number
+ * @return Tomcat release identifier
+ */
+public String getServerInfo() {
+
+return ServerInfo.getServerInfo();
+}
 
 /**
  * Return the port number we listen to for shutdown commands.

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml?rev=370082&r1=370081&r2=370082&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
 Wed Jan 18 01:17:33 2006
@@ -528,6 +528,11 @@
 
+
+
   
 http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=370082&r1=370081&r2=370082&view=diff
==
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Jan 18 01:17:33 2006
@@ -40,6 +40,13 @@
 Allow using a custom ContextConfig when using JMX embedding of Tomcat, 
as
 is doen by the regular deployer. (remm)
   
+  
+ Add JMX serverInfo attribute to Server MBean, that we can identify
+ the tomcat release remotely. (pero)
+  
+  
+ Fix the JMX MBeanFactory.createStandardHost signature at 
mbean-descriptors.xml (pero)
+  
 
   
   



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



DO NOT REPLY [Bug 38307] - Giving DataSource in context.xml works, but not in server.xml.

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38307


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 11:00 ---


*** This bug has been marked as a duplicate of 33360 ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33360] - Cannot use JNDI datasources in ROOT context

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33360


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 11:00 ---
*** Bug 38307 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Re: Initial EL/JSP 2.1 Contribution

2006-01-18 Thread Martin van den Bemt
Although you can always send an ICLA, which isn't necessarily tied to committership, but will speed 
up things when you are elected :)


Mvgr,
Martin

Remy Maucherat wrote:

Jacob Hookom wrote:

What steps would I need to take to get contributor status and develop 
the JSP 2.1 implementation with the rest of the tomcat-dev team?  Do I 
have to get elected, then complete the ICLA or is it in the reverse 
order?



Yes, you need to be elected as a committer.

Rémy

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



Source for org.apache.coyote.tomcat5.CoyoteConnector

2006-01-18 Thread Tri Le
Where can I find the source for  org.apache.coyote.tomcat5.CoyoteConnector ? I 
dowloaded the source for  Tomcat 5.5.12 but only 
saworg.apache.coyote.tomcat4.CoyoteConnector.   Thanks for any help. 
  


-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.

Re: Source for org.apache.coyote.tomcat5.CoyoteConnector

2006-01-18 Thread Peter Rossbach
You can find the tomcat 5.5 connector source at  
org.apache.catalina.connector.Connector

at the catalina/src/share dir.

Peter



Am 18.01.2006 um 14:30 schrieb Tri Le:

Where can I find the source for   
org.apache.coyote.tomcat5.CoyoteConnector ? I dowloaded the source  
for  Tomcat 5.5.12 but only  
saworg.apache.coyote.tomcat4.CoyoteConnector.   Thanks for any help.




-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your  
hands ASAP.



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



Re: Source for org.apache.coyote.tomcat5.CoyoteConnector

2006-01-18 Thread Tri Le
Thanks Peter, but I'm looking for  org.apache.coyote.tomcat5.CoyoteConnector, 
not  org.apache.catalina.connector.Connector, which I have.

Peter Rossbach <[EMAIL PROTECTED]> wrote:  You can find the tomcat 5.5 
connector source at  
org.apache.catalina.connector.Connector
at the catalina/src/share dir.

Peter



Am 18.01.2006 um 14:30 schrieb Tri Le:

> Where can I find the source for   
> org.apache.coyote.tomcat5.CoyoteConnector ? I dowloaded the source  
> for  Tomcat 5.5.12 but only  
> saworg.apache.coyote.tomcat4.CoyoteConnector.   Thanks for any help.
>
>
>
> -
> Yahoo! Photos
>  Got holiday prints? See all the ways to get quality prints in your  
> hands ASAP.


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





-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

Re: Source for org.apache.coyote.tomcat5.CoyoteConnector

2006-01-18 Thread Peter Rossbach

This class only exist at tomcat 5.0.x releases

http://svn.apache.org/repos/asf/tomcat/container/branches/tc5.0.x/ 
catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java


Peter


Am 18.01.2006 um 15:54 schrieb Tri Le:

Thanks Peter, but I'm looking for   
org.apache.coyote.tomcat5.CoyoteConnector, not   
org.apache.catalina.connector.Connector, which I have.


Peter Rossbach <[EMAIL PROTECTED]> wrote:  You can find the tomcat  
5.5 connector source at

org.apache.catalina.connector.Connector
at the catalina/src/share dir.

Peter



Am 18.01.2006 um 14:30 schrieb Tri Le:


Where can I find the source for
org.apache.coyote.tomcat5.CoyoteConnector ? I dowloaded the source
for  Tomcat 5.5.12 but only
saworg.apache.coyote.tomcat4.CoyoteConnector.   Thanks for any help.



-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your
hands ASAP.



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





-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events,  
holidays, whatever.



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



Re: Source for org.apache.coyote.tomcat5.CoyoteConnector

2006-01-18 Thread Filip Hanik - Dev Lists
ok. too many tomcat-user questions answered on dev, lets move all those 
discussions where they belong


>Re: Source for org.apache.coyote.tomcat5.CoyoteConnector
>Re: truncated server.xml got when storing config on condition that 
more than one vitual host with same application base directory "webapps" 
were defined.

>Re: Extending PersistentValve ?

thanks
Filip


Peter Rossbach wrote:

You can find the tomcat 5.5 connector source at  
org.apache.catalina.connector.Connector

at the catalina/src/share dir.

Peter



Am 18.01.2006 um 14:30 schrieb Tri Le:

Where can I find the source for   
org.apache.coyote.tomcat5.CoyoteConnector ? I dowloaded the source  
for  Tomcat 5.5.12 but only  
saworg.apache.coyote.tomcat4.CoyoteConnector.   Thanks for any help.



   
-

Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your  
hands ASAP.




-
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: truncated server.xml got when storing config on condition that more than one vitual host with same application base directory "webapps" were defined.

2006-01-18 Thread George Sexton
I didn't notice. Did you follow my advice to check write permissions on all
of the webapps directories.

As reported, if the tomcat user cannot write to each webapp (or at least the
webapp/META-INF directory), then creation of the server.xml will fail in the
manner you describe.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Yong Gou [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 17, 2006 8:47 PM
> To: Tomcat Developers List
> Subject: RE: truncated server.xml got when storing config on 
> condition that more than one vitual host with same 
> application base directory "webapps" were defined.
> 
> Hi Peter,
> 
> I downloaded the 5.5.15 beta from Apache Tomcat downloads 
> page and installed it on my desktop. But I found the same 
> issue was still there with this version when I used its admin 
> console webapp to add a new host and store config to the 
> server.xml. The following is the resultant server.xml.
> 
> 
>  port="6005">
>className="org.apache.catalina.core.AprLifecycleListener"/>
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycle
> Listener"/>
>className="org.apache.catalina.storeconfig.StoreConfigLifecycl
> eListener"/>
>className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
>   
>name="simpleValue"
>   type="java.lang.Integer"
>   value="30"/>
>auth="Container"
>   description="User database that can be updated and saved"
>   name="UserDatabase"
>   type="org.apache.catalina.UserDatabase"
>   pathname="conf/tomcat-users.xml"
>   factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
>   
>  name="Catalina">
>  port="6080"
> redirectPort="6443"
> minSpareThreads="25"
> connectionTimeout="6"
> connectionLinger="-1"
> serverSoTimeout="0"
> maxSpareThreads="75"
> maxThreads="150"
> tcpNoDelay="true"
> maxHttpHeaderSize="8192">
> 
>  port="6009"
> redirectPort="6443"
> protocol="AJP/1.3">
> 
>  defaultHost="localhost"
> name="Catalina">
>   
>  appBase="webapps"
>   name="localhost">
>   
>  appBase="webapps"
>   name="gyvh">
> 
> 
> Thanks,
> Eric
> 
> 
> 
> -Original Message-
> From: Peter Rossbach [mailto:[EMAIL PROTECTED] 
> Sent: 2006年1月16日 18:30
> To: Tomcat Developers List
> Subject: Re: truncated server.xml got when storing config on 
> condition that more than one vitual host with same 
> application base directory "webapps" were defined.
> 
> It storeconfig server.xml saving after add a new host works for me!
> 
> I have tested with current svn head.
> 
> create host with fixed MBean descriptor from MBeanFactory 
> (Thanks for  
> this)
> and store server.xml with mbean StoreConfig.storeConfig().
> 
> Regards
> Peter
> 
> My saved server.xml looks like this:
> 
> 
>   port="8010"
>  shutdown="8010">
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycle
> Listener"/ 
>  >
> className="org.apache.catalina.storeconfig.StoreConfigLifecycl
> eListener" 
> />
> className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
>
>  auth="Container"
>description="User database that can be updated and saved"
>name="UserDatabase"
>type="org.apache.catalina.UserDatabase"
>pathname="conf/tomcat-users.xml"
>factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
>
>name="Catalina">
>URIEncoding="UTF-8"
>  port="8011"
>  connectionTimeout="6"
>  connectionLinger="-1"
>  serverSoTimeout="0"
>  maxSpareThreads="10"
>  maxThreads="25"
>  tcpNoDelay="true">
>  
>URIEncoding="UTF-8"
>  port="8012"
>  minSpareThreads="4"
>  request.registerRequests="true"
>  maxSpareThreads="10"
>  maxThreads="25"
>  acceptCount="100"
>  protocol="AJP/1.3">
>  
>defaultHost="localhost"
>  jvmRoute="webdev"
>  name="Catalina">
>  digest="MD5"/>
>appBase="webapps"
>name="localhost">
>
>appBase="webapps"
>name="myhost"
>xmlNamespaceAware="true"
>xmlValidation="true">
>
>  
>
> 
> 
> Am 16.01.2006 um 11:03 schrieb Yong Gou:
> 
> > Hi Peter,
> >
> > There were just some info, no severe exception was thrown. You can  
> > try it in your environment.
> >
> > Thanks,
> > Eric
> >
> >
> > -Original Message-
> > From: Peter Rossbach [mailto:[EMAIL PROTECTED]
> > Sent: 2006年1月16日 17:39
> > To: Tomcat Developers List
> > Subject: Re: truncated server.xml got when storing config on  
> > condition that more than one vitua

DO NOT REPLY [Bug 38312] New: - servlet-api.5.0.28.jar in classpath creates problems

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38312

   Summary: servlet-api.5.0.28.jar in classpath creates problems
   Product: Tomcat 5
   Version: 5.5.9
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


I know its illegal to have a servlet-api.jar in the webapp classpath. Normally
it just gets ignored with a warning. With tomcat-5.5.9 and the servlet-api from
the previous tomcat version 5.0.28 which is then the servlet-api-2.3. I realize
that no warning is created and servlets don't function anymore.

After debugging a little bit I found a ClassCastException is produced in the
StandardWrapper.java when loading the servlet (line 1048). Thats because the
myServlet can not be casted to the servlet class of tomcat. It seems that tomcat
is in fact loading the servlet class of the webapp classloaded and therfore can
not cast it to the class of its own classloader.

Its quit unfortunate that it is not rejected that servlet-api and its not
showing ANY error message whatsoever in the normal tomcat log. The
classcastexception is not displayed, at least not when I start Tomcat normally.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 36155] - tomcat chooses wrong host if using mod_jk

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36155





--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 17:51 ---
The comment by Dan sounded much like "your config cannot work at all". So i
think i need to explain a little more:

The config does work, if you:
- restart apache, then run only "./test.sh alias1": you will only see host1 on
the console
- restart apache, then run only "./test.sh alias2": you will only see host2 on
the console
- use worker1 for the one virtualhost, and use worker2 for the other, then run
"./test.sh alias1" and "./test.sh alias2" in parallel: both scripts return the
right results.

I hope that you agree with me, that tomcat chooses the hosts like it should.
Note, that the server.xml says useIPVHosts="true" - so tomcat does AFAIK not
look at the host-header, but at some other information that mod_jk sends. Since
i also use "UseCanonicalName On" for apache, mod_jk is supposed to send the
ServerName declared for the virtualhost.

The config does not work, if you use the same worker for both virtualhosts -
which is "the right thing" IMHO since there is also only one tomcat running.
What do i mean, with "it does not work" - well:
Start "./test.sh alias1" and "./test.sh alias2" in parallel. If you're lucky, it
works for 10 requests and you see what you should: "host1" returned by the first
command, and "host2" returned by the second command.

The result changes for me, and the at least one command "goes crazy" and returns
something else: either the command only returns host1 instead of host2 (or vice
versa of course) or sometimes i even get an alternating sequence of host1 and
host2 by one of the commands - or even by both.

Especially the alternating output is a case, that should not occur. The choice
made by tomcat is deterministic AFAIK and tomcat is only considering the data
that it gets by mod_jk, so how can there be an alternating sequence?

My conclusion is, that mod_jk sends the wrong servername, or perhaps sending the
servername is optional and tomcat just "reuses" the information it has been
given by a former AJP-request on the same connection - but i have no clue about
those internal things.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38312] - servlet-api.5.0.28.jar in classpath creates problems

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38312


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 17:53 ---
This is really a one off complaint as compared to
http://tomcat.apache.org/faq/classnotfound.html#filter

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38312] - servlet-api.5.0.28.jar in classpath creates problems

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38312





--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 18:33 ---
I disagree since I the whole point is that I did not get an exception of any 
kind. The only result was that a 
servlet that I thought I defined properly was not found in the browser. The 
Browser said "Servlet  
could not be found".

Also I don't quit get it why you changed the behavior that .jars with packages 
like javax.servlet are not 
loaded in the first place in tomcat. That existed in tomcat5 and was a big 
help. I know I am a nerd but I 
love it if tomcat keeps on telling me rather than I have to waste hours to find 
that out by myself :-)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38312] - servlet-api.5.0.28.jar in classpath creates problems

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38312


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 19:59 ---
I reopen and ask you to supply a comment why you think I need to debug 
(literally debug) into the tomcat 
code to find that I have a configuration issue...thanks in advance

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38221] - Tomcat always returns HTTP 403/Forbidden for HTTP PUT, etc

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38221


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 20:24 ---
org.apache.catalina.servlets.DefaultServlet must have init-param readonly = 
false. 

ALSO NOTE that this Servlet and its configs DO affected dynamic content as as
well as static, contrary to the javadocs...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 37054] - NoClassDefFoundError using ServletContextListener

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37054





--- Additional Comments From [EMAIL PROTECTED]  2006-01-18 21:04 ---
(In reply to comment #6)
> Thank you.  I also just found that it works if i add delegate="true" to the
> loader tag.

I was mistaken.  This actually did not work.  I also tried william's workaround
(getParentClassLoader), and it didn't help.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



svn commit: r370301 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java

2006-01-18 Thread markt
Author: markt
Date: Wed Jan 18 15:15:11 2006
New Revision: 370301

URL: http://svn.apache.org/viewcvs?rev=370301&view=rev
Log:
Remove unused private method

Modified:

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java?rev=370301&r1=370300&r2=370301&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 Wed Jan 18 15:15:11 2006
@@ -2024,42 +2024,6 @@
 
 
 /**
- * Return true if the specified client and server addresses
- * are the same.  This method works around a bug in the IBM 1.1.8 JVM on
- * Linux, where the address bytes are returned reversed in some
- * circumstances.
- *
- * @param server The server's InetAddress
- * @param client The client's InetAddress
- */
-private boolean isSameAddress(InetAddress server, InetAddress client) {
-
-// Compare the byte array versions of the two addresses
-byte serverAddr[] = server.getAddress();
-byte clientAddr[] = client.getAddress();
-if (serverAddr.length != clientAddr.length)
-return (false);
-boolean match = true;
-for (int i = 0; i < serverAddr.length; i++) {
-if (serverAddr[i] != clientAddr[i]) {
-match = false;
-break;
-}
-}
-if (match)
-return (true);
-
-// Compare the reversed form of the two addresses
-for (int i = 0; i < serverAddr.length; i++) {
-if (serverAddr[i] != clientAddr[(serverAddr.length-1)-i])
-return (false);
-}
-return (true);
-
-}
-
-
-/**
  * Return true if naming should be used.
  */
 private boolean isUseNaming() {



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



svn commit: r370306 - in /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina: core/StandardServer.java mbeans/mbeans-descriptors.xml

2006-01-18 Thread markt
Author: markt
Date: Wed Jan 18 15:52:38 2006
New Revision: 370306

URL: http://svn.apache.org/viewcvs?rev=370306&view=rev
Log:
Port Peter's patch to add jmx serverInfo attribute to Server mbean

Modified:

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java?rev=370306&r1=370305&r2=370306&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardServer.java
 Wed Jan 18 15:52:38 2006
@@ -75,6 +75,7 @@
 import org.apache.catalina.session.PersistentManager;
 import org.apache.catalina.session.StandardManager;
 import org.apache.catalina.util.LifecycleSupport;
+import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.StringManager;
 
 
@@ -387,6 +388,17 @@
 }
 
 
+/**
+ * Report the current Tomcat Server Release number
+ * @return Tomcat release identifier
+ */
+public String getServerInfo() {
+
+return ServerInfo.getServerInfo();
+
+}
+
+
 /**
  * Return the shutdown command string we are waiting for.
  */

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml?rev=370306&r1=370305&r2=370306&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
 Wed Jan 18 15:52:38 2006
@@ -2614,6 +2614,11 @@
   description="TCP port for shutdown messages"
  type="int"/>
 
+
+
 



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



DO NOT REPLY [Bug 38315] New: - OutOfMemoryError : PermGen space

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38315

   Summary: OutOfMemoryError : PermGen space
   Product: Tomcat 5
   Version: 5.0.30
  Platform: Sun
OS/Version: Windows XP
Status: NEW
  Severity: major
  Priority: P5
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Hi,

I am not sure if this is a bug. I tried to fix this problem by setting -XX 
MaxPermSize
but jvm is not setting it.
The environment I am using :

Tomcat 5.0.30
Jdk 1.5
Windows XP

I am seeting in service.bat like this :
set CATALINA_OPTS=-XX:MaxPermSize=256m
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%
CATALINA_BASE%\temp;-Dcatalina.opts=%CATALINA_OPTS%" --JvmMs 512 --JvmMx 512

I am creating a  service and then starting it.
I have a JSP which shows the Heap/Non-Heap memory allocations including 
PermGen memory.
When I load this page its showing the correct values (the values I am setting) 
for Xmx Xms but for PermGen its showing the default values and not the value I 
am setting. For some reason JVM is not taking the -XX:MaxPermSize. 
But if I set these in catalina.bat like  this
set CATALINA_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m
and run startup.bat JVM is setting all these parameters correctly.

Any help would be greatly appericiated.

Thank You,
Aparna

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38315] - OutOfMemoryError : PermGen space

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38315


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-01-19 05:57 ---
This isn't the correct way to do it.  Use the tomcat5w.exe executable to set 
this in the "Java Options" box under the "Java" tab.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 38317] New: - OutOfMemoryError : PermGen space

2006-01-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38317

   Summary: OutOfMemoryError : PermGen space
   Product: Tomcat 5
   Version: 5.0.30
  Platform: Sun
OS/Version: Windows XP
Status: NEW
  Severity: major
  Priority: P5
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Hi,

I am not sure if this is a bug. I tried to fix this problem by setting -XX 
MaxPermSize
but jvm is not setting it.
The environment I am using :

Tomcat 5.0.30
Jdk 1.5
Windows XP

I am seeting in service.bat like this :
set CATALINA_OPTS=-XX:MaxPermSize=256m
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%
CATALINA_BASE%\temp;-Dcatalina.opts=%CATALINA_OPTS%" --JvmMs 512 --JvmMx 512

I am creating a  service and then starting it.
I have a JSP which shows the Heap/Non-Heap memory allocations including 
PermGen memory.
When I load this page its showing the correct values (the values I am setting) 
for Xmx Xms but for PermGen its showing the default values and not the value I 
am setting. For some reason JVM is not taking the -XX:MaxPermSize. 
But if I set these in catalina.bat like  this
set CATALINA_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m
and run startup.bat JVM is setting all these parameters correctly.

Any help would be greatly appericiated.

Thank You,
Aparna

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



Realm.authenticate() doesn't register Principal in Session.. use Authenticator instead?

2006-01-18 Thread Ken Johanson

Hi all,

I am able to access the current context's org.apache.catalina.Realm
object using Yoav Shapira's Tomcat-Realm example; however, when I call
Realm.authenticate(String user, String pass), the Principal object that
it returns is not being registered with the session (subsequent requests 
have a null Principal)..


Apparently this is because that method is normally invoked by 
AuthenticatorBase, which handles the registering of Principal with 
Session. However I can't find a way to get the Authenticator object. 
Moreover, AuthenticatorBase's register(req, res, login) method is 
protected which also complicates things slightly (given that the impl 
must be cast-to or reflection used)


My question is, what is the most straight-forward way to authenticate 
(using one or both of (String user, String pwd) or (X509Certificate 
cert)) and then register the Principal, using the currently defined 
Realm/Authenticator?


Also, is there any facility to implicitly login a user using only a void 
doLogin(Principal p)? This would allow me to completely abstract the 
authentication process and rules (especially into schemes that don't fit 
Realm's interface definition), and without having to extend Realm or 
Authenticator.


Thank,
ken



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