Re: BASIC Authentication : Not working

2010-03-28 Thread Binu Kuttikkattu Idicula
 Hi,
I was trying a very basic example of authentication using HTTP Basic
 Authentication. However this seems not working in TOMCAT 6.0.20 for my
 application. Here is the web.xml which tells about login


 security-role

 role-nameapplication/role-name

 /security-role

 !-- SECURITY CONSTRAINT --

 security-constraint

 web-resource-collection

 web-resource-nameJSP/web-resource-name

 url-pattern/*corejspbean*/StringBean.jsp/url-pattern

 http-methodGET/http-method

 http-methodPOST/http-method

 /web-resource-collection

 auth-constraint

 role-nameapplication/role-name

 /auth-constraint

 user-data-constraint

 transport-guaranteeCONFIDENTIAL/transport-guarantee

 /user-data-constraint

 /security-constraint

 !-- LOGIN CONFIGURATION--

 login-config

 auth-methodBASIC/auth-method

 realm-nameapplication/realm-name

 /login-config



 I have also defined a role application and a user by name user for that
 role in tomcat-users file. What could be the problem?



Re: BASIC Authentication : Not working

2010-03-28 Thread Harry Metske
I would think your url-pattern is not valid :

url-pattern/*corejspbean*/StringBean.jsp/url-pattern

I don't know the exact rules for the pattern, but could you try first with
/* and see if that works, and then tweak the url-pattern further to your
needs ?

regards,
Harry

2010/3/28 Binu Kuttikkattu Idicula binukuttikka...@googlemail.com

  Hi,
 I was trying a very basic example of authentication using HTTP Basic
  Authentication. However this seems not working in TOMCAT 6.0.20 for my
  application. Here is the web.xml which tells about login
 
 
  security-role
 
  role-nameapplication/role-name
 
  /security-role
 
  !-- SECURITY CONSTRAINT --
 
  security-constraint
 
  web-resource-collection
 
  web-resource-nameJSP/web-resource-name
 
  url-pattern/*corejspbean*/StringBean.jsp/url-pattern
 
  http-methodGET/http-method
 
  http-methodPOST/http-method
 
  /web-resource-collection
 
  auth-constraint
 
  role-nameapplication/role-name
 
  /auth-constraint
 
  user-data-constraint
 
  transport-guaranteeCONFIDENTIAL/transport-guarantee
 
  /user-data-constraint
 
  /security-constraint
 
  !-- LOGIN CONFIGURATION--
 
  login-config
 
  auth-methodBASIC/auth-method
 
  realm-nameapplication/realm-name
 
  /login-config
 
 
 
  I have also defined a role application and a user by name user for
 that
  role in tomcat-users file. What could be the problem?
 



Re: BASIC Authentication : Not working

2010-03-28 Thread Binu Kuttikkattu Idicula
url-pattern/*/url-pattern
Hi Harry,
When I replaced url to  url-pattern/*/url-pattern it is asking for a
user name password. The exact URL which I access is
http://localhost:8080/corejspbean/StringBean.jsp . How do I define a
URLPattern for this?
Thank you for your quick help.

Binu K Idicula


On Sun, Mar 28, 2010 at 5:56 PM, Harry Metske harry.met...@gmail.comwrote:

 I would think your url-pattern is not valid :

 url-pattern/*corejspbean*/StringBean.jsp/url-pattern

 I don't know the exact rules for the pattern, but could you try first with
 /* and see if that works, and then tweak the url-pattern further to your
 needs ?

 regards,
 Harry

 2010/3/28 Binu Kuttikkattu Idicula binukuttikka...@googlemail.com

   Hi,
  I was trying a very basic example of authentication using HTTP Basic
   Authentication. However this seems not working in TOMCAT 6.0.20 for my
   application. Here is the web.xml which tells about login
  
  
   security-role
  
   role-nameapplication/role-name
  
   /security-role
  
   !-- SECURITY CONSTRAINT --
  
   security-constraint
  
   web-resource-collection
  
   web-resource-nameJSP/web-resource-name
  
   url-pattern/*corejspbean*/StringBean.jsp/url-pattern
  
   http-methodGET/http-method
  
   http-methodPOST/http-method
  
   /web-resource-collection
  
   auth-constraint
  
   role-nameapplication/role-name
  
   /auth-constraint
  
   user-data-constraint
  
   transport-guaranteeCONFIDENTIAL/transport-guarantee
  
   /user-data-constraint
  
   /security-constraint
  
   !-- LOGIN CONFIGURATION--
  
   login-config
  
   auth-methodBASIC/auth-method
  
   realm-nameapplication/realm-name
  
   /login-config
  
  
  
   I have also defined a role application and a user by name user for
  that
   role in tomcat-users file. What could be the problem?
  
 



