Re: Is it possible to configure 2 SSL connectors on one Tomcat instance?

2011-03-09 Thread Ognjen Blagojevic

Nikko,

On 9.3.2011 8:26, Nikko Nikko wrote:

  Thanks for the answers!  I have one IP and wildcard certificate which I
signed using local CA. I want to have different trust stores for client
certificate authorization. It is a small PoC/demo and I do not have 2 IP-s.

The example above is using 2 IP-s and I did not get how to create
configuration with same Ip and port but different virtual hosts.
Do you have example or just a hint how to configure it ?


Then, I believe that the only solution is to use 2 different ports on 
same IP.


Truststore is bounded to Connector, and Connector is bounded to IP + 
port combination. So, if you must have separate trust stores, then you 
must have separate Connectors, and therefore you must use 2 IP addresses 
or 2 different ports (or both).


-Ognjen

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Automatically extracted Tomcat FAQs

2011-03-09 Thread André Warnier

Stefan Henß wrote:

Hi everybody,

I'm currently doing research for my bachelor thesis on how to 
automatically extract FAQs from unstructured data.


For this I've built a system automatically performing the following:
- Load thousands of conversations from forums and mailing lists (don't 
mind the categories there, don't discriminate between sources).
- Build new categorization solely based on the conversation's texts (by 
clustering).

- Pick the best modelled categories as basis for one FAQ each.
- For each question (first entry in a thread) find the best reply from 
its answers.
- Select the most relevant and well formatted question/answer-pairs for 
each FAQ.


For the evaluation I'm interested in expert's perceptions of the 
results, e.g. if the questions are relevant, correctly answered, etc.
Also as I'll release a paper about the approach I'd be happy if you 
could rate one or two questions (stars on the details pages) so I'd have 
some statistics to present.



Here's the direct link to the Tomcat FAQs:
http://faqcluster.com/tomcat-apache-server