Re: BASIC Authentication : Not working

2010-03-28 Thread Konstantin Kolinko
2010/3/28 Binu Kuttikkattu Idicula binukuttikka...@googlemail.com:
 The exact URL which I access is
 http://localhost:8080/corejspbean/StringBean.jsp . How do I define a
 URLPattern for this?

url-pattern/StringBean.jsp/url-pattern

I suppose that your application is corejspbean.war or is in
webapps/corejspbean

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



Re: BASIC Authentication : Not working

2010-03-28 Thread Binu Kuttikkattu Idicula
It is in corejspbean.war and after trying out
url-pattern/StringBean.jsp/url-pattern, the access is restricted only to
the StringBean.jsp which was the real need. Thanks.

A little curious about URL pattern if it is in webapps/corejspbean.. Does
the pattern change? Is there any rule/documentation mentioing this?

On Sun, Mar 28, 2010 at 6:42 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2010/3/28 Binu Kuttikkattu Idicula binukuttikka...@googlemail.com:
  The exact URL which I access is
  http://localhost:8080/corejspbean/StringBean.jsp . How do I define a
  URLPattern for this?

 url-pattern/StringBean.jsp/url-pattern

 I suppose that your application is corejspbean.war or is in
 webapps/corejspbean

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




Re: BASIC Authentication : Not working

2010-03-28 Thread Konstantin Kolinko
2010/3/28 Binu Kuttikkattu Idicula binukuttikka...@googlemail.com:
 It is in corejspbean.war and after trying out
 url-pattern/StringBean.jsp/url-pattern, the access is restricted only to
 the StringBean.jsp which was the real need. Thanks.

 A little curious about URL pattern if it is in webapps/corejspbean.. Does
 the pattern change? Is there any rule/documentation mentioing this?


1. Syntax for the URL patterns is defined in the Servlet Specification.
http://java.sun.com/products/servlet/download.html#specs

2. All patterns in web.xml are relative to the root of your web
application (aka the context of your web application).  That is why
there is no corejspbean in the pattern.

Best regards,
Konstantin Kolinko

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



AW: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Steffen Heil
Hi

  How does tomcat unload classes?
 It doesn't, at least not directly.  Tomcat simply eliminates all
references to the classes; the actual unloading is done by GC at some point
in the future.

  Is there even a way in java to do this?
 Just the above.  But making the classes unreachable should be adequate for
whatever purpose you have in mind.

This does not hold, as soon as Threads are involved, right?

Regards,
  Steffen



smime.p7s
Description: S/MIME cryptographic signature


Re: tomcat PUT not working

2010-03-28 Thread André Warnier

Kumar Kadiyala wrote:

Chris,

I see the content when I read the InputStream. Thanks for your help. 


Hi.
It seems that you are helped, and that is the essential part.
Maybe to balance a bit with the subject of your post (Tomcat PUT not 
working), I just want to provide some additional information here, as 
to why what is happening is happening, and maybe stress that this is not 
a case of PUT not working. It is working as it should; it just happens 
that it is not maybe how you expected it to work.


Much of what follows is already included in the thread which you 
mentioned earlier, but that thread was a bit stressed at times due to 
the vocabulary and tone of the original poster, so here is a summary :


Tomcat is at the same time a Servlet Engine and a HTTP server.
For Servlet Engines, the official reference is the Java Servlet 
Specification.  For the HTTP protocol, the official reference is 
RFC2616.  Tomcat tries to respect both of these specifications when 
applicable.


REST is not an Internet protocol. It is an application layer, built on 
top of HTTP (or on top of another protocol).

Tomcat is a not a REST server, and does not pretend to be.
You can build a REST application on top of Tomcat, but it is the job of 
that REST application then, to handle the aspects that are specific to 
REST and are not part of the HTTP protocol or of the Servlet Spec.


The area of contention here is whether a HTTP PUT request can or not 
have parameters, and whether such parameters can or not be encoded as 
part of the HTTP body of a PUT request (or as part of the URL query 
string of the request).


For GET and POST requests, both the HTTP RFC and the Servlet Spec 
provide some answers and describe how it is done.

Basically (and roughly),
- for a GET (which does not have a body), such request parameters are 
encoded as part of the request URL query string part
- for a POST request (which has a body), the parameters are encoded the 
same way, but are contained in the HTTP body of the request.


In both cases, Tomcat allows an application to retrieve these parameters 
via calls like HttpServletRequest.getParameters().  These calls 
automatically decode and parse the request parameters and return them to 
the application in a neatly usable format.
For a POST request, you are also free to read the request body yourself, 
and then parse the parameters yourself.


For PUT requests however, there is no mention anywhere (in the 
applicable specs) of parameters.
In fact, the HTTP RFC definition of a PUT request seems to indicate that 
the body contains the resource that the client wants the server to 
store at the location corresponding to the indicated request URL.
The best example of that is probably the DAV application (available as 
an add-on application under both Tomcat and Apache httpd), which allows 
a client to upload files to the server at a specific location, so that 
these files can then later be retrieved (via for example a GET request) 
using the same URL as the one used for the upload.
(So basically, it is not that parameters are forbidden for a PUT; it is 
just that they are not mentioned).



For all these reasons, currently Tomcat does not support the 
getParameters() family of methods, when the request method is PUT.


It is possible that other servlet engines support this, but in that case 
it has to be considered as an optional add-on, not as something that is 
required by the HTTP RFC nor the Servlet Spec.


I believe that because of that previous thread, a request for 
enhancement was filed to ask the Tomcat developers to provide such 
support in the future, but I don't know the status of it.


But the crux of the matter is, that if a (REST) web application would 
depend on that feature to be available in an HTTP server or a Servlet 
Engine, then that application is not portable, because the applicable 
specifications do not mention this as a mandatory feature of either of them.


Reading the PUT request body yourself, and parsing it into parameters 
yourself, is on the other hand perfectly supported and should work anywhere.




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



RE: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Caldarale, Charles R
 From: Steffen Heil [mailto:li...@steffen-heil.de]
 Subject: AW: Shutdown hook for correctly unloading drivers
 
 This does not hold, as soon as Threads are involved, right?

I don't understand your comment; Thread objects always exist, and what do you 
think that has to do with unloading classes?

 - 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



Tomcat app. can no longer connect to MySQL

2010-03-28 Thread fred basset
Hi All,

My QA guy came me with a problem where he now can't log into our
Tomcat web app. at all.  The relevant log file is below.  It looks
like Hibernate can't make a connection to MySQL.  We can get to MySQL
fine from the command line, and tried restarting MySQL and Tomcat, got
the same result.  Nothing has changed recently in the area of database
connectivity.  The platform is Fedora Core 10, latest versions of
Tomcat, Hibernate and the JDK.  Any ideas?

Thkx,
Fred

26 Mar 10:57:22 ERROR main
org.springframework.web.servlet.DispatcherServlet - Context
initialization failed
 org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in ServletContext
resource [/WEB-INF/snaps-servlet.xml]: Invocation of init method
failed; nested exception is org.hibernate.HibernateException:
Hibernate Dialect must be explicitly set
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at 
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
at 
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
at 
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
at 
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:850)
at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at 

Re: Tomcat app. can no longer connect to MySQL