(There are some other interesting FAQs as well at http://faqcluster.com/)




The project sounds very interesting. (*)

But I had a quick look at the Log / error /logging part (just a psychological fixation 
of mine), and the questions and answers seem hardly relevant to Log, error or 
logging, and even for the most part irrelevant to Tomcat.

Or am I reading this wrongly ?



(*) My company's business is in the area of document and information management, which 
includes automatic indexing of literature etc..



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6

2011-03-09 Thread Bob Hall
Dharamshila,

--- On Tue, 3/8/11 at 7:35 PM, Dharamshila Khandelwal dharmshil...@gmail.com 
wrote:
Thanks for your response Christopher!
I have structs.jar in WEB-INF/lib. I even tried putting it in 
CATALINA_HOME/lib, but it didn't work. 
I have attached the log files as you had requested. 
As Chris already mentioned, attachments are normally stripped and you will need 
to copy-paste a hopefully small relevant portion of the log file(s).

- Bob




  

Re: [ANN] Apache Tomcat 7.0.10 released

2011-03-09 Thread Mark Thomas
On 09/03/2011 04:08, Michael McCutcheon wrote:
 On 3/8/2011 7:47 AM, Mark Thomas wrote:
 The Apache Tomcat team announces the immediate availability of Apache
 Tomcat 7.0.10

 
 Does this fix the bug where @ServletSecurity annotations are ignored?

It was meant to but I've just received and validated a report that shows
that the fix was incomplete. There will need to be a 7.0.11 release that
includes the completed fix. I'm starting that process now.

 I did not see that fix in the release notes, and I thought it was going
 to be included in this release.

In amongst everything I needed to do for the release, I forgot to
include this in the change log. It was updated shortly after the
release. You can always view the latest version of the change log in svn:
http://svn.apache.org/repos/asf/tomcat/trunk/webapps/docs/changelog.xml

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[SECURITY] Tomcat 7 ignores @ServletSecurity annotations

2011-03-09 Thread Mark Thomas
The fix in Tomcat 7.0.10 was incomplete. @SecurityAnnotations are still
ignored when there are no security constraints defined in web.xml (a
typical use case).

There will be a Tomcat 7.0.11 release shortly to address this. In the
meantime, the workaround of specifying at least one security constraint
in web.xml can be used to trigger the scanning of @SecurityAnnotations.

Mark
on behalf of the Apache Tomcat security team


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread Petr Hracek
I have changed sources so that the actuall state is following:

Apache things are in directory
/opt/test/htdocs
tomcat things are in directory
/opt/test/servlet

XYtest.xml is now:
?xml version='1.0' encoding='utf-8'?
Context docBase=/opt/test/servlet allowLinking=true
/Context

And jsp are stored in
/opt/test/servlet/jsp/Viewer/View.jsp

Updated HTML file stored in /opt/test/htdocs is:
frameset rows=63,40,* frameborder=0
 frame src=logo.html name=logo noresize scrolling=no
marginwidth=0 marginheight=
0
 frame src=/XYtest/servlet/jsp/Viewer/View.jsp name=toolbar
noresize scrolling=no
marginwidth=0 marginhei
ght=0
 frame src=/XYtest/servlet/jsp/Viewer/View2.jsp name=ctrl
/frameset

Apache has been updated accordingly:
ProxyPass /XYtest/servlet ajp://localhost:8009/XYtest/servlet
ProxyPassReverse /XYtest/servlet ajp://localhost:8009/XYtest/servlet

Unfortunatelly it shows me: HTTP 404

message /XYtest/servlet/jsp/Viewer/View.jsp

description The requested resource
(/XYtest/servlet/jsp/Viewer/View.jsp) is not available.

What is wrong?
Other servlets which did not used JSP are working properly.

Thank you in advance
Petr


2011/3/8 André Warnier a...@ice-sa.com:
 Petr Hracek wrote:

 Dear users,

 I would like to asked you on the some thing regarding JSP pages.
 On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28

 that's an old version of Tomcat. You should be using at least a 6.0.x
 version by now.

  I would

 like to run
 JSP pages.
 JSP pages should be run over mod_proxy_ajp.
 URL is:
 http://IP_address/XYtest/jsp/Viewer/index.html
 ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest
 ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest

 JSP page is called from HTML (index.html) and FRAME src view.jsp
 mentioned above.
 but instead of showing JSP page HTML source code is shown.

 Do you know what could be a reason?
 in the Catalina configuration directory
 (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context
 file
 test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml
 ?xml version='1.0' encoding='utf-8'?
 Context docBase=/opt/test/XYtest allowLinking=true
 /Context
 test#

 structure in Linux is:
 /opt/test/XYtest/jsp/Viewer where are located files index.html and
 view.jsp which is part of FRAME


 As a general observation : it looks like you are trying to serve the same
 directory from Apache httpd and from Tomcat.  That is generally a quite bad
 idea in terms of security, and also in terms of confusion, as you are
 experiencing here.

 To understand what is happening, you must look at it from the browser point
 of view.

 Step 1 :

 Your initial html document index.html is :

 frameset rows=63,40,* frameborder=0
  frame src=logo.html name=logo noresize scrolling=no
 marginwidth=0 marginheight=
 0
  frame src=View.jsp name=toolbar noresize scrolling=no
 marginwidth=0 marginhei
 ght=0
  frame src=View2.jsp name=ctrl
 /frameset

 and the browser loads it from the URL :
 http://IP_address/XYtest/jsp/Viewer/index.html

 Step 2 :

 In this document, the browser finds a reference to another document :

 frame src=View.jsp ..

 The browser interprets that relative URL on the base of the origin of the
 current page, and then it asks the server for that document.
 So the browser requests the document (the inside frame) from the URL :
 http://IP_address/XYtest/jsp/Viewer/View.jsp

 Step 3 :
 The Apache httpd server receives the request for

 http://IP_address/XYtest/jsp/Viewer/View.jsp

 and it tries to match it with your proxy statement :

 ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest

 It does not match (see below), so Apache httpd serves it itself, directly
 from disk.
 That is why you see the source : Tomcat never sees this request, and Apache
 has no idea that a .jsp file is anything else than text.

 Now why does it not match ?
 Because the ProxyPass directive does not understand wildcards or regexp.
 For that, you should us ProxyPassMatch, for example like this :

 ProxyPassMatch /XYtest/.*\.jsp$ ajp://localhost:8009/XYtest

 But it is still a bad idea.
 Why ?

 Suppose that in the directory /opt/test/XYtest, there is a sub-directory
 named WEB-INF, and in that directory is a file web.xml.
 This file is a configuration file for your Tomcat web application, and it
 may contain things like passwords for accessing a database for example.
 For that reason (security), Tomcat /never/ allows a user to request a
 document within the WEB-INF sub-directory of a web application.

 But with your setup, anyone can ask for the URL :
 http://IP_address/XYtest/WEB-INF/web.xml

 and Apache httpd will happily return that file (also as a text file).
 So, with you setup, you are bypassing an important security feature of
 Tomcat, because you are allowing Apache httpd to go around it.

 There are different possibilities to fix your configuration.
 The first one would be to do this in Apache :

 ProxyPass /XYtest ajp://localhost:8009/XYtest

 and NOT define the directory 

Re: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread André Warnier

Quickly, because I have to get a train..

I think that this :

Context docBase=/opt/test/servlet allowLinking=true

togethet with this :

frame src=/XYtest/servlet/jsp/Viewer/View.jsp

 is wrong. You have a servlet too many there.
In other words,

/XYtest/ already points to /opt/test/servlet.
If you say /XYtest/servlet/x, you are pointing to 
/opt/test/servlet/servlet/x, no ?







Petr Hracek wrote:

I have changed sources so that the actuall state is following:

Apache things are in directory
/opt/test/htdocs
tomcat things are in directory
/opt/test/servlet

XYtest.xml is now:
?xml version='1.0' encoding='utf-8'?
Context docBase=/opt/test/servlet allowLinking=true
/Context

And jsp are stored in
/opt/test/servlet/jsp/Viewer/View.jsp

Updated HTML file stored in /opt/test/htdocs is:
frameset rows=63,40,* frameborder=0
 frame src=logo.html name=logo noresize scrolling=no
marginwidth=0 marginheight=
0
 frame src=/XYtest/servlet/jsp/Viewer/View.jsp name=toolbar
noresize scrolling=no
marginwidth=0 marginhei
ght=0
 frame src=/XYtest/servlet/jsp/Viewer/View2.jsp name=ctrl
/frameset

Apache has been updated accordingly:
ProxyPass /XYtest/servlet ajp://localhost:8009/XYtest/servlet
ProxyPassReverse /XYtest/servlet ajp://localhost:8009/XYtest/servlet

Unfortunatelly it shows me: HTTP 404

message /XYtest/servlet/jsp/Viewer/View.jsp

description The requested resource
(/XYtest/servlet/jsp/Viewer/View.jsp) is not available.

What is wrong?
Other servlets which did not used JSP are working properly.

Thank you in advance
Petr


2011/3/8 André Warnier a...@ice-sa.com:

Petr Hracek wrote:

Dear users,

I would like to asked you on the some thing regarding JSP pages.
On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28

that's an old version of Tomcat. You should be using at least a 6.0.x
version by now.

 I would

like to run
JSP pages.
JSP pages should be run over mod_proxy_ajp.
URL is:
http://IP_address/XYtest/jsp/Viewer/index.html
ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest
ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest

JSP page is called from HTML (index.html) and FRAME src view.jsp
mentioned above.
but instead of showing JSP page HTML source code is shown.

Do you know what could be a reason?
in the Catalina configuration directory
(/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context
file
test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml
?xml version='1.0' encoding='utf-8'?
Context docBase=/opt/test/XYtest allowLinking=true
/Context
test#

structure in Linux is:
/opt/test/XYtest/jsp/Viewer where are located files index.html and
view.jsp which is part of FRAME


As a general observation : it looks like you are trying to serve the same
directory from Apache httpd and from Tomcat.  That is generally a quite bad
idea in terms of security, and also in terms of confusion, as you are
experiencing here.

To understand what is happening, you must look at it from the browser point
of view.

Step 1 :

Your initial html document index.html is :

frameset rows=63,40,* frameborder=0
 frame src=logo.html name=logo noresize scrolling=no
marginwidth=0 marginheight=
0
 frame src=View.jsp name=toolbar noresize scrolling=no
marginwidth=0 marginhei
ght=0
 frame src=View2.jsp name=ctrl
/frameset

and the browser loads it from the URL :
http://IP_address/XYtest/jsp/Viewer/index.html

Step 2 :

In this document, the browser finds a reference to another document :

frame src=View.jsp ..

The browser interprets that relative URL on the base of the origin of the
current page, and then it asks the server for that document.
So the browser requests the document (the inside frame) from the URL :
http://IP_address/XYtest/jsp/Viewer/View.jsp

Step 3 :
The Apache httpd server receives the request for

http://IP_address/XYtest/jsp/Viewer/View.jsp

and it tries to match it with your proxy statement :

ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest

It does not match (see below), so Apache httpd serves it itself, directly
from disk.
That is why you see the source : Tomcat never sees this request, and Apache
has no idea that a .jsp file is anything else than text.

Now why does it not match ?
Because the ProxyPass directive does not understand wildcards or regexp.
For that, you should us ProxyPassMatch, for example like this :

ProxyPassMatch /XYtest/.*\.jsp$ ajp://localhost:8009/XYtest

But it is still a bad idea.
Why ?

Suppose that in the directory /opt/test/XYtest, there is a sub-directory
named WEB-INF, and in that directory is a file web.xml.
This file is a configuration file for your Tomcat web application, and it
may contain things like passwords for accessing a database for example.
For that reason (security), Tomcat /never/ allows a user to request a
document within the WEB-INF sub-directory of a web application.

But with your setup, anyone can ask for the URL :
http://IP_address/XYtest/WEB-INF/web.xml

and Apache httpd will happily return that file (also as a text file).
So, 

Connector lifecycle

2011-03-09 Thread Jess Holle
I want to stop all incoming requests at a given point.  I am running 
Tomcat within a larger process and I want to stop accepting new requests 
-- ideally in such a way that those requests are immediately routed to 
another Tomcat by mod_jk.


In Tomcat 6.0.x, I tried to do this by invoking the stop() operation on 
the Connector MBeans.  This almost works -- it allows one more request 
through (and maybe more in cases, I'm not sure, but always at least one) 
and then stops accepting additional requests.  I then tried destroy().  
This works.  Both operations log an error stating Coyote connector has 
not been started, which I am currently ignoring.


In Tomcat 7.0.10, stop() exhibits the same issue -- it lets at least one 
request through after the connector is supposedly stopped.  It does not, 
however, log an error.  destroy(), however, no longer works at all -- 
producing a lifecycle exception.


It seems like there's at least one bug here -- unless there is no intent 
to allow one to reliably stop accepting connections on a given connector.


Stopping the Engine or Service MBean instead results in a 404, which is 
not really what I want -- as I want mod_jk load balancing to go 
elsewhere, not return a 404.


--
Jess Holle


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6

2011-03-09 Thread Dharamshila Khandelwal
*Localhost.log*

Mar 8, 2011 10:25:32 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 8, 2011 10:25:32 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 8, 2011 10:25:33 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 8, 2011 10:25:33 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 8, 2011 10:25:34 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Mar 8, 2011 10:25:34 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 8, 2011 10:25:34 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
--
*Catalina.2011.03.08.log*
---
INFO: Deploying configuration descriptor uom.xml
Mar 8, 2011 10:25:34 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/uom
inside the host appBase has been specified, and will be ignored
---
*Catalina.out*
---
Mar 8, 2011 10:25:30 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/opt/wmsutil/gcc-3.4.3-sparc64/lib:/opt/pvcs/vm/solaris/lib/sparc/native_threads:/usr/lib:/usr/local/lib:/opt/hsnweb/lib:::/usr/java/packages/lib/i386:/lib:/usr/lib
Mar 8, 2011 10:25:30 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-9501
Mar 8, 2011 10:25:30 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 972 ms
Mar 8, 2011 10:25:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 8, 2011 10:25:31 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor MOVEHELP.xml
Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/MOVEHELP
inside the host appBase has been specified, and will be ignored
Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor MOVE.xml
Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/MOVE
inside the host appBase has been specified, and will be ignored
Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor tomcat-docs.xml
Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase
/opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/tomcat-docs inside the host
appBase has been specified, and will be ignored
Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor webdav.xml
Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/webdav
inside the host appBase has been specified, and will be ignored
Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor jsp-examples.xml
Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase
/opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/jsp-examples inside the host
appBase has been specified, and will be ignored
Mar 8, 2011 10:25:32 PM 

Re: Connector lifecycle

2011-03-09 Thread Jess Holle
P.S. I certainly want to finish processing requests that are already 
being processed -- I want a graceful shutdown.


On 3/9/2011 8:16 AM, Jess Holle wrote:
I want to stop all incoming requests at a given point.  I am running 
Tomcat within a larger process and I want to stop accepting new 
requests -- ideally in such a way that those requests are immediately 
routed to another Tomcat by mod_jk.


In Tomcat 6.0.x, I tried to do this by invoking the stop() operation 
on the Connector MBeans.  This almost works -- it allows one more 
request through (and maybe more in cases, I'm not sure, but always at 
least one) and then stops accepting additional requests.  I then tried 
destroy().  This works.  Both operations log an error stating Coyote 
connector has not been started, which I am currently ignoring.


In Tomcat 7.0.10, stop() exhibits the same issue -- it lets at least 
one request through after the connector is supposedly stopped.  It 
does not, however, log an error.  destroy(), however, no longer works 
at all -- producing a lifecycle exception.


It seems like there's at least one bug here -- unless there is no 
intent to allow one to reliably stop accepting connections on a given 
connector.


Stopping the Engine or Service MBean instead results in a 404, which 
is not really what I want -- as I want mod_jk load balancing to go 
elsewhere, not return a 404.


--
Jess Holle




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



console with when running as service

2011-03-09 Thread Zbynek Vavros


Hi,

is it possible to setup Tomcat service in a way that it will display
console window after service start, same as when started using bat file?
I mean window to which standart outputs and errors are redirected


Thanks

   
 Kind Regards / Mit
 freundlichen Grüßen / 
 Üdvözlettel / S   
 pozdravem:
   
   
 Zbynek VAVROS (Embedded
 Development image moved
to file:
   pic04171.gif)
   
 Delivery Centre  616 00, Brno 
  Central Europe  Technicka 21 
Brno SITE Czech Republic   
   
 (Embedded image moved to  
   file: pic00024.gif)Phone: 420-53341- x6283  
  Mobile:  
  E-mail: zbynek_vav...@cz.ibm.com 
   
   
   
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
   Registered address: 
 Brno, Technicka 2995/21,  
 Zip code: 61600, Company  
   ID: 26244535
  Entered in the   
   Commercial Register 
maintained by the  
  Regional Court in Brno   
  (Part C, Entry 39922)
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
  Sídlo: Brno, Technická   
  2995/21, PSČ 61600 IČ:   
 26244535  
   Zapsaná v obchodním 
rejstříku, vedeném   
  Krajským soudem v Brně   
  oddíl C, vlozka 39922  
   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

RE: console with when running as service

2011-03-09 Thread Caldarale, Charles R
 From: Zbynek Vavros [mailto:zbynek_vav...@cz.ibm.com] 
 Subject: console with when running as service

 is it possible to setup Tomcat service in a way that it will display
 console window after service start, same as when started using bat file?
 I mean window to which standart outputs and errors are redirected

You keep asking the same question, and you apparently don't understand what a 
Windows service is for.  Services are meant to run in the background, and 
normally start *before any user logs in*.  Unless there's a logged-in user, 
there cannot be any console windows.  On newer versions of Windows (Vista and 
later), having a service interact with the desktop is mind-bogglingly painful 
experience.

If you want a console window, run Tomcat from the startup.bat script.

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Robert.Jenkin
I have not tried this... but I will give it a try..

You can have the startup.bat registered as a service and redirect output to a 
text file. This will give you a text file showing the console window output

Sincerely,

Robert Jenkin
Surecomp Services, Inc.
2 Hudson Place, 4th Floor
Hoboken, NJ 07030
Skype: robert.jenkin
Office: 201 217 1437 | Direct: 201 716 1219 | Mobile: 908 251 0537
http://www.Surecomp.com


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 09, 2011 9:41 AM
To: Tomcat Users List
Subject: RE: console with when running as service

 From: Zbynek Vavros [mailto:zbynek_vav...@cz.ibm.com] 
 Subject: console with when running as service

 is it possible to setup Tomcat service in a way that it will display
 console window after service start, same as when started using bat file?
 I mean window to which standart outputs and errors are redirected

You keep asking the same question, and you apparently don't understand what a 
Windows service is for.  Services are meant to run in the background, and 
normally start *before any user logs in*.  Unless there's a logged-in user, 
there cannot be any console windows.  On newer versions of Windows (Vista and 
later), having a service interact with the desktop is mind-bogglingly painful 
experience.

If you want a console window, run Tomcat from the startup.bat script.

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


This mail was sent via Mail-SeCure System.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Robert.Jenkin
Also as a possible enhancement to tomcat.. add a service command to the service 
app to show is output window

Sincerely,

Robert Jenkin
Surecomp Services, Inc.
2 Hudson Place, 4th Floor
Hoboken, NJ 07030
Skype: robert.jenkin
Office: 201 217 1437 | Direct: 201 716 1219 | Mobile: 908 251 0537
http://www.Surecomp.com


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 09, 2011 9:41 AM
To: Tomcat Users List
Subject: RE: console with when running as service

 From: Zbynek Vavros [mailto:zbynek_vav...@cz.ibm.com] 
 Subject: console with when running as service

 is it possible to setup Tomcat service in a way that it will display
 console window after service start, same as when started using bat file?
 I mean window to which standart outputs and errors are redirected

You keep asking the same question, and you apparently don't understand what a 
Windows service is for.  Services are meant to run in the background, and 
normally start *before any user logs in*.  Unless there's a logged-in user, 
there cannot be any console windows.  On newer versions of Windows (Vista and 
later), having a service interact with the desktop is mind-bogglingly painful 
experience.

If you want a console window, run Tomcat from the startup.bat script.

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


This mail was sent via Mail-SeCure System.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread Petr Hracek
You mean that in HTML file I should remove servlet?

Is this web.xml file correct?

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

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app
display-nameViewer/display-name

jsp-property-group
url-pattern/jsp/Viewer/*.jsp/url-pattern
/jsp-property-group
jsp-config
taglib
taglib-urihttp://java.sun.com/jstl/core-rt/taglib-uri
taglib-location/WEB-INF/c-rt.tld/taglib-location
/taglib
taglib
taglib-urihttp://java.sun.com/jstl/core/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
/taglib
/jsp-config
/web-app

best regards
Petr
2011/3/9 André Warnier a...@ice-sa.com:
 Quickly, because I have to get a train..

 I think that this :

 Context docBase=/opt/test/servlet allowLinking=true

 togethet with this :

 frame src=/XYtest/servlet/jsp/Viewer/View.jsp

  is wrong. You have a servlet too many there.
 In other words,

 /XYtest/ already points to /opt/test/servlet.
 If you say /XYtest/servlet/x, you are pointing to
 /opt/test/servlet/servlet/x, no ?







 Petr Hracek wrote:

 I have changed sources so that the actuall state is following:

 Apache things are in directory
 /opt/test/htdocs
 tomcat things are in directory
 /opt/test/servlet

 XYtest.xml is now:
 ?xml version='1.0' encoding='utf-8'?
 Context docBase=/opt/test/servlet allowLinking=true
 /Context

 And jsp are stored in
 /opt/test/servlet/jsp/Viewer/View.jsp

 Updated HTML file stored in /opt/test/htdocs is:
 frameset rows=63,40,* frameborder=0
  frame src=logo.html name=logo noresize scrolling=no
 marginwidth=0 marginheight=
 0
  frame src=/XYtest/servlet/jsp/Viewer/View.jsp name=toolbar
 noresize scrolling=no
 marginwidth=0 marginhei
 ght=0
  frame src=/XYtest/servlet/jsp/Viewer/View2.jsp name=ctrl
 /frameset

 Apache has been updated accordingly:
 ProxyPass /XYtest/servlet ajp://localhost:8009/XYtest/servlet
 ProxyPassReverse /XYtest/servlet ajp://localhost:8009/XYtest/servlet

 Unfortunatelly it shows me: HTTP 404

 message /XYtest/servlet/jsp/Viewer/View.jsp

 description The requested resource
 (/XYtest/servlet/jsp/Viewer/View.jsp) is not available.

 What is wrong?
 Other servlets which did not used JSP are working properly.

 Thank you in advance
 Petr


 2011/3/8 André Warnier a...@ice-sa.com:

 Petr Hracek wrote:

 Dear users,

 I would like to asked you on the some thing regarding JSP pages.
 On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28

 that's an old version of Tomcat. You should be using at least a 6.0.x
 version by now.

  I would

 like to run
 JSP pages.
 JSP pages should be run over mod_proxy_ajp.
 URL is:
 http://IP_address/XYtest/jsp/Viewer/index.html
 ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest
 ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest

 JSP page is called from HTML (index.html) and FRAME src view.jsp
 mentioned above.
 but instead of showing JSP page HTML source code is shown.

 Do you know what could be a reason?
 in the Catalina configuration directory
 (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context
 file
 test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml
 ?xml version='1.0' encoding='utf-8'?
 Context docBase=/opt/test/XYtest allowLinking=true
 /Context
 test#

 structure in Linux is:
 /opt/test/XYtest/jsp/Viewer where are located files index.html and
 view.jsp which is part of FRAME

 As a general observation : it looks like you are trying to serve the same
 directory from Apache httpd and from Tomcat.  That is generally a quite
 bad
 idea in terms of security, and also in terms of confusion, as you are
 experiencing here.

 To understand what is happening, you must look at it from the browser
 point
 of view.

 Step 1 :

 Your initial html document index.html is :

 frameset rows=63,40,* frameborder=0
  frame src=logo.html name=logo noresize scrolling=no
 marginwidth=0 marginheight=
 0
  frame src=View.jsp name=toolbar noresize scrolling=no
 marginwidth=0 marginhei
 ght=0
  frame src=View2.jsp name=ctrl
 /frameset

 and the browser loads it from the URL :
 http://IP_address/XYtest/jsp/Viewer/index.html

 Step 2 :

 In this document, the browser finds a reference to another document :

 frame src=View.jsp ..

 The browser interprets that relative URL on the base of the origin of the
 current page, and then it asks the server for that document.
 So the browser requests the document (the inside frame) from the URL :
 http://IP_address/XYtest/jsp/Viewer/View.jsp

 Step 3 :
 The Apache httpd server receives the request for

 http://IP_address/XYtest/jsp/Viewer/View.jsp

 and it tries to match it with your proxy statement :

 ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest

 It does not match (see below), so Apache httpd serves it itself, directly
 from disk.
 That is why you see the source : Tomcat never sees this request, and
 Apache
 has 

Re: Connector lifecycle

2011-03-09 Thread Mladen Turk

On 03/09/2011 03:26 PM, Jess Holle wrote:

P.S. I certainly want to finish processing requests that are already being 
processed -- I want a graceful shutdown.



It's a two way process.
First in mod_jk mark the node as stopped (best by using status worker).
Then after all sessions times out in Tomcat you can do what ever pleases you.


Regards
--
^TM

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Caldarale, Charles R
 From: robert.jen...@surecomp.com [mailto:robert.jen...@surecomp.com] 
 Subject: RE: console with when running as service

 You can have the startup.bat registered as a service and 
 redirect output to a text file.

Somewhat pointless, since that's exactly what the Tomcat service does by 
default.

 This will give you a text file showing the console window output

It's always possible to use some Windows equivalent of tail (is there one?) to 
look at any text-formatted log file.

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Robert.Jenkin
There is a window version of tail tailforwin32.sourceforge.net


Sincerely,

Robert Jenkin
Surecomp Services, Inc.
2 Hudson Place, 4th Floor
Hoboken, NJ 07030
Skype: robert.jenkin
Office: 201 217 1437 | Direct: 201 716 1219 | Mobile: 908 251 0537
http://www.Surecomp.com


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, March 09, 2011 9:52 AM
To: Tomcat Users List
Subject: RE: console with when running as service

 From: robert.jen...@surecomp.com [mailto:robert.jen...@surecomp.com] 
 Subject: RE: console with when running as service

 You can have the startup.bat registered as a service and 
 redirect output to a text file.

Somewhat pointless, since that's exactly what the Tomcat service does by 
default.

 This will give you a text file showing the console window output

It's always possible to use some Windows equivalent of tail (is there one?) to 
look at any text-formatted log file.

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


This mail was sent via Mail-SeCure System.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Mikolaj Rydzewski


On Wed, 9 Mar 2011 08:41:09 -0600, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:



If you want a console window, run Tomcat from the startup.bat script.


If you want just console output look at commons-daemon documentation. 
There's everything you need to redirect output to any file.


--
Mikolaj Rydzewski m...@ceti.pl

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Zbynek Vavros

Im sorry to keep asking the same question becase we have services that have
console windows!
For example Domino server does that by default :

- install it as service
- start the service
- boom, nice console window is displayed (on local and even when running on
remote, I can see it using Remote Desktop)
- when service is shut down, console window disappears

So I guess this is not functionality that Tomcat would support

   
 Kind Regards / Mit
 freundlichen Grüßen / 
 Üdvözlettel / S   
 pozdravem:
   
   
 Zbynek VAVROS (Embedded
 Development image moved
to file:
   pic15060.gif)
   
 Delivery Centre  616 00, Brno 
  Central Europe  Technicka 21 
Brno SITE Czech Republic   
   
 (Embedded image moved to  
   file: pic02068.gif)Phone: 420-53341- x6283  
  Mobile:  
  E-mail: zbynek_vav...@cz.ibm.com 
   
   
   
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
   Registered address: 
 Brno, Technicka 2995/21,  
 Zip code: 61600, Company  
   ID: 26244535
  Entered in the   
   Commercial Register 
maintained by the  
  Regional Court in Brno   
  (Part C, Entry 39922)
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
  Sídlo: Brno, Technická   
  2995/21, PSČ 61600 IČ:   
 26244535  
   Zapsaná v obchodním 
rejstříku, vedeném   
  Krajským soudem v Brně   
  oddíl C, vlozka 39922  
   





|
| From:  |
|
  
--|
  |Caldarale, Charles R chuck.caldar...@unisys.com  
 |
  
--|
|
| To:|
|
  
--|
  |Tomcat Users List users@tomcat.apache.org  
 |
  
--|
|
| Date:  |
|
  

RE: console with when running as service

2011-03-09 Thread Caldarale, Charles R
 From: Zbynek Vavros [mailto:zbynek_vav...@cz.ibm.com] 
 Subject: RE: console with when running as service

 Im sorry to keep asking the same question becase we have 
 services that have console windows!
 For example Domino server does that by default :
 - install it as service
 - start the service
 - boom, nice console window is displayed (on local and even 
 when running on remote, I can see it using Remote Desktop)
 - when service is shut down, console window disappears

And what happens when there's no Windows user logged on (the normal condition 
for a server) - just the services are running?

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector lifecycle

2011-03-09 Thread Jess Holle

So there's no way to do this from the Tomcat side?

The process embedding Tomcat knows it's stopping.  It does not 
necessarily even have an ability to connect to the web server(s) that 
are connecting to it [Apache, IIS, or SJWS, but all via the JK 
connector].  I therefore want to say this Tomcat no longer open for 
business from the Tomcat side while finishing all requests already in 
progress.


Also I was somewhat inaccurate/mistaken in my summary of Tomcat 7.0.10 
behavior.  If you invoke stop() and then destroy() on a connector(), 
then an exception is logged /but /the destroy() call succeeds.  That 
said, when it succeeds you get a 200 with no content on the next 
request.  The request *after* that is returns a 503 from Apache -- and 
presumably would have been load balanced to another Tomcat (I only have 
1 in my test at the moment).  There's still odd behavior for a single 
request after the stop/destroy().


--
Jess Holle

On 3/9/2011 8:50 AM, Mladen Turk wrote:

On 03/09/2011 03:26 PM, Jess Holle wrote:
P.S. I certainly want to finish processing requests that are already 
being processed -- I want a graceful shutdown.




It's a two way process.
First in mod_jk mark the node as stopped (best by using status worker).
Then after all sessions times out in Tomcat you can do what ever 
pleases you.



Regards




RE: console with when running as service

2011-03-09 Thread Zbynek Vavros

Exactly !
And it works just fine.
   
 Kind Regards / Mit
 freundlichen Grüßen / 
 Üdvözlettel / S   
 pozdravem:
   
   
 Zbynek VAVROS (Embedded
 Development image moved
to file:
   pic02615.gif)
   
 Delivery Centre  616 00, Brno 
  Central Europe  Technicka 21 
Brno SITE Czech Republic   
   
 (Embedded image moved to  
   file: pic10824.gif)Phone: 420-53341- x6283  
  Mobile:  
  E-mail: zbynek_vav...@cz.ibm.com 
   
   
   
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
   Registered address: 
 Brno, Technicka 2995/21,  
 Zip code: 61600, Company  
   ID: 26244535
  Entered in the   
   Commercial Register 
maintained by the  
  Regional Court in Brno   
  (Part C, Entry 39922)
   
   IBM Global Services 
  Delivery Center Czech
 Republic, s.r.o.  
  Sídlo: Brno, Technická   
  2995/21, PSČ 61600 IČ:   
 26244535  
   Zapsaná v obchodním 
rejstříku, vedeném   
  Krajským soudem v Brně   
  oddíl C, vlozka 39922  
   





|
| From:  |
|
  
--|
  |Caldarale, Charles R chuck.caldar...@unisys.com  
 |
  
--|
|
| To:|
|
  
--|
  |Tomcat Users List users@tomcat.apache.org  
 |
  
--|
|
| Date:  |
|
  
--|
  |03/09/2011 04:07 PM  
 |
  
--|
|
| Subject:   |
|
  

Re: Connector lifecycle

2011-03-09 Thread Mark Thomas
On 09/03/2011 15:06, Jess Holle wrote:
 So there's no way to do this from the Tomcat side?
 
 The process embedding Tomcat knows it's stopping.  It does not
 necessarily even have an ability to connect to the web server(s) that
 are connecting to it [Apache, IIS, or SJWS, but all via the JK
 connector].  I therefore want to say this Tomcat no longer open for
 business from the Tomcat side while finishing all requests already in
 progress.
 
 Also I was somewhat inaccurate/mistaken in my summary of Tomcat 7.0.10
 behavior.  If you invoke stop() and then destroy() on a connector(),
 then an exception is logged /but /the destroy() call succeeds.  That
 said, when it succeeds you get a 200 with no content on the next
 request.  The request *after* that is returns a 503 from Apache -- and
 presumably would have been load balanced to another Tomcat (I only have
 1 in my test at the moment).  There's still odd behavior for a single
 request after the stop/destroy().

Can you post the Exception? That sounds like a bug that needs to be fixed.

I recall coming across this before. I think it was related to keep-alive
connections and was non-trivial to solve. Open a bugzilla entry and I'll
take another look. No promises though. It might end up as won't fix.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: console with when running as service

2011-03-09 Thread Mikolaj Rydzewski


On Wed, 9 Mar 2011 09:05:30 -0600, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:



And what happens when there's no Windows user logged on (the normal
condition for a server) - just the services are running?


I've seen sa called 'servers' where admin has to login in order to box 
operate correctly.


--
Mikolaj Rydzewski m...@ceti.pl

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector lifecycle

2011-03-09 Thread Jess Holle

Well the exception when invoking destroy() directly is:

2011-03-09 09:28:16,238 ERROR [RMI TCP Connection(13)-10.196.0.84] 
org.apache.tomcat.util.modeler.BaseModelMBean  - Exception invoking method 
destroy
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was 
attempted ([before_destroy]) for component [Connector[AJP/1.3-8008]] in state 
[STARTED]
at 
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:386)
at 
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:278)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
...

I can kind of understand this -- destroy() does not auto-invoke stop() 
and is complaining that the incoming state is not what it expects.


When invoking stop() and then destroy() the destroy() succeeds 
[something I missed in my original post], but an exception is still logged:


2011-03-09 09:29:21,939 ERROR [RMI TCP Connection(21)-10.196.0.84] 
org.apache.catalina.core.StandardService  - Failed to stop connector 
[Connector[AJP/1.3-8010]]
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was 
attempted ([before_stop]) for component [Connector[AJP/1.3-8010]] in state 
[DESTROYING]
at 
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:386)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:212)
at 
org.apache.catalina.core.StandardService.removeConnector(StandardService.java:309)
at 
org.apache.catalina.connector.Connector.destroyInternal(Connector.java:984)
at 
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
...

That seems quite inappropriate.  Note that Tomcat 6.0.x also logs errors 
(but not exception traces) when one attempts to invoke either stop() or 
destroy().


What's more troublesome to me is that with every approach I've tried at 
least 1 request still gets through.  In some cases this request works 
normally.  In other cases the request gets a 200 and no content or a 
404.  After this initial request things behave more appropriately -- 
with the particulars depending on what I try to stop.


It really is troubling me that I have to reach back up to all the web 
servers targeting a Tomcat to tell them to take a given Tomcat out of 
the rotation rather than just make a simple Java call in Tomcat to tell 
it to stop taking new requests.


--
Jess Holle

On 3/9/2011 9:09 AM, Mark Thomas wrote:

On 09/03/2011 15:06, Jess Holle wrote:

So there's no way to do this from the Tomcat side?

The process embedding Tomcat knows it's stopping.  It does not
necessarily even have an ability to connect to the web server(s) that
are connecting to it [Apache, IIS, or SJWS, but all via the JK
connector].  I therefore want to say this Tomcat no longer open for
business from the Tomcat side while finishing all requests already in
progress.

Also I was somewhat inaccurate/mistaken in my summary of Tomcat 7.0.10
behavior.  If you invoke stop() and then destroy() on a connector(),
then an exception is logged /but /the destroy() call succeeds.  That
said, when it succeeds you get a 200 with no content on the next
request.  The request *after* that is returns a 503 from Apache -- and
presumably would have been load balanced to another Tomcat (I only have
1 in my test at the moment).  There's still odd behavior for a single
request after the stop/destroy().

Can you post the Exception? That sounds like a bug that needs to be fixed.

I recall coming across this before. I think it was related to keep-alive
connections and was non-trivial to solve. Open a bugzilla entry and I'll
take another look. No promises though. It might end up as won't fix.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






Re: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread Mark Thomas
On 09/03/2011 16:02, André Warnier wrote:
 Now from the train..
 
 When you request a URL such as this from Tomcat :
 
 (http://hostname)/ABC/DEF/hij.jsp
 
 Tomcat uses the first component of the path (/ABC) as mapping for the
 web application.
 It then passes the request to the application ABC.

Not strictly correct.

Tomcat compares the URL to the list of context paths and the longest
match wins.

In the example above the context path may be any of the following:
/
/ABC
/ABC/DEF
you simply can't tell from looking at the URL. You have to know what
context paths are currently configured.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Petr,

On 3/9/2011 9:49 AM, Petr Hracek wrote:
 You mean that in HTML file I should remove servlet?

I think you have a lot of things confused, here. I'm going to pick and
choose from your previous posts and address a few of the things I think
are standing in your way.

 Is this web.xml file correct?

Maybe.

 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
 http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

Servlet 2.2 is so old I don't even want to look up it's age. If you are
writing a new webapp, you should be targeting the 3.0 spec.

 web-app
 display-nameViewer/display-name
 
 jsp-property-group
 url-pattern/jsp/Viewer/*.jsp/url-pattern
 /jsp-property-group


I don't think you need a jsp-property-group unless you intend to do
something with it: you have specified no properties, so why bother
defining the group?

 jsp-config
 taglib
 taglib-urihttp://java.sun.com/jstl/core-rt/taglib-uri
 taglib-location/WEB-INF/c-rt.tld/taglib-location
 /taglib
 taglib
 taglib-urihttp://java.sun.com/jstl/core/taglib-uri
 taglib-location/WEB-INF/c.tld/taglib-location
 /taglib
 /jsp-config

I believe Tomcat will scan your webapp's libraries for taglib files
unless you tell it not to -- that may be sensitive to the servlet spec
version you specify in your web.xml file. Updating to the latest spec
will likely reduce the amount of stuff you have to specify in web.xml,
such as the above.

 XYtest.xml is now:
 ?xml version='1.0' encoding='utf-8'?
 Context docBase=/opt/test/servlet allowLinking=true
 /Context

Your webapp is stored in /opt/test/servlet, and your webapp's name is
XYtest (inherited from the .xml file name) so all URLs should be like
this /XYtest.

 And jsp are stored in
 /opt/test/servlet/jsp/Viewer/View.jsp

So a fully-qualified URL for that JSP would be
http://host/XYtest/jsp/Viewer/View.jsp

 frame src=/XYtest/servlet/jsp/Viewer/View.jsp

... so the servlet is problematic: remove it.

 ProxyPass /XYtest/servlet ajp://localhost:8009/XYtest/servlet
 ProxyPassReverse /XYtest/servlet ajp://localhost:8009/XYtest/servlet

Generally speaking, it's best to map your webapp's URI space direct into
Tomcat, like this:

 ProxyPass /XYtest ajp://localhost:8009/XYtest

I guess you just copied the servlet over from your URIs in other
places. Try the above and see if it helps.

 What is wrong?
 Other servlets which did not used JSP are working properly.

I can't decide if I'm surprised that your servlets worked while your
JSPs didn't, or if it makes perfect sense... let's try to get some other
things sorted-out, first.

Try removing all the /servlet references from your configurations and
URLs (except for your docBase: that needs to stay) and see if that helps
things.

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

iEYEARECAAYFAk13qrYACgkQ9CaO5/Lv0PBqAACfVe7bj5gYTvLzzyTE1x6+MOvp
pDoAoIbxafNCLZODOZv5Vv5RTAcKldME
=thw2
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: JSP pages are not loaded. Only HTML source code

  XYtest.xml is now:
  ?xml version='1.0' encoding='utf-8'?
  Context docBase=/opt/test/servlet allowLinking=true
  /Context

 Try removing all the /servlet references from your configurations
 and URLs (except for your docBase: that needs to stay) and see if 
 that helps things.

Might be useful to see the directory structure *under* /opt/test/servlet to 
make sure it in any way resembles that required for a webapp...

 - Chuck


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



Re: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6

2011-03-09 Thread Dharamshila Khandelwal
Hi All,

I was able to make it work. Enable Invoker Servlet Mapping in conf/web.xml.
However I had to enable priveleged=true in context.xml.
Do you see any flip side to it? I know that it is not the most secured way
but this is my application website and runs in the intranet.
Thanks all for your help!

DS.

On Wed, Mar 9, 2011 at 9:16 AM, Dharamshila Khandelwal 
dharmshil...@gmail.com wrote:

 *Localhost.log*

 
 Mar 8, 2011 10:25:32 PM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextInitialized()
 Mar 8, 2011 10:25:32 PM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextInitialized()
 Mar 8, 2011 10:25:33 PM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextInitialized()
 Mar 8, 2011 10:25:33 PM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextInitialized()
 Mar 8, 2011 10:25:34 PM org.apache.catalina.core.ApplicationContext log
 INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
 [org.apache.webapp.balancer.RuleChain:
 [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
 Redirect URL: http://www.cnn.com],
 [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
 paramName / Target param value: paramValue / Redirect URL:
 http://www.yahoo.com],
 [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
 http://jakarta.apache.org]]
 Mar 8, 2011 10:25:34 PM org.apache.catalina.core.ApplicationContext log
 INFO: ContextListener: contextInitialized()
 Mar 8, 2011 10:25:34 PM org.apache.catalina.core.ApplicationContext log
 INFO: SessionListener: contextInitialized()

 --
 *Catalina.2011.03.08.log*

 ---
 INFO: Deploying configuration descriptor uom.xml
 Mar 8, 2011 10:25:34 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/uom
 inside the host appBase has been specified, and will be ignored

 ---
 *Catalina.out*

 ---
 Mar 8, 2011 10:25:30 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: The APR based Apache Tomcat Native library which allows optimal
 performance in production environments was not found on the
 java.library.path:
 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/opt/wmsutil/gcc-3.4.3-sparc64/lib:/opt/pvcs/vm/solaris/lib/sparc/native_threads:/usr/lib:/usr/local/lib:/opt/hsnweb/lib:::/usr/java/packages/lib/i386:/lib:/usr/lib
 Mar 8, 2011 10:25:30 PM org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-9501
 Mar 8, 2011 10:25:30 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 972 ms
 Mar 8, 2011 10:25:31 PM org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 Mar 8, 2011 10:25:31 PM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
 Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor MOVEHELP.xml
 Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/MOVEHELP
 inside the host appBase has been specified, and will be ignored
 Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor MOVE.xml
 Mar 8, 2011 10:25:31 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 WARNING: A docBase /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/MOVE
 inside the host appBase has been specified, and will be ignored
 Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor tomcat-docs.xml
 Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 WARNING: A docBase
 /opt/hsnweb/web01d/apache-tomcat-6.0.32/webapps/tomcat-docs inside the host
 appBase has been specified, and will be ignored
 Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 INFO: Deploying configuration descriptor webdav.xml
 Mar 8, 2011 10:25:32 PM org.apache.catalina.startup.HostConfig
 deployDescriptor
 WARNING: A docBase 

tools.jar dependency with Tomcat 7.0.10?

2011-03-09 Thread Mathew Samuel
Hi,

Just trying to use Tomcat 7.0.10. I see the following in the relevant 
catalina.err file:

WARNING: Failed to process JAR 
[jar:file:/usr/java/jre1.6.0_24/lib/tools.jar!/null] for TLD files
java.util.zip.ZipException: error in opening zip file

It appears it is looking for this tools.jar but that is not included as part of 
the JRE. I realize I can get tools.jar from a JDK but trouble is due to 
licensing I can't use something from a JDK.

I can get around this by renaming some random zip file as tools.jar and placing 
it there but I suppose what I was wondering is if this is an already reported 
Tomcat bug with 7.0.10?

Cheers,
Matt



Re: tools.jar dependency with Tomcat 7.0.10?

2011-03-09 Thread Mark Thomas
On 09/03/2011 17:00, Mathew Samuel wrote:
 Hi,
 
 Just trying to use Tomcat 7.0.10. I see the following in the relevant 
 catalina.err file:
 
 WARNING: Failed to process JAR 
 [jar:file:/usr/java/jre1.6.0_24/lib/tools.jar!/null] for TLD files
 java.util.zip.ZipException: error in opening zip file

At a guess, you have tools.jar on the class path so Tomcat is trying to
scan it. A couple of things strike me as odd about that:
 - tools.jar shouldn't be on the class path - how did it get there?
 - if it were it should be skipped - why wasn't it skipped?

What is the full stack trace of that exception?

 I can get around this by renaming some random zip file as tools.jar and 
 placing it there but I suppose what I was wondering is if this is an already 
 reported Tomcat bug with 7.0.10?

Whether or not it is a bug depends on the answers to the questions above.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6

2011-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dharamshila,

On 3/9/2011 11:58 AM, Dharamshila Khandelwal wrote:
 I was able to make it work. Enable Invoker Servlet Mapping in conf/web.xml.

That would do it, although you should enable it in your webapp's web.xml
/only/ and not for the entire server if possible.

 However I had to enable priveleged=true in context.xml.

Right.

 Do you see any flip side to it?

Yes: remote clients can execute arbitrary servlets, potentially
bypassing security constraints.

 I know that it is not the most secured way
 but this is my application website and runs in the intranet.

It's better to explicitly map your servlets. It's just not that hard to
do, so take an hour or so and do it. Disable the invoker and move on
with your life :)

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

iEYEARECAAYFAk13tSIACgkQ9CaO5/Lv0PAIOQCdHiRHqszpx77MuBcwuvdx+Jx0
xU8An28caIrXZ/ACyna3/G3PMt3NEt/c
=Tyjz
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cleaning up after tomcat jdbc-pool?

2011-03-09 Thread Filip Hanik - Dev Lists

On 03/07/2011 06:46 PM, Nicholas Sushkin wrote:

I don't think the default pool has any glaring leaks. However, your db may.
I have ran into cases when Oracle would run out of PGA memory, which cleared
with tomcat restart.

It may help to use connection validation feature of tomcat's new pool to
close connections that ran out of memory.
   


Look at the maxAge property in
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

it is created just to deal with the database sessions that have memory 
leaks, and the leak is somewhat predictable timing wise


best
Filip


Don't know if such a scenario has been tested. I am curious to hear.

On Mar 7, 2011 10:46 AM, הילהhilavalen...@gmail.com  wrote:

Thanks :]
Let's see if it'll somewhat help with the memory leak, or with memory
management at all


2011/3/7 Filip Hanik - Dev Listsdevli...@hanik.com


   

On 3/7/2011 3:48 AM, Mark Thomas wrote:

 

On 07/03/2011 10:39, הילה wrote:

   

I found this...
 
   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6

2011-03-09 Thread Caldarale, Charles R
 From: Dharamshila Khandelwal [mailto:dharmshil...@gmail.com] 
 Subject: Re: Servlet mapping doesn't work after upgrading from Tomcat 5 to 6

 I was able to make it work. Enable Invoker Servlet Mapping 
 in conf/web.xml.

That is a really, really, really bad idea - bordering on criminal.  Do it 
properly with explicit servlet mapping.

http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3

 - Chuck


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


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JSP pages are not loaded. Only HTML source code

2011-03-09 Thread André Warnier

Mark Thomas wrote:

On 09/03/2011 16:02, André Warnier wrote:

Now from the train..

When you request a URL such as this from Tomcat :

(http://hostname)/ABC/DEF/hij.jsp

Tomcat uses the first component of the path (/ABC) as mapping for the
web application.
It then passes the request to the application ABC.


Not strictly correct.

Tomcat compares the URL to the list of context paths and the longest
match wins.

In the example above the context path may be any of the following:
/
/ABC
/ABC/DEF
you simply can't tell from looking at the URL. You have to know what
context paths are currently configured.



That is certainly more correct than my simplified explanation,
but,at this point, likely to confuse the OP a bit more, maybe ?

Quoting selectively from Petr's previous posts :
...
in the Catalina configuration directory
(/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context

...
(now)
Apache things are in directory
/opt/test/htdocs
tomcat things are in directory
/opt/test/servlet

(/etc/tomcat5/base/Catalina/localhost/)XYtest.xml is now:
?xml version='1.0' encoding='utf-8'?
Context docBase=/opt/test/servlet allowLinking=true
/Context

And jsp are stored in
/opt/test/servlet/jsp/Viewer/View.jsp
...

end quote

and he didn't say -- but I presume --, that web.xml is in
/opt/test/servlet/WEB-INF/web.xml


So, Petr, to bring all this together :

1) in /etc/tomcat5/base/Catalina/localhost/XYtest.xml :

docBase=/opt/test/servlet

2) in the Apache config :

ProxyPassMatch ^/XYtest/(.*\.jsp)$  ajp://localhost:8009/XYtest/$1

Because if you just use
ProxyPass /XYtest ajp://localhost:8009/Xytest
then a URL like /XYtest/index.html will also be passed to Tomcat, and Tomcat will not 
find it, considering the location of your Apache things above.


3) in the file index.html :
frame src=/XyTest/jsp/Viewer/View.jsp ...

Alternatively, you could do :

1a) in /etc/tomcat5/base/Catalina/localhost/XYtest.xml :

docBase=/opt/test/servlet

2a) in the Apache config :

ProxyPassMatch ^/XYtest/servlet/(.*)$  ajp://localhost:8009/XYtest/$1

3a) in the file index.html :
frame src=/XyTest/servlet/jsp/Viewer/View.jsp ...

(in this case, the ProxyPassMatch directive will strip the /servlet part, which 
confuses Tomcat)



When (if?) the above is working, then I will suggest a better (and simpler) 
layout
for the files and directives.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Brian Braun
Hi,

I just migrated from Tomcat 6.0.29 to 7.0.10. I have solved several problems
regarding the migration, but I don't know what these mean:

INFO: Deploying web application archive ROOT.war
Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already
defined
Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already
defined
Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already
defined
Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already
defined
Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already
defined
Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://displaytag.sf.net is already defined
Something tells me that Tomcat now expects my web.xml file to comply with
the new Servlet/JSP specifications, or a new version of the web.xml format.
I haven't changed my web.xml file at all, yet.
I would like to get rid of these warnings.
Anybody knows what is this about?

Brian


Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Mark Thomas
On 09/03/2011 18:12, Brian Braun wrote:
 Hi,
 
 I just migrated from Tomcat 6.0.29 to 7.0.10. I have solved several problems
 regarding the migration, but I don't know what these mean:
 
 INFO: Deploying web application archive ROOT.war
 Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
 INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already
 defined
 Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
 INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already
 defined
 Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
 INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already
 defined
 Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
 INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already
 defined
 Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
 INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already
 defined
 Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
 INFO: TLD skipped. URI: http://displaytag.sf.net is already defined
 Something tells me that Tomcat now expects my web.xml file to comply with
 the new Servlet/JSP specifications, or a new version of the web.xml format.
 I haven't changed my web.xml file at all, yet.
 I would like to get rid of these warnings.
 Anybody knows what is this about?

They are INFO messages so do not indicate an error condition. It looks
like you have multiple TLD definitions for a given URI (web.xml and TLD
embedded in a JAR?). Removing the duplicates should fix it.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Brian Braun
Hi Mark,

Now that I check my web.xml file, I realized that these TLD files are not
even mentioned there! I think I remember they used to be mentioned there,
but I upgraded my web.xml file to a newer format and then I got rid of those
references. But I'm getting the INFOs in my log yet, since I migrated to
Tomcat 7.0.10 from 6.0.X.
So where is the redundancy?



On Wed, Mar 9, 2011 at 1:16 PM, Mark Thomas ma...@apache.org wrote:

  On 09/03/2011 18:12, Brian Braun wrote:
  Hi,
 
  I just migrated from Tomcat 6.0.29 to 7.0.10. I have solved several
 problems
  regarding the migration, but I don't know what these mean:
 
  INFO: Deploying web application archive ROOT.war
  Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
  INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already
  defined
  Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
  INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already
  defined
  Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
  INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already
  defined
  Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
  INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already
  defined
  Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
  INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already
  defined
  Mar 9, 2011 9:28:12 AM org.apache.catalina.startup.TaglibUriRule body
  INFO: TLD skipped. URI: http://displaytag.sf.net is already defined
  Something tells me that Tomcat now expects my web.xml file to comply with
  the new Servlet/JSP specifications, or a new version of the web.xml
 format.
  I haven't changed my web.xml file at all, yet.
  I would like to get rid of these warnings.
  Anybody knows what is this about?

 They are INFO messages so do not indicate an error condition. It looks
 like you have multiple TLD definitions for a given URI (web.xml and TLD
 embedded in a JAR?). Removing the duplicates should fix it.

 Mark

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Connector lifecycle

2011-03-09 Thread Mark Thomas
On 09/03/2011 15:47, Jess Holle wrote:
 Well the exception when invoking destroy() directly is:
 
 2011-03-09 09:28:16,238 ERROR [RMI TCP Connection(13)-10.196.0.84]
 org.apache.tomcat.util.modeler.BaseModelMBean  - Exception invoking
 method destroy
 org.apache.catalina.LifecycleException: An invalid Lifecycle transition
 was attempted ([before_destroy]) for component [Connector[AJP/1.3-8008]]
 in state [STARTED]
snip/
 I can kind of understand this -- destroy() does not auto-invoke stop()
 and is complaining that the incoming state is not what it expects.

Yes, that is as expected. See:
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/Lifecycle.html

 When invoking stop() and then destroy() the destroy() succeeds
 [something I missed in my original post], but an exception is still logged:
 
 2011-03-09 09:29:21,939 ERROR [RMI TCP Connection(21)-10.196.0.84]
 org.apache.catalina.core.StandardService  - Failed to stop connector
 [Connector[AJP/1.3-8010]]
 org.apache.catalina.LifecycleException: An invalid Lifecycle transition
 was attempted ([before_stop]) for component [Connector[AJP/1.3-8010]] in
 state [DESTROYING]
 at
 org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:386)

Hmm. That looks like a bug. Let me go look at the code...
Yep. Fixed in http://svn.apache.org/viewvc?rev=1079930view=rev Will be
in 7.0.11 onwards.

 What's more troublesome to me is that with every approach I've tried at
 least 1 request still gets through.  In some cases this request works
 normally.  In other cases the request gets a 200 and no content or a
 404.  After this initial request things behave more appropriately --
 with the particulars depending on what I try to stop.

Let me do some more testing in this area.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



jythonet (Jython Servlet)

2011-03-09 Thread Zimon Sparta
Hi All,
jythonet is the best bridge between Jython and Java Servlet.

http://code.google.com/p/jythonet/

I'm working to add more examples, using different template-languages like:
- Cheetah
- Django template system
- Genshi
- Jinja 2
- Mako


--
Zimon Sparta

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cleaning up after tomcat jdbc-pool?

2011-03-09 Thread הילה
I'll define it. thanks :]
I've implemented 2 changes in production servers - one with the new pool
(and still jtds drivers) and one with new pool + switching to jdbc drivers.
both has windows authentication enabled.
the servers look pretty stable until now, but I'm waiting to see the memory
behaviour in the next few days. on servers with the jtds driver, basic pool
and windows authentication, the leak appeared pretty fast, so I'm expecting
results real soon.
I'll keep you posted.
Thanks you guys, you've been a great help so far :]
Hila


2011/3/9 Filip Hanik - Dev Lists devli...@hanik.com

 On 03/07/2011 06:46 PM, Nicholas Sushkin wrote:

 I don't think the default pool has any glaring leaks. However, your db
 may.
 I have ran into cases when Oracle would run out of PGA memory, which
 cleared
 with tomcat restart.

 It may help to use connection validation feature of tomcat's new pool to
 close connections that ran out of memory.



 Look at the maxAge property in

 http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

 it is created just to deal with the database sessions that have memory
 leaks, and the leak is somewhat predictable timing wise

 best
 Filip


  Don't know if such a scenario has been tested. I am curious to hear.

 On Mar 7, 2011 10:46 AM, הילהhilavalen...@gmail.com  wrote:

 Thanks :]
 Let's see if it'll somewhat help with the memory leak, or with memory
 management at all


 2011/3/7 Filip Hanik - Dev Listsdevli...@hanik.com




 On 3/7/2011 3:48 AM, Mark Thomas wrote:



 On 07/03/2011 10:39, הילה wrote:



 I found this...






 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Connector lifecycle

2011-03-09 Thread Mark Thomas
On 09/03/2011 18:50, Mark Thomas wrote:
 On 09/03/2011 15:47, Jess Holle wrote:
 What's more troublesome to me is that with every approach I've tried at
 least 1 request still gets through.  In some cases this request works
 normally.  In other cases the request gets a 200 and no content or a
 404.  After this initial request things behave more appropriately --
 with the particulars depending on what I try to stop.
 
 Let me do some more testing in this area.

I can reproduce this. Fixing it shouldn't be too hard. However there are
a couple of different states:
a) Request not received when connector stopped
b) Request line being read when connector stopped
c) Request headers being read when connector stopped
d) Request body being read when connector stopped
and we need to decided how far a request has to get before it is
rejected when the connector is stopped.

I am leaning towards rejecting a) and allowing the rest to proceed.
Comments welcome at:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50903

This won't get into 7.0.11 but it should make it into 7.0.12.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector lifecycle

2011-03-09 Thread Jess Holle

On 3/9/2011 12:50 PM, Mark Thomas wrote:

On 09/03/2011 15:47, Jess Holle wrote:

When invoking stop() and then destroy() the destroy() succeeds
[something I missed in my original post], but an exception is still logged:

2011-03-09 09:29:21,939 ERROR [RMI TCP Connection(21)-10.196.0.84]
org.apache.catalina.core.StandardService  - Failed to stop connector
[Connector[AJP/1.3-8010]]
org.apache.catalina.LifecycleException: An invalid Lifecycle transition
was attempted ([before_stop]) for component [Connector[AJP/1.3-8010]] in
state [DESTROYING]
 at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:386)

Hmm. That looks like a bug. Let me go look at the code...
Yep. Fixed in http://svn.apache.org/viewvc?rev=1079930view=rev Will be
in 7.0.11 onwards.

Thanks.

What's more troublesome to me is that with every approach I've tried at
least 1 request still gets through.  In some cases this request works
normally.  In other cases the request gets a 200 and no content or a
404.  After this initial request things behave more appropriately --
with the particulars depending on what I try to stop.

Let me do some more testing in this area.
In case it matters, I'm primarily interested in the BIO/JIO AJP 
connector and secondarily in the BIO/JIO HTTP connector.  [However good 
it might be building the APR connector across numerous platforms and 
then having to deal with the possibility of bugs in native code but 
outside the core JVM native code is just not worth it to me.]


--
Jess Holle


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connector lifecycle

2011-03-09 Thread Jess Holle

On 3/9/2011 1:40 PM, Mark Thomas wrote:

On 09/03/2011 18:50, Mark Thomas wrote:

On 09/03/2011 15:47, Jess Holle wrote:

What's more troublesome to me is that with every approach I've tried at
least 1 request still gets through.  In some cases this request works
normally.  In other cases the request gets a 200 and no content or a
404.  After this initial request things behave more appropriately --
with the particulars depending on what I try to stop.

Let me do some more testing in this area.

I can reproduce this. Fixing it shouldn't be too hard. However there are
a couple of different states:
a) Request not received when connector stopped
b) Request line being read when connector stopped
c) Request headers being read when connector stopped
d) Request body being read when connector stopped
and we need to decided how far a request has to get before it is
rejected when the connector is stopped.

I am leaning towards rejecting a) and allowing the rest to proceed.
Comments welcome at:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50903

This won't get into 7.0.11 but it should make it into 7.0.12.
Thanks.  Fixing this (and knowing which files to patch prior to 7.0.12's 
release) would be /very/ helpful.


(a) is fine by me.  Any request that we've started to process even in 
the slightest can proceed as far as I'm concerned -- it's preventing any 
further requests from being processed that's critical.


--
Jess Holle



Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian,

On 3/9/2011 1:42 PM, Brian Braun wrote:
 Now that I check my web.xml file, I realized that these TLD files are not
 even mentioned there! I think I remember they used to be mentioned there,
 but I upgraded my web.xml file to a newer format and then I got rid of those
 references. But I'm getting the INFOs in my log yet, since I migrated to
 Tomcat 7.0.10 from 6.0.X.
 So where is the redundancy?

Try checking the struts-*.jar files for .tld files.

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

iEYEARECAAYFAk134wUACgkQ9CaO5/Lv0PAvJACggBUm7EhZQWNFEZf610fZzzvV
4bUAoI/9wxMUQRenqGVn8fIDzdtLQJ0j
=/C/X
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cleaning up after tomcat jdbc-pool?

2011-03-09 Thread André Warnier

הילה wrote:

I'll define it. thanks :]
I've implemented 2 changes in production servers - one with the new pool
(and still jtds drivers) and one with new pool + switching to jdbc drivers.
both has windows authentication enabled.
the servers look pretty stable until now, but I'm waiting to see the memory
behaviour in the next few days. on servers with the jtds driver, basic pool
and windows authentication, the leak appeared pretty fast, so I'm expecting
results real soon.
I'll keep you posted.
Thanks you guys, you've been a great help so far :]
Hila

So, if I understand this correctly, this also terminates the other thread, now with a 
subject Tomcat NTLM Authentication, right ?


Meaning that the MS JDBC driver works, it does NTLM authentication, and does not have a 
memory leak ?
If so, you may want to post a final message to the other thread, so that people following 
that one would know how it ends, and what the solution was.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cleaning up after tomcat jdbc-pool?

2011-03-09 Thread הילה
Sure, when I'll have a final results and see that the leak is no longer
exist (prays the lord :P) I'll post a final thread with the solution :]


2011/3/9 André Warnier a...@ice-sa.com

 הילה wrote:

 I'll define it. thanks :]
 I've implemented 2 changes in production servers - one with the new pool
 (and still jtds drivers) and one with new pool + switching to jdbc
 drivers.
 both has windows authentication enabled.
 the servers look pretty stable until now, but I'm waiting to see the
 memory
 behaviour in the next few days. on servers with the jtds driver, basic
 pool
 and windows authentication, the leak appeared pretty fast, so I'm
 expecting
 results real soon.
 I'll keep you posted.
 Thanks you guys, you've been a great help so far :]
 Hila

  So, if I understand this correctly, this also terminates the other
 thread, now with a subject Tomcat NTLM Authentication, right ?

 Meaning that the MS JDBC driver works, it does NTLM authentication, and
 does not have a memory leak ?
 If so, you may want to post a final message to the other thread, so that
 people following that one would know how it ends, and what the solution was.



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: console with when running as service

2011-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert,

On 3/9/2011 9:49 AM, robert.jen...@surecomp.com wrote:
 Also as a possible enhancement to tomcat.. add a service command to the 
 service app to show is output window

I don't think the service can do this... I think the service runner has
to do it.

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

iEYEARECAAYFAk135G0ACgkQ9CaO5/Lv0PBybACfb39TDDu0ZxJkSFZ69HmpxcPM
8d4AoK/mylQ0c7VuXL0mzoseTQpTGarA
=opW+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: tools.jar dependency with Tomcat 7.0.10?

2011-03-09 Thread Mathew Samuel
Hi,

As requested here is the full stack trace:

WARNING: Failed to process JAR 
[jar:file:/usr/java/jre1.6.0_24/lib/tools.jar!/null] for TLD files
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(Unknown Source)
at java.util.jar.JarFile.init(Unknown Source)
at java.util.jar.JarFile.init(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.init(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:507)
at org.apache.catalina.startup.TldConfig.access$100(TldConfig.java:59)
at 
org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:332)
at 
org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:234)
at 
org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:197)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:306)
at 
org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:585)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5031)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)
at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1305)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at 
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
at 
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
at 
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at 
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at 
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at 
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:726)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:219) 


I certainly didn't do anything that I'm aware of that would have included 
tools.jar on the class path. The Tomcat version 6.0.32 that I was previously 
using didn't have this error but this is my first try at the Tomcat 7 stream.

Cheers,
Matt

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Wednesday, March 09, 2011 12:07 PM
To: Tomcat Users List
Subject: Re: tools.jar dependency with Tomcat 7.0.10?

On 09/03/2011 17:00, Mathew Samuel wrote:
 Hi,
 
 Just trying to use Tomcat 7.0.10. I see the 

Re: Forcing SSL use

2011-03-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeffrey,

On 3/7/2011 3:18 PM, Jeffrey Janner wrote:
 No one so far has mentioned it, but yes, you are seeing behavior as
 designed.  The CONFIDENTIAL setting causes Tomcat to send a redirect
 to SSL if the request comes in on standard HTTP.

You might be able to trigger an error by removing the redirectPort
attribute from your HTTP connector.

 If your true intent is not to allow *ANY* traffic over HTTP, then you
 need to remove your HTTP Connector from the server.xml. However,
 leaving it this way is a nicety for the end user.

+1

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

iEYEARECAAYFAk135WYACgkQ9CaO5/Lv0PBoVwCfQgAAZXpxNgS98UoThbyWQEnH
lxMAnRgGw3e3XOjGPXxiKEZA1+BZro/e
=S1i0
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Brian Braun
Hi chris,

Actually, I had already unzipped my .war file and inspected every file
inside, and arrived to that conclution: The only place where the TLD files
are also present is the JARs that correspond to Struts (don't laugh, but I'm
still using it) and other components.
I guess Tomcat 7 is smarter than ever, and TLD being present in the WARs is
enough, so I dont need to keep it in my project and exported in my .war
file. Is that right?





On Wed, Mar 9, 2011 at 3:28 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Brian,

 On 3/9/2011 1:42 PM, Brian Braun wrote:
  Now that I check my web.xml file, I realized that these TLD files are not
  even mentioned there! I think I remember they used to be mentioned there,
  but I upgraded my web.xml file to a newer format and then I got rid of
 those
  references. But I'm getting the INFOs in my log yet, since I migrated to
  Tomcat 7.0.10 from 6.0.X.
  So where is the redundancy?

 Try checking the struts-*.jar files for .tld files.

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

 iEYEARECAAYFAk134wUACgkQ9CaO5/Lv0PAvJACggBUm7EhZQWNFEZf610fZzzvV
 4bUAoI/9wxMUQRenqGVn8fIDzdtLQJ0j
 =/C/X
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Mark Thomas
On 09/03/2011 20:42, Brian Braun wrote:
 Hi chris,
 
 Actually, I had already unzipped my .war file and inspected every file
 inside, and arrived to that conclution: The only place where the TLD files
 are also present is the JARs that correspond to Struts (don't laugh, but I'm
 still using it) and other components.
 I guess Tomcat 7 is smarter than ever, and TLD being present in the WARs is
 enough, so I dont need to keep it in my project and exported in my .war
 file. Is that right?

Tomcat will find the TLDs in the struts JAR files. No need to put extra
copies directly in the WAR.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Brian Braun
That's nice! I that something new in Tomcat 7, or is it already present in
6.0.29?




On Wed, Mar 9, 2011 at 3:45 PM, Mark Thomas ma...@apache.org wrote:

 On 09/03/2011 20:42, Brian Braun wrote:
  Hi chris,
 
  Actually, I had already unzipped my .war file and inspected every file
  inside, and arrived to that conclution: The only place where the TLD
 files
  are also present is the JARs that correspond to Struts (don't laugh, but
 I'm
  still using it) and other components.
  I guess Tomcat 7 is smarter than ever, and TLD being present in the WARs
 is
  enough, so I dont need to keep it in my project and exported in my .war
  file. Is that right?

 Tomcat will find the TLDs in the struts JAR files. No need to put extra
 copies directly in the WAR.

 Mark

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Mark Thomas
On 09/03/2011 20:49, Brian Braun wrote:
 That's nice! I that something new in Tomcat 7, or is it already present in
 6.0.29?

It should be in 6 although you probably won't get the warnings. The TLD
scanning was completely re-worked for 7.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Guide of Tomcat 7 improvements?

2011-03-09 Thread Brian Braun
Hi,

Is there an good article somewhere about all the improvements in Tomcat 7? I
know about the migration guide (http://tomcat.apache.org/migration.html),
the change log and the documentation pages. But I'm looking for some kind of
article that explains all the improvements. Something that explains the most
important things, like the serlet 3.0 support, the leak management, the
improvements in security, etc. I just migrated, and would like to know what
new capabilities does Tomcat 7 have, in order to take advantage of them.

TIA,

Brian


Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-03-09 Thread Brian Braun
OK, thanks for the responses!



On Wed, Mar 9, 2011 at 3:51 PM, Mark Thomas ma...@apache.org wrote:

 On 09/03/2011 20:49, Brian Braun wrote:
  That's nice! I that something new in Tomcat 7, or is it already present
 in
  6.0.29?

 It should be in 6 although you probably won't get the warnings. The TLD
 scanning was completely re-worked for 7.

 Mark

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Guide of Tomcat 7 improvements?

2011-03-09 Thread Mark Thomas
On 09/03/2011 20:56, Brian Braun wrote:
 Hi,
 
 Is there an good article somewhere about all the improvements in Tomcat 7? I
 know about the migration guide (http://tomcat.apache.org/migration.html),
 the change log and the documentation pages. But I'm looking for some kind of
 article that explains all the improvements. Something that explains the most
 important things, like the serlet 3.0 support, the leak management, the
 improvements in security, etc. I just migrated, and would like to know what
 new capabilities does Tomcat 7 have, in order to take advantage of them.

http://people.apache.org/~markt/presentations/2010-10-11-Tomcat7.pdf

It is a little dated. There are other presentations in that dir you may
find useful too.

HTH,

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Guide of Tomcat 7 improvements?

2011-03-09 Thread Brian Braun
I new I was going to get a great responde form YOU.
That is what I was looking for, a nice guide. Thanks!


On Wed, Mar 9, 2011 at 4:07 PM, Mark Thomas ma...@apache.org wrote:

  On 09/03/2011 20:56, Brian Braun wrote:
  Hi,
 
  Is there an good article somewhere about all the improvements in Tomcat
 7? I
  know about the migration guide (http://tomcat.apache.org/migration.html
 ),
  the change log and the documentation pages. But I'm looking for some kind
 of
  article that explains all the improvements. Something that explains the
 most
  important things, like the serlet 3.0 support, the leak management, the
  improvements in security, etc. I just migrated, and would like to know
 what
  new capabilities does Tomcat 7 have, in order to take advantage of them.

 http://people.apache.org/~markt/presentations/2010-10-11-Tomcat7.pdf

 It is a little dated. There are other presentations in that dir you may
 find useful too.

 HTH,

 Mark

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Connector lifecycle

2011-03-09 Thread Jess Holle
By the way, I did some more testing and though I would have sworn that 
destroy() prevented any further requests in Tomcat 6.0.x it also appears 
to allow at least 1 additional request.


On 3/9/2011 1:44 PM, Jess Holle wrote:

On 3/9/2011 1:40 PM, Mark Thomas wrote:

On 09/03/2011 18:50, Mark Thomas wrote:

On 09/03/2011 15:47, Jess Holle wrote:

What's more troublesome to me is that with every approach I've tried at
least 1 request still gets through.  In some cases this request works
normally.  In other cases the request gets a 200 and no content or a
404.  After this initial request things behave more appropriately --
with the particulars depending on what I try to stop.

Let me do some more testing in this area.

I can reproduce this. Fixing it shouldn't be too hard. However there are
a couple of different states:
a) Request not received when connector stopped
b) Request line being read when connector stopped
c) Request headers being read when connector stopped
d) Request body being read when connector stopped
and we need to decided how far a request has to get before it is
rejected when the connector is stopped.

I am leaning towards rejecting a) and allowing the rest to proceed.
Comments welcome at:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50903

This won't get into 7.0.11 but it should make it into 7.0.12.
Thanks.  Fixing this (and knowing which files to patch prior to 
7.0.12's release) would be /very/ helpful.


(a) is fine by me.  Any request that we've started to process even in 
the slightest can proceed as far as I'm concerned -- it's preventing 
any further requests from being processed that's critical.


--
Jess Holle




Chunked encoding not terminated with native library

2011-03-09 Thread Chris
Hi,
I'm using Tomcat 7.0.8 on Ubuntu 10.10.

When using the APR based Tomcat Native Library (libtcnative), responses from 
Tomcat are being sent with a chunked encoding, but the 0 terminating the 
chunked response isn't sent until exactly 1 minute later.

The response is being written to an 
org.apache.catalina.connector.CoyoteOutputStream. The following calls are made:
out.write(resp);
out.flush();
out.close();

If I just remove the libtcnative-1.so, so that Tomcat loads without using it, 
then the response still uses chunked encoding, but the terminating 0 is sent 
immediately, with the rest of the response.

Any ideas would be appreciated.

Thanks,
Chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Chunked encoding not terminated with native library

2011-03-09 Thread Mark Thomas
On 09/03/2011 21:49, Chris wrote:
 Hi,
 I'm using Tomcat 7.0.8 on Ubuntu 10.10.
 
 When using the APR based Tomcat Native Library (libtcnative), responses from 
 Tomcat are being sent with a chunked encoding, but the 0 terminating the 
 chunked response isn't sent until exactly 1 minute later.
 
 The response is being written to an 
 org.apache.catalina.connector.CoyoteOutputStream. The following calls are 
 made:
 out.write(resp);
 out.flush();
 out.close();
 
 If I just remove the libtcnative-1.so, so that Tomcat loads without using it, 
 then the response still uses chunked encoding, but the terminating 0 is 
 sent immediately, with the rest of the response.
 
 Any ideas would be appreciated.

Sounds like a bug. Please create a bugzilla entry.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] console with when running as service

2011-03-09 Thread Mark Eggers
- Original Message (begin) 
From: Christopher Schultz ch...@christopherschultz.net
To: Tomcat Users List users@tomcat.apache.org
Sent: Wed, March 9, 2011 12:34:13 PM
Subject: Re: [OT] console with when running as service

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert,

On 3/9/2011 9:54 AM, robert.jen...@surecomp.com wrote:
 There is a window version of tail tailforwin32.sourceforge.net

If you want more than just tail, why not get all the handy GNU utilities?

http://gnuwin32.sourceforge.net/

GNU/Windows, anyone? RMS would probably have to smile at that, then get
angry that Microsoft doesn't provide source code. ;)

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

iEYEARECAAYFAk135EUACgkQ9CaO5/Lv0PCyagCeOf4icsI0PEk7q9T127URUK7I
KlEAoJ07JhY/8mDsUYKv5TfagIajPRa+
=2bQc
-END PGP SIGNATURE-


- Original Message (end) 

Or cygwin: http://www.cygwin.com/

. . . . just my two cents

/mde/


  

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



why does tomcat6 delete xml files from ../tomcat6/conf/Catalina/localhost directory?

2011-03-09 Thread Robinson, Eric
We have several instances of tomcat running on a server and everything
seems to run fine. We can stop and start all instances of tomcat
independently.
 
HOWEVER, when we reboot there server, we find that several XML files
have been deleted from the conf directories for each instance. These
files are important because they tell the application where to locate
certain files that the user needs. When the XML files are deleted, users
get errors. 
 
WHY oh why does tomcat automatically delete XML files and how can we
stop it?
 

--
Eric Robinson


 


Disclaimer - March 9, 2011 
This email and any files transmitted with it are confidential and intended 
solely for users@tomcat.apache.org. If you are not the named addressee you 
should not disseminate, distribute, copy or alter this email. Any views or 
opinions presented in this email are solely those of the author and might not 
represent those of Physicians' Managed Care or Physician Select Management. 
Warning: Although Physicians' Managed Care or Physician Select Management has 
taken reasonable precautions to ensure no viruses are present in this email, 
the company cannot accept responsibility for any loss or damage arising from 
the use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


Re: why does tomcat6 delete xml files from ../tomcat6/conf/Catalina/localhost directory?

2011-03-09 Thread Mark Thomas
On 09/03/2011 23:15, Robinson, Eric wrote:
 We have several instances of tomcat running on a server and everything
 seems to run fine. We can stop and start all instances of tomcat
 independently.
  
 HOWEVER, when we reboot there server, we find that several XML files
 have been deleted from the conf directories for each instance. These
 files are important because they tell the application where to locate
 certain files that the user needs. When the XML files are deleted, users
 get errors. 
  
 WHY oh why does tomcat automatically delete XML files and how can we
 stop it?

They are deleted as part of the autoDeploy process when Tomcat detects
that the associated directory or WAR file is deleted. Turn off
autoDeploy or stop deleting your WARs/directories.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: why does tomcat6 delete xml files from ../tomcat6/conf/Catalina/localhost directory?

2011-03-09 Thread Robinson, Eric


 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org] 
 Sent: Wednesday, March 09, 2011 3:42 PM
 To: Tomcat Users List
 Subject: Re: why does tomcat6 delete xml files from 
 ../tomcat6/conf/Catalina/localhost directory?
 
 On 09/03/2011 23:15, Robinson, Eric wrote:
  We have several instances of tomcat running on a server and 
 everything 
  seems to run fine. We can stop and start all instances of tomcat 
  independently.
   
  HOWEVER, when we reboot there server, we find that several 
 XML files 
  have been deleted from the conf directories for each 
 instance. These 
  files are important because they tell the application where 
 to locate 
  certain files that the user needs. When the XML files are deleted, 
  users get errors.
   
  WHY oh why does tomcat automatically delete XML files and 
 how can we 
  stop it?
 
 They are deleted as part of the autoDeploy process when 
 Tomcat detects that the associated directory or WAR file is 
 deleted. Turn off autoDeploy or stop deleting your WARs/directories.
 
 Mark
 

Why would rebooting cause this? I'm not aware of anything that we are
deleting.

--Eric




















Disclaimer - March 9, 2011 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of Physicians' Managed Care or Physician Select Management. Warning: 
Although Physicians' Managed Care or Physician Select Management has taken 
reasonable precautions to ensure no viruses are present in this email, the 
company cannot accept responsibility for any loss or damage arising from the 
use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: console with when running as service

2011-03-09 Thread Mladen Turk

On 03/09/2011 03:59 PM, Zbynek Vavros wrote:


Im sorry to keep asking the same question becase we have services that have
console windows!
For example Domino server does that by default :



What happens on 2008R2 and UAC enabled?
Services run in Session 0, With Vista and up there is a
clear separation between services and GUI.
You can not even share file handles or named objects
between them unless you do some tricks.

No service(daemon) should ever interact with desktop. Period.
Not on windows, not on unix.
Domino is just an archaic peace of ... :)

Like someone said, you can use some auto tail to display
the real-time logs.


Regards
--
^TM

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org