2010-03-28 Thread Konstantin Kolinko
2010/3/28 fred basset fredbasset1...@gmail.com:
 Hi All,

 My QA guy came me with a problem where he now can't log into our
 Tomcat web app. at all.  The relevant log file is below.  It looks
 like Hibernate can't make a connection to MySQL.  We can get to MySQL
 fine from the command line, and tried restarting MySQL and Tomcat, got
 the same result.  Nothing has changed recently in the area of database
 connectivity.  The platform is Fedora Core 10, latest versions of
 Tomcat, Hibernate and the JDK.  Any ideas?

 Thkx,
 Fred

 26 Mar 10:57:22 ERROR main
 org.springframework.web.servlet.DispatcherServlet - Context
 initialization failed
  org.springframework.beans.factory.BeanCreationException: Error
 creating bean with name 'sessionFactory' defined in ServletContext
 resource [/WEB-INF/snaps-servlet.xml]: Invocation of init method
 failed; nested exception is org.hibernate.HibernateException:
 Hibernate Dialect must be explicitly set
(...)
 Caused by: org.hibernate.HibernateException: Hibernate Dialect must be
 explicitly set
        at 
 org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
        at 
 org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
        at 
 org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
        at 
 org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
        at 
 org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
        at 
 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)

Looks like your Hibernate configuration is incomplete.

Can it be that you are using some different configuration -- and not
the one that you are expecting?

Best regards,
Konstantin Kolinko

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



RE: sticky session failover

2010-03-28 Thread Len Takeuchi
Hi Arunkumar,

The failover is working.  What I need is the tomcat instance to which 
failover occurs assumes ownership of the sticky session, by that the session 
id has to be changed to use that tomcat instance's jvmRoute and cookie has 
to be reset, otherwise it is no longer sticky session since requests for tha 
session will be sent to ANY of the other tomcat instances configured by load 
balancing.  I believe this transfer of sticky session ownership done by 
renaming of the session and resetting the cookie is performed by 
JvmRouteBinderValve which is configured as part of a Cluster configuration.  
My problem is that I'm not using cluster session replication because my 
environment doesn't support multicast.  I'm using PersistentManager for 
session persistence using jdbc as mentioned.  I don't think it is possible 
to successfully configure a Cluster in this case (no multicast and using 
PersistentManager instead of session replication) but a Cluster 
configuration is required to configure JvmRouteBinderValve.  I'm wondering 
what my options are in this case.  Do I have to write my own valve to do 
what JvmRouteBinderValve does but that works without a cluster 
configuration?  Is my understanding correct?

Regards,
Len

-Original Message-
From: Arunkumar Janarthanan [mailto:arunkumar.webad...@gmail.com] 
Sent: March-27-10 5:36 PM
To: Tomcat Users List
Subject: Re: sticky session failover

Len,

Do you have a the nofailover parameter disabled ? this can help users
continue served  by the working tomcat instances in-case of the tomcat
instance which cookie parameter set fails / not available.



Proxy balancer://abc
BalancerMember ajp://prod1:8081 route=app1
BalancerMember ajp://prod2:8081 route=app2
BalancerMember ajp://prod3:8081 route=app3
ProxySet stickysession=JSESSIONID
ProxySet nofailover=Off
/Proxy


On Fri, Mar 26, 2010 at 5:21 PM, Len Takeuchi ltakeu...@jostleme.comwrote:

 Hello,

 I have apache load balancing a number of tomcat instances using mod_jk
 using sticky session.  This is all working with the session id having
 the jvmRoute appended.  I am storing the session using persistent
 manager using jdbc.  I want to have failover for session as supported by
 JvmRouteBinderValve.  Is this possible to set up in an environment where
 multicast is not supported?  Do I need to set up a Cluster though I
 don't need session replication since I'm using persistent manager for
 session storage so all tomcat instances have access to session data?
 What I want is just the JvmRouteBinderValve behavior of changing the
 session id to the new jvmRoute and setting cookie when a tomcat instance
 receives a session request from a different jvmRoute.

 Regards,
 Len



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



access to localhost:8080 fails

2010-03-28 Thread Krishanu Biswas
Hello,

I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
ulltimate). When inside corporate network, it works. In home network, it
doesn't. Strange enough that it does not work even when the laptop stands
alone (not connected to any network). Accessing
http://localhost:8080results in: ERROR_INTERNET_CANNOT_CONNECT as seen
with HttpWatch. The
request does not reach the server (hence no log). server.xml has not been
changed.

netstat -ab shows the following processes:

  TCP0.0.0.0:8009   hostname:0LISTENING
 [java.exe]
  TCP0.0.0.0:8080   hostname:0LISTENING
 [java.exe]
: Windows Sockets initialization failed: 5
 TCP[::]:8009  WDFN00224028A:0LISTENING
[java.exe]
 TCP[::]:8080  WDFN00224028A:0LISTENING
[java.exe]

Windows host file has the following entries:

127.0.0.1 localhost
::1   localhost

Using java version 1.6.0_18

The problem appears to be very strange to me. Did a lot of searching on the
web before this post. Nothing helped. I'm sure that this is not a new
problem and hoping that one of you have already solved such an issue.

Cheers,
Krish


Re: access to localhost:8080 fails

2010-03-28 Thread Konstantin Kolinko
2010/3/28 Krishanu Biswas biswas.krish...@googlemail.com:
 Hello,

 I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
 ulltimate).

In what folder is this Tomcat instance installed?
With what user account it runs?
Do you run it as a service, or starting from a *.bat file, or from
inside an IDE?

There are two vista-related items on the FAQ page here:
http://wiki.apache.org/tomcat/FAQ/Windows#Q8

Best regards,
Konstantin Kolinko

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



Re: access to localhost:8080 fails

2010-03-28 Thread André Warnier

Krishanu Biswas wrote:

Hello,

I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
ulltimate). When inside corporate network, it works.


Can you explain how exactly it works ? what URL are you using then, 
from where ? what are you seeing then ?


 In home network, it
doesn't. 


Same questions.


Strange enough that it does not work even when the laptop stands

alone (not connected to any network). Accessing
http://localhost:8080results in: ERROR_INTERNET_CANNOT_CONNECT as seen
with HttpWatch. The
request does not reach the server (hence no log).


I presume this URL really is :

http://localhost:8080/results

, right ?

 server.xml has not been

changed.

netstat -ab shows the following processes:

  TCP0.0.0.0:8009   hostname:0LISTENING
 [java.exe]
  TCP0.0.0.0:8080   hostname:0LISTENING
 [java.exe]
: Windows Sockets initialization failed: 5


What does that mean ? What is is in the Tomcat logs, corresponding to 
this error ?




 TCP[::]:8009  WDFN00224028A:0LISTENING
[java.exe]
 TCP[::]:8080  WDFN00224028A:0LISTENING
[java.exe]

Windows host file has the following entries:

127.0.0.1 localhost
::1   localhost

Using java version 1.6.0_18

The problem appears to be very strange to me. Did a lot of searching on the
web before this post. Nothing helped. I'm sure that this is not a new
problem and hoping that one of you have already solved such an issue.

Is the Windows firewall or anything similar enabled (AUP or whatever 
it's called) ?
If you do NOT start the Tomcat Service, and do a netstat -ab, what do 
you see then ?



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



Re: sticky session failover

2010-03-28 Thread Mark Thomas
On 28/03/2010 18:40, Len Takeuchi wrote:
 My problem is that I'm not using cluster session replication because my 
 environment doesn't support multicast.  I'm using PersistentManager for 
 session persistence using jdbc as mentioned.  I don't think it is possible 
 to successfully configure a Cluster in this case (no multicast and using 
 PersistentManager instead of session replication) but a Cluster 
 configuration is required to configure JvmRouteBinderValve.

Nope. This was fixed last year:
http://svn.apache.org/viewvc?view=revisionrevision=794822

Mark



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



RE: access to localhost:8080 fails

2010-03-28 Thread Caldarale, Charles R
 From: Krishanu Biswas [mailto:biswas.krish...@googlemail.com]
 Subject: access to localhost:8080 fails
 
 I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
 ulltimate). When inside corporate network, it works. In home network,
 it doesn't.

Sounds like whatever security agent you're using imposes different firewall 
rules depending on whether or not you're attached to the corporate network.  
(The one we use - SEP - certainly does.)  You'll have to figure out how to 
change the firewall config - if you're allowed to.

 - 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



AW: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Steffen Heil
Hi

You wrote, that when an application is unloaded, that tomcat discards all
references to the classes of that web application, therefore the garbage
collector could effectively unload that application.

However, there are web applications that have own threads (file reaper,
connection pool, etc.).

That means that there is no real way to safely unload a web application.

I am thinking about a strategy to iterate over all running threads and
interrupt (and if absolutely necessary stop) all threads started by a
certain classloader (not sure if it is possible, but I suspect so - might
require instrumention though.)

Regards,
  Steffen



-Ursprüngliche Nachricht-
Von: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Gesendet: Sonntag, 28. März 2010 16:39
An: Tomcat Users List
Betreff: RE: Shutdown hook for correctly unloading drivers

 From: Steffen Heil [mailto:li...@steffen-heil.de]
 Subject: AW: Shutdown hook for correctly unloading drivers
 
 This does not hold, as soon as Threads are involved, right?

I don't understand your comment; Thread objects always exist, and what do
you think that has to do with unloading classes?

 - 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


smime.p7s
Description: S/MIME cryptographic signature


Re: AW: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Mark Thomas
On 28/03/2010 19:46, Steffen Heil wrote:
 Hi
 
 You wrote, that when an application is unloaded, that tomcat discards all
 references to the classes of that web application, therefore the garbage
 collector could effectively unload that application.
 
 However, there are web applications that have own threads (file reaper,
 connection pool, etc.).
 
 That means that there is no real way to safely unload a web application.
 
 I am thinking about a strategy to iterate over all running threads and
 interrupt (and if absolutely necessary stop) all threads started by a
 certain classloader (not sure if it is possible, but I suspect so - might
 require instrumention though.)

Tomcat can already do this. You don't want to use it though. In my
testing the JVM crashed about 50% of the time. Better to fix the thread
leak. Tomcat will also tell you which threads weren't stopped along with
a bunch of other memory leak checks.

Mark



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



RE: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Caldarale, Charles R
 From: Steffen Heil [mailto:li...@steffen-heil.de]
 Subject: AW: Shutdown hook for correctly unloading drivers
 
 However, there are web applications that have own threads
 (file reaper, connection pool, etc.).

It's the application's responsibility to manage those threads, and shut them 
down when the application is stopped.  This is one of the purposes of the 
various lifecycle listeners defined in the servlet spec.  Any application that 
fails to manage the threads it creates is inherently broken.

 I am thinking about a strategy to iterate over all running threads and
 interrupt (and if absolutely necessary stop) all threads started by a
 certain classloader

Threads aren't started by or associated with a classloader, other than 
temporarily inheriting the one from the parent thread (which is dynamically 
changeable).

 - 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: sticky session failover

2010-03-28 Thread Len Takeuchi
Hi Mark,

Nope. This was fixed last year: http://svn.apache.org/viewvc?
view=revisionrevision=794822
Mark

Thanks very much for you quick response.  That's great that 
JmvRouteBinderValve works with PersistentManager.  I tried to configure it 
by putting JvmRouteBinderValve config inside a Manager as below but this did 
not seem to take effect:

Manager className=org.apache.catalina.session.PersistentManager 
maxIdleBackup=0 saveOnRestart=true
Store className=org.apache.catalina.session.JDBCStore 
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://localhost:3306/xxx 
connectionName=xxx
connectionPassword=xxx/
Valve 
className=org.apache.catalina.cluster.session.JvmRouteBinderValve/ 
/Manager
 
What is the correct way to configure JvmRouteBinderValve with 
PersistentManager?

Regards,
Len

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



RE: sticky session failover

2010-03-28 Thread Caldarale, Charles R
 From: Len Takeuchi [mailto:ltakeu...@jostleme.com]
 Subject: Re: sticky session failover
 
 I tried to configure it by putting JvmRouteBinderValve 
 config inside a Manager

To quote from the doc:

A Valve element represents a component that will be inserted into the request 
processing pipeline for the associated Catalina container (Engine, Host, or 
Context).

Note that Manager is not listed.  You'll need to configure the Valve in 
each Context that needs it, or in the Host or Engine if you want the 
Valve to apply to all.

 - 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: access to localhost:8080 fails

2010-03-28 Thread Krishanu Biswas
On Sun, Mar 28, 2010 at 8:13 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2010/3/28 Krishanu Biswas biswas.krish...@googlemail.com:
  Hello,
 
  I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
  ulltimate).

 In what folder is this Tomcat instance installed?


Tomcat is installed under C:\Program Files\Apache Software Foundation\Tomcat
6.0


 With what user account it runs?


Administrator


 Do you run it as a service, or starting from a *.bat file, or from
 inside an IDE?


I tried both but the result is same.


 There are two vista-related items on the FAQ page here:
 http://wiki.apache.org/tomcat/FAQ/Windows#Q8

 Thank you for your reply Konstantin. This is my first post to the forum.
Not sure if my content is readable enough. Will learn over time for sure.


 Best regards,
 Konstantin Kolinko

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




Re: access to localhost:8080 fails

2010-03-28 Thread Krishanu Biswas
On Sun, Mar 28, 2010 at 8:20 PM, André Warnier a...@ice-sa.com wrote:

 Krishanu Biswas wrote:

 Hello,

 I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
 ulltimate). When inside corporate network, it works.


 Can you explain how exactly it works ? what URL are you using then, from
 where ? what are you seeing then ?


http://localhost:8080  OR http://127.0.0.1:8080 works in one network
(corporate) and the same does not work in a different network (my home
network - wireless network for home from T-phone)



  In home network, it

 doesn't.


 Same questions.


In my home network, I'm connected to via a router to the internet. The point
is that Tomcat is installed locally on my laptop and it should work without
any such connectivity. Unfortunately it doesn't.



 Strange enough that it does not work even when the laptop stands

 alone (not connected to any network). Accessing
 http://localhost:8080results in: ERROR_INTERNET_CANNOT_CONNECT as seen

 with HttpWatch. The
 request does not reach the server (hence no log).


 I presume this URL really is :

 http://localhost:8080/results

 , right ?

That was a formatting mistake. I meant only http://localhost:8080
This request to the local server results in ERROR_INTERNET_CANNOT_CONNECT as
seen
with HttpWatch.



  server.xml has not been

 changed.

 netstat -ab shows the following processes:

  TCP0.0.0.0:8009   hostname:0LISTENING
  [java.exe]
  TCP0.0.0.0:8080   hostname:0LISTENING
  [java.exe]
 : Windows Sockets initialization failed: 5


 What does that mean ? What is is in the Tomcat logs, corresponding to this
 error ?



  TCP[::]:8009  WDFN00224028A:0LISTENING
 [java.exe]
  TCP[::]:8080  WDFN00224028A:0LISTENING
 [java.exe]

 Windows host file has the following entries:

 127.0.0.1 localhost
 ::1   localhost

 Using java version 1.6.0_18

 The problem appears to be very strange to me. Did a lot of searching on
 the
 web before this post. Nothing helped. I'm sure that this is not a new
 problem and hoping that one of you have already solved such an issue.

 Is the Windows firewall or anything similar enabled (AUP or whatever
 it's called) ?
 If you do NOT start the Tomcat Service, and do a netstat -ab, what do you
 see then ?


Thank you for helping me on this. The same setup on the same laptop will
start working tomorrow when I am connected to corporate network. This is a
corporate laptop and windows firewall is installed. But I am not sure where
should I look in to check if this firewall is the blocker. Moreover, I may
not be allowed to turn this firewall off even if it is required. By the way,
i turned it off temporariry (for 5 mins, hope nothing has happened in
between) but the situation did not change.




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




Re: access to localhost:8080 fails

2010-03-28 Thread Krishanu Biswas
Chuck:

To verify the network issue, I installed Tomcat on my personal laptop. The
browser is still unable to show up: http//localhost:8080.
I'm connected to a router via a wireless network which in turn connects me
to the internet. I have Mcafee antivirus, firewall and spyware installed.

I will now look into the problem from this direction as well. Thank you.

Krish

On Sun, Mar 28, 2010 at 8:28 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Krishanu Biswas [mailto:biswas.krish...@googlemail.com]
  Subject: access to localhost:8080 fails
 
  I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
  ulltimate). When inside corporate network, it works. In home network,
  it doesn't.

 Sounds like whatever security agent you're using imposes different firewall
 rules depending on whether or not you're attached to the corporate network.
  (The one we use - SEP - certainly does.)  You'll have to figure out how to
 change the firewall config - if you're allowed to.

  - 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: access to localhost:8080 fails

2010-03-28 Thread Caldarale, Charles R
 From: Krishanu Biswas [mailto:biswas.krish...@googlemail.com]
 Subject: Re: access to localhost:8080 fails
 
 I installed Tomcat on my personal laptop. The browser is 
 still unable to show up: http//localhost:8080.

Do you have localhost defined in that machine's hosts file?

Can you ping localhost from a command prompt?

What does netstat -ano show on the personal laptop?

You might be having IPv6/IPv4 problems.  Try changing the hosts entry to just 
127.0.0.1, leaving out the IPv6 setting.

 - 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: sticky session failover

2010-03-28 Thread Len Takeuchi
Thanks Chuck.  It worked when I put the JvmRouteBinderValve configuration 
under Host.

Regards,
Len

On Sun, 28 Mar 2010 15:26:22 -0500, Caldarale, Charles R wrote
  From: Len Takeuchi [mailto:ltakeu...@jostleme.com]
  Subject: Re: sticky session failover
  
  I tried to configure it by putting JvmRouteBinderValve 
  config inside a Manager
 
 To quote from the doc:
 
 A Valve element represents a component that will be inserted into 
 the request processing pipeline for the associated Catalina 
 container (Engine, Host, or Context).
 
 Note that Manager is not listed.  You'll need to configure the 
 Valve in each Context that needs it, or in the Host or 
 Engine if you want the Valve to apply to all.
 
  - 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


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



Upgrade tomcat 6 to a new point release on windows

2010-03-28 Thread dale77

Hi,

what is the procedure for upgrading to the latest point release of tomcat 6
on windows?

We are on 6.0.18 running tomcat as a windows service. What is the
recommended procedure for upgrade?

Does the current windows installer do the right thing to in-place upgrade
6.0.18 to 6.0.26? Or is this an uninstall, reinstall thing?

Thanks

Dale
-- 
View this message in context: 
http://old.nabble.com/Upgrade-tomcat-6-to-a-new-point-release-on-windows-tp28064769p28064769.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: access to localhost:8080 fails

2010-03-28 Thread Harry Metske
I have seen similar issues on our corporate (XP and Vista) laptops, somebody
decided that the locally running firewall should also block access to
localhost. I think you should first verify if that's the case.
I'm not a Windows expert, so I don't know how to check if the above is the
case.
If you are allowed to give the netstat command, try the suggestion from
Charles (netstat -ano), if you see status SYN_SENT, it's for sure a firewall
issue.

regards,
Harry

2010/3/28 Krishanu Biswas biswas.krish...@googlemail.com

 Chuck:

 To verify the network issue, I installed Tomcat on my personal laptop. The
 browser is still unable to show up: http//localhost:8080.
 I'm connected to a router via a wireless network which in turn connects me
 to the internet. I have Mcafee antivirus, firewall and spyware installed.

 I will now look into the problem from this direction as well. Thank you.

 Krish

 On Sun, Mar 28, 2010 at 8:28 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

   From: Krishanu Biswas [mailto:biswas.krish...@googlemail.com]
   Subject: access to localhost:8080 fails
  
   I've a 6.0.26 (latest) Tomcat installed on my laptop (windows vista
   ulltimate). When inside corporate network, it works. In home network,
   it doesn't.
 
  Sounds like whatever security agent you're using imposes different
 firewall
  rules depending on whether or not you're attached to the corporate
 network.
   (The one we use - SEP - certainly does.)  You'll have to figure out how
 to
  change the firewall config - if you're allowed to.
 
   - 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