Re: Session clustering across different contexts

2010-06-15 Thread Mark Thomas

On 15/06/2010 06:21, Andrew Bruno wrote:

I am testing this on my laptop, windows 7 64bit, tomcat 6

If I use the same contexts, i.e.

localhost:8181/r2 and localhost:8080/r2 the sessions are replicated
across them no problem.

If I use a different context, e.g. r3 but same web app deployed, the
sessions are no replicated, and I get this warning:

org.apache.catalina.ha.session.ClusterSessionListener messageReceived
WARNING: Context manager doesn't exist:localhost#/r2


Correct. What you are trying to do is not supported. Tomcat has no 
mechanism to map /r2 in one instance to /r3 in another.


Mark



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



Re: hibernate not finding global resource datasource defined by tomcat

2010-06-15 Thread Mark Thomas

On 15/06/2010 02:21, Mark Eggers wrote:

Sure, I can make an attempt at it. I'd like to finish the wiki entry first. 
What I'm writing though will have to be drastically shortened for the 
documentation page I think.

I just ran into a bit of a puzzle though. I was trying to unravel what happens 
when you put everything into server.xml and use a CombinedRealm. Under Linux, I 
had to add a ResourceLink element to my context.xml in order to use the 
sub-Realm.

I can understand that I need a ResourceLink when I put the Resource in 
GlobalNamingResources and the Realm in context.xml, but I was rather surprised 
that I needed the ResourceLink when both are in server.xml.

I'll see if I can reproduce this on Windows/XP (make sure I've done everything 
in a reasonable order).

If that is indeed the case, can someone explain:

1. Context.xml - everything
no ResourceLink needed (obviously)
2. Context.xml - Realm, server.xml Resource in GlobalNamingResources
ResourceLink needed (obviously)
3. Server.xml - CombinedRealm, Resource in GlobalNamingResources
ResourceLink needed (??)


Should be no. If not, it is a bug.

Mark



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



Re: Session clustering across different contexts

2010-06-15 Thread Andrew Bruno
OK, that's cool.  Thanks for confirming.  I'll have to try via Apache
redirects/aliasing/rewrites...

/AB

On Tue, Jun 15, 2010 at 4:32 PM, Mark Thomas ma...@apache.org wrote:
 On 15/06/2010 06:21, Andrew Bruno wrote:

 I am testing this on my laptop, windows 7 64bit, tomcat 6

 If I use the same contexts, i.e.

 localhost:8181/r2 and localhost:8080/r2 the sessions are replicated
 across them no problem.

 If I use a different context, e.g. r3 but same web app deployed, the
 sessions are no replicated, and I get this warning:

 org.apache.catalina.ha.session.ClusterSessionListener messageReceived
 WARNING: Context manager doesn't exist:localhost#/r2

 Correct. What you are trying to do is not supported. Tomcat has no mechanism
 to map /r2 in one instance to /r3 in another.

 Mark



 -
 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



Re: hibernate not finding global resource datasource defined by tomcat

2010-06-15 Thread yuccanel
That is so fantastic! Well done. I was able to get it working. Perhaps 
someone can explain the reasons for runtime exception complaining that the 
jndi name was not bound in current context? The wiki is very good but I like 
to understand the work behind the ecene a little too.  My guess is that like 
any resource we need to provide the jndi r tomcat resource in web.xml as 
done on that wiki but this is certainly not clear from tomcat documentation. 
Also, I am able to use that datasource in any webapp deployed with same 
server, provided that I provide ach deployed webapp with the metadata 
required? If so, there really is no point in tomcat documentation referring 
to us putting the realm and datasource in server.xml if i won't work gobally 
as the docs indicate it will.


--
From: Mark Eggers its_toas...@yahoo.com
Sent: Monday, June 14, 2010 11:45 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: hibernate not finding global resource datasource defined by 
tomcat


Please read the following for a detailed description on how to configure 
Hibernate to use JNDI resources supplied by Tomcat.


http://wiki.apache.org/tomcat/TomcatHibernate

Then you will need a ResourceLink element in META-INF/context.xml to 
make the resource in GlobalNamingResources available to your 
application.


The configuration for that information can be found here:

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource%20Links

Finally, unless you place Tomcat's manager and admin application's 
authentication and authorization information in your database, removing 
the UserDatabaseRealm from GlobalNamingResources will prevent you from 
using the manager and admin application.


You can place more than one Resource element in the 
GlobalNamingResources element of your server.xml.


I'm trying to finish up a document on DataSourceRealms. Hopefully that 
will get posted on Tomcat's Wiki today or tomorrow, depending on other 
time constraints.


just my two cents . . . . .

/mde/

--- On Mon, 6/14/10, yucca...@live.co.za yucca...@live.co.za wrote:

Hello tomcats!!

Please advise as to why hibernate us unable to find jndi
datasource configured in tomcat?

Trying 2 different setups here:

1) server.xml resource as follows:

GlobalNamingResources

!-- Editable user database that can also be used
by
 UserDatabaseRealm to
authenticate users

--

Resource

name=jdbc/auth
description=The
Jar Bar user authentication

type=javax.sql.DataSource

auth=Container

driverClassName=com.mysql.jdbc.Driver

maxActive=30 maxIdle=10

maxWait=1

password=myPass

url=jdbc:mysql://localhost:3306/yucca123_thejarbar

validationQuery=/* ping */ SELECT
1

username=yucca123_tom/



  /GlobalNamingResources

with hibernate.cfg.xml:
?xml version='1.0'
encoding='utf-8'?
!DOCTYPE hibernate-configuration PUBLIC

-//Hibernate/Hibernate Configuration DTD//EN
  http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
hibernate-configuration

session-factory
property
name=connection.urljdbc:mysql://localhost:3306/yucca123_thejarbar/property

property
name=hibernate.connection.datasourcejava:comp/env/jdbc/auth/property

property
name=connection.driver_classcom.mysql.jdbc.Driver/property

property
name=connection.usernameyucca123_tom/property

property
name=current_session_context_classthread/property

property
name=connection.passwordpookie123/property

mapping
resource=org/bar/jar/model/UserRolesEntity.hbm.xml/

mapping
resource=org/bar/jar/model/UsercommentsEntity.hbm.xml/

mapping
resource=org/bar/jar/model/UsersEntity.hbm.xml/

!-- DB schema will be updated if needed --
!-- 
property name=hbm2ddl.autoupdate/property --


/session-factory
/hibernate-configuration

so I try

2) moving resource and realm element to context.xml with
adding localdatasource attribute to  resource (true) and get same
exception?

What am I missing here?

tomcat is latest 6.0.26
mysql 5 with global connector (inside
common/lib)

Ideally I want the global(server.xml) config for the
resource as it WILL be shared among deployed applications, but because 
this is

first application I am willing to use just contect configured
resource.






-
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



redirect some requests to another tomcat.

2010-06-15 Thread kiran surapaneni
Hi,

   I have several applications running on my tomcat server. But due to some
reasons i need to move some of these applications to another tomcat server.
But most of these applications are client-sever applications and hence i
don't have the flexibility of making changes to the url. So the client will
continue to type in the same url but tomcat should be able to forward the
request to the appropriate server based on the url. Is this possible? And if
yes, any clues on how to achieve this.

Thanks in advance,
Venkat


RE: Connection is closed when CometEvent.close is called during an event

2010-06-15 Thread Reich, Matthias
Konstantin Kolinko wrote:
 2010/6/11 Reich, Matthias matthias.re...@siemens-enterprise.com:
 
  The concept of long poll is e.g. described in
  
 http://www.javaworld.com/javaworld/jw-03-2008/jw-03-asynchhttp
.html?page=6
 
  The sequence of events in my situation is as follows:
  - a poll request is received by the server
  - the CoyoteAdapter.service method is called and in turn
   invokes the servlet's event method with a BEGIN event
  - request.isComet() is still true when the control returns
   to the CoyoteAdapter.service method
  - some other thread writes a response and closes the Writer
   of the response
  - the CoyoteAdapter.event method is called and in turn
   invokes the servlet's event method with an END event
  - the servlet calls event.close()
  - when the control returns to the CoyoteAdapter.event method
   we have exactly this situation:
   response.isClosed()  !request.isComet()  
 status==SocketStatus.OPEN
  - thus, if the error flag is set in this situation,
   the connection will be closed, and a new connection must be opened
   by the browser for the subsequent poll request
 
  According to the above sequence I would expect that the connection
  is always closed if request.isComet() is still true when control
  returns to the CoyoteAdapter.service method after processing
  the BEGIN event -  no matter how long it takes from then
  until the response is written.
  Surprisingly, I did not always observe this.
 
  Anyway, if the error flag is not set in this situation,
  the connection is kept open.
 
 
 
  --- 
 C:\DOCUME~1\rm041693\LOCALS~1\Temp\CoyoteAdapter.java-revBASE.
svn001.tmp.java       Do Jun 10 22:22:20 2010
  +++ 
 D:\tomcat\TOMCAT_6_0_26\java\org\apache\catalina\connector\Coy
oteAdapter.java       Mo Jun  7 17:30:23 2010
  @@ -215,7 +215,9 @@
                          //CometEvent.close was called 
 during an event.
                          
 request.getEvent().setEventType(CometEvent.EventType.END);
                          request.getEvent().setEventSubType(null);
  -                        error = true;
  +                        // don't set the error flag - 
 otherwise the socket will be closed
  +                        // whenever CometEvent.close is 
 called during the event
  +                        // error = true;
                          
 connector.getContainer().getPipeline().getFirst().event(reques
 t, response, request.getEvent());
                      }
                      res.action(ActionCode.ACTION_COMET_END, null);
 
 
 Now I understand. Thank you.
 
 I would say that you are trying to combine Comet and Keep-Alive.

Well, it actually was combined (maybe unintentionally) in 6.0.18.
(I retested an older version of our application which uses 6.0.18
and didn't observe that connections were closed in similar situations.) 

Since 6.0.20, the connections are closed upon event.close(),
but it took me some time to get aware of this because when the
subsequent request fails due to the close, the browsers
silently retry that request.
 
 
 In comet to send a portion of data (a response), you do
 writer.flush(). It sends the data over the wire. Doing event.close()
 terminates comet request processing.
 
 If it were possible not to close the connection, it were possible to
 alternate comet and non-comet processing of subsequent requests over
 the same connection, and to process different requests by different
 servlets.
 
  - some other thread writes a response and closes the Writer
   of the response
 
 Response object is not thread safe. You must write your response in
 the thread that received your EventType.READ event (or any other
 event) while you are processing that event.
 
 Otherwise, any random result might happen.
 

Doesn't the sample code on the documentation page include async 
writes as well? When it gets a READ event from one connection
it writes to all open connetions.
With respect to all other connections, this is an async write.

In a long poll scenario, closing the Writer seems to be 
the only way to trigger a further event (i.e. an END event)
after the BEGIN event.

 
 BTW, for reference:
 There exists the following documentation page,
 http://tomcat.apache.org/tomcat-6.0-doc/aio.html#CometEvent
 and sample code in
 webapps/examples/WEB-INF/classes/chat/ChatServlet.java
 plus some helper JSPs.
 
 The sample is callable as
 http://localost:8080/examples/jsp/chat/chat.jsp  in Tomcat 
 6.0.26 and earlier
 http://localost:8080/examples/jsp/chat/index.jsp  in Tomcat 7 and in
 Tomcat 6.0.27 and later
 
 
 Regarding Comet + Keep-Alive, if it does not work, it is worth filing
 an enhancement request against Tomcat 7.   It would be easier if there
 were some sample code or better a test case.  This new use case has to
 be tested.

I'll try to find the time to prepare something. In the repository 
(6.0.26) I have not detected any Comet related test cases. Are there
any test cases you could recommend as an example of how I should
organize it?
What 

Re: redirect some requests to another tomcat.

2010-06-15 Thread Andrew Bruno
This is pretty much what I have been working on.

As a few hints, you'll need Apache in front, and setup AJP on tomcat.

I have set up loadbalancing, and have the two tomcats doing session
sharing, and use the jvmroute to route to respected tomcat.

You might need to change your server webapp java code so that you
know which tomcat to jvmroute to.

Basically, with the loadbalancer,it can randomly pick any tomcat.
When the user logs in, I have some business logic to detect whether
they should be on current web app.  if they are not, I save session
details, and then I redirect to url again, but append the
jsessionid=SESSIONID.worker2 to url, and Apache knows from that to
automatically use worker2.  (assuming worker2 is the tomcat web app
user is supposed to be on).

The only thing I am worried about is race conditions with session
replication.  The worst that can happen is that the user will need to
log in again, if the session hasnt replicated in time.

The other option I am looking at is to redirect to different contexts
from a generic login page... but I havent worked out how I can set
Apache up to map many different contexts to one.

Google Apps seems to do this.  See http://www.google.com/a and then
Click on Sign in here, and enter a e.g. domain, ziateresa.com It
redirects to a new context.

/AB

On Tue, Jun 15, 2010 at 5:50 PM, kiran surapaneni svkir...@gmail.com wrote:
 Hi,

   I have several applications running on my tomcat server. But due to some
 reasons i need to move some of these applications to another tomcat server.
 But most of these applications are client-sever applications and hence i
 don't have the flexibility of making changes to the url. So the client will
 continue to type in the same url but tomcat should be able to forward the
 request to the appropriate server based on the url. Is this possible? And if
 yes, any clues on how to achieve this.

 Thanks in advance,
 Venkat


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



Re: how to calculate a memory tomcat

2010-06-15 Thread Tobias Crefeld
Am Tue, 15 Jun 2010 08:42:47 +1000
schrieb Matthew Peterson matt.peter...@une.edu.au:

 Lambda Probe is stale. It has been forked to Psi Probe which has
 regular activity: http://code.google.com/p/psi-probe/

It's always nice if there is some development in progress but it's not
so nice if this makes results worse. 

Unfortunately some Psi-probes pages are hard to read, e.g. the new
thread-column at the connection page making the URL-column unreadable
- the new development seems to wear IE-only-glasses... ;) - or a change
of fonts for static text causing collisions with the dynamic part of the
text at the same page.


Gruß,
 Tobias.

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



Perfomance analysis

2010-06-15 Thread Michael Oullion

hello,

 

I'm doing some benchmark on Web service's Call and I have some strange results.

 

First of all,

My web service is on a Axis2 1.5.1  framework,

I use a Apache Tomcat 6.0.20 / JRE (server mode) 1.6.0_20-b02.

I use JMeter 2.3.4 to do my benchmark.

 

When I analyze my result, I have some nice (and stable ) things but some times 
I observe a huge decrease of Hit/second and a huge increase of response time.

For example, normal response time is (avg) 300 ms and it increase to 1.000 ms 
and more, at the same time the hit/second decrease from 90 to 40.

 

I watch the CPU activity to see if the bottleneck is here and I observe that I 
have the same thing.

When the response time increase, the CPU activity fall down from 40% to 10%. 

I watch disk time access too and I don't observe a link between this activity 
and the fall of performance.

 

I try to attach my graph to this mail but I don't know if it's okay on the 
mailing list.

I don't understand why some time the performance fall down.

So, if you are some ideas...
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Perfomance analysis

2010-06-15 Thread Andrew Bruno

Is jmeter on same box as app?

On 15/06/2010, at 7:05 PM, Michael Oullion theaz...@hotmail.com wrote:


hello,

I'm doing some benchmark on Web service's Call and I have some  
strange results.


First of all,
My web service is on a Axis2 1.5.1  framework,
I use a Apache Tomcat 6.0.20 / JRE (server mode) 1.6.0_20-b02.
I use JMeter 2.3.4 to do my benchmark.

When I analyze my result, I have some nice (and stable ) things but  
some times I observe a huge decrease of Hit/second and a huge  
increase of response time.
For example, normal response time is (avg) 300 ms and it increase to  
1.000 ms and more, at the same time the hit/second decrease from 90  
to 40.


I watch the CPU activity to see if the bottleneck is here and I  
observe that I have the same thing.
When the response time increase, the CPU activity fall down from 40%  
to 10%.
I watch disk time access too and I don't observe a link between this  
activity and the fall of performance.


I try to attach my graph to this mail but I don't know if it's okay  
on the mailing list.

I don't understand why some time the performance fall down.
So, if you are some ideas...

Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign  
up now.


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


RE: Perfomance analysis

2010-06-15 Thread Michael Oullion

Oh sorry, I forgot to explain my architecture.

No, I have one dedicated server which host the tomcat and I use JMeter on a 
second server ( not dedicated ).
 
 From: andrew.br...@gmail.com
 To: users@tomcat.apache.org
 Subject: Re: Perfomance analysis
 Date: Tue, 15 Jun 2010 19:53:56 +1000
 CC: users@tomcat.apache.org
 
 Is jmeter on same box as app?
 
 On 15/06/2010, at 7:05 PM, Michael Oullion theaz...@hotmail.com wrote:
 
  hello,
 
  I'm doing some benchmark on Web service's Call and I have some 
  strange results.
 
  First of all,
  My web service is on a Axis2 1.5.1 framework,
  I use a Apache Tomcat 6.0.20 / JRE (server mode) 1.6.0_20-b02.
  I use JMeter 2.3.4 to do my benchmark.
 
  When I analyze my result, I have some nice (and stable ) things but 
  some times I observe a huge decrease of Hit/second and a huge 
  increase of response time.
  For example, normal response time is (avg) 300 ms and it increase to 
  1.000 ms and more, at the same time the hit/second decrease from 90 
  to 40.
 
  I watch the CPU activity to see if the bottleneck is here and I 
  observe that I have the same thing.
  When the response time increase, the CPU activity fall down from 40% 
  to 10%.
  I watch disk time access too and I don't observe a link between this 
  activity and the fall of performance.
 
  I try to attach my graph to this mail but I don't know if it's okay 
  on the mailing list.
  I don't understand why some time the performance fall down.
  So, if you are some ideas...
 
  Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign 
  up now.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
  
_
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969

Re: Glassfish overriding Tomcat 6.0.24 installation?

2010-06-15 Thread Josh Gooding
Thanks David, I did that and it seemed to work.  :: thumbs up ::

- Josh

On Thu, May 27, 2010 at 2:02 PM, David Smith david.sm...@cornell.eduwrote:

 On 5/27/2010 1:44 PM, Josh Gooding wrote:
  Hey guys (and gals).
 
  Interesting enough, I installed the Jave EE 5 JDK for windows.  I then
  installed Tomcat 6.0.24, when I navigate to htp://localhost:8080 (which
  should be the default of Tomcat) I am getting the glassfish junk.  How
 can I
  remove the glassfish?  I don't believe that there is an option to not
  install glassfish.  Any help would be greatly appreciated.
 
  - Josh
 

 Drop Java EE 5 and install a current version of the java SDK.

 --David

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




Re: Glassfish overriding Tomcat 6.0.24 installation?

2010-06-15 Thread jjjjj jjjjjj
Hi David
You have some different choice one of them is in below
go to Tom Cat installation path/Apache Software Foundation/Tomcat 6.X\conf
in this path you can see file with name server.xml
in it you can see the tag
Connector port=8080 ,
you can change it or find out the picked up port that Tom Cat now listening on 
it

Regards,
Pouya




From: Josh Gooding josh.good...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, June 15, 2010 4:14:01 PM
Subject: Re: Glassfish overriding Tomcat 6.0.24 installation?

Thanks David, I did that and it seemed to work.  :: thumbs up ::

- Josh

On Thu, May 27, 2010 at 2:02 PM, David Smith david.sm...@cornell.eduwrote:

 On 5/27/2010 1:44 PM, Josh Gooding wrote:
  Hey guys (and gals).
 
  Interesting enough, I installed the Jave EE 5 JDK for windows.  I then
  installed Tomcat 6.0.24, when I navigate to htp://localhost:8080 (which
  should be the default of Tomcat) I am getting the glassfish junk.  How
 can I
  remove the glassfish?  I don't believe that there is an option to not
  install glassfish.  Any help would be greatly appreciated.
 
  - Josh
 

 Drop Java EE 5 and install a current version of the java SDK.

 --David

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





  

Re: Glassfish overriding Tomcat 6.0.24 installation?

2010-06-15 Thread David Smith
The true problem even after resolving connector port conflicts is that
tomat is not compatible with Java EE.  Java EE has a copy of the
servlet-api which conflicts with the servlet-api distributed with
tomcat.  If you want to use Java EE, you end up using Glassfish.  If you
want to use tomcat, you end up using the JDK.

--David


On 6/15/2010 7:52 AM, j jj wrote:
 Hi David
 You have some different choice one of them is in below
 go to Tom Cat installation path/Apache Software Foundation/Tomcat 6.X\conf
 in this path you can see file with name server.xml
 in it you can see the tag
 Connector port=8080 ,
 you can change it or find out the picked up port that Tom Cat now listening 
 on it

 Regards,
 Pouya



 
 From: Josh Gooding josh.good...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tue, June 15, 2010 4:14:01 PM
 Subject: Re: Glassfish overriding Tomcat 6.0.24 installation?

 Thanks David, I did that and it seemed to work.  :: thumbs up ::

 - Josh

 On Thu, May 27, 2010 at 2:02 PM, David Smith david.sm...@cornell.eduwrote:

   
 On 5/27/2010 1:44 PM, Josh Gooding wrote:
 
 Hey guys (and gals).

 Interesting enough, I installed the Jave EE 5 JDK for windows.  I then
 installed Tomcat 6.0.24, when I navigate to htp://localhost:8080 (which
 should be the default of Tomcat) I am getting the glassfish junk.  How
   
 can I
 
 remove the glassfish?  I don't believe that there is an option to not
 install glassfish.  Any help would be greatly appreciated.

 - Josh

   
 Drop Java EE 5 and install a current version of the java SDK.

 --David

 -
 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



RE: disabling non url match returns

2010-06-15 Thread nejm

Chuck,
Thanks for the response. I'm running the Tomcat V6 and the following is my
web.xml: 
It looks like my mapping thats catching all requests would be the culprit
although I imagine if that mapping was removed it may change the behavior in
other areas? I'm going to look into these changes and effects now.

Thanks again.

?xml version=1.0 encoding=UTF-8?
 web-app id=WebApp_ID version=2.4  
   xmlns=http://java.sun.com/xml/ns/j2ee;  
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;  
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee  
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;  
  display-nameMMS EXTERNAL CONTENT SERVER/display-name  
  !-- Application class name --  
  context-param  
 param-nameorg.restlet.application/param-name  
 param-value  
org.mms.restlet.MainApplication  
 /param-value  
  /context-param  
 
  !-- Restlet adapter --  
  servlet  
 servlet-nameRestletServlet/servlet-name  
 servlet-class  
com.noelios.restlet.ext.servlet.ServerServlet  
 /servlet-class  
  /servlet  
 
  !-- Catch all requests --  
 servlet-mapping  
servlet-nameDefaultNoListing/servlet-name  
 url-pattern/*/url-pattern  
  /servlet-mapping 
   /web-app  
   


n828cl wrote:
 
 From: nejm [mailto:emedei...@mms.org]
 Subject: disabling non url match returns
 
 new to tomcat 
 
 What exact version?
 
 and I'm trying to find the appropriate web.xml
 tweek to avoid trailing '/*' mapping to take place.
 
 You really, really don't want to preclude that, since it would disable
 delivery of all static content.
 
 For example lets say abc.com/current/ is a valid request.
 
 however abc.com/current/xyz should not be.
 
 my Tomcat server is always returning the abc.com/current/anything
 trailing just as though it was abc.com/current.
 
 No, Tomcat isn't, but *your* servlet is.  Post the web.xml for your webapp
 so we can see what mappings you have specified.
 
  - 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/disabling-non-url-match-returns-tp28886572p28890700.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: Glassfish overriding Tomcat 6.0.24 installation?

2010-06-15 Thread jjjjj jjjjjj
I tried it and if you use glass fish you do not need to tom cat
but if you like you can use both and if you change the tag
for example Connector port=8099 or 8098 ,..
after that must try http://localhost:8099 or http://localhost:8098 to use 
tomcat 
it seems no conflicts appear
and if use win you can add a exception on your firewall ,..

-Pouya



From: David Smith david.sm...@cornell.edu
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, June 15, 2010 4:52:07 PM
Subject: Re: Glassfish overriding Tomcat 6.0.24 installation?

The true problem even after resolving connector port conflicts is that
tomat is not compatible with Java EE.  Java EE has a copy of the
servlet-api which conflicts with the servlet-api distributed with
tomcat.  If you want to use Java EE, you end up using Glassfish.  If you
want to use tomcat, you end up using the JDK.

--David


On 6/15/2010 7:52 AM, j jj wrote:
 Hi David
 You have some different choice one of them is in below
 go to Tom Cat installation path/Apache Software Foundation/Tomcat 6.X\conf
 in this path you can see file with name server.xml
 in it you can see the tag
 Connector port=8080 ,
 you can change it or find out the picked up port that Tom Cat now listening 
 on it

 Regards,
 Pouya



 
 From: Josh Gooding josh.good...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tue, June 15, 2010 4:14:01 PM
 Subject: Re: Glassfish overriding Tomcat 6.0.24 installation?

 Thanks David, I did that and it seemed to work.  :: thumbs up ::

 - Josh

 On Thu, May 27, 2010 at 2:02 PM, David Smith david.sm...@cornell.eduwrote:

  
 On 5/27/2010 1:44 PM, Josh Gooding wrote:

 Hey guys (and gals).

 Interesting enough, I installed the Jave EE 5 JDK for windows.  I then
 installed Tomcat 6.0.24, when I navigate to htp://localhost:8080 (which
 should be the default of Tomcat) I am getting the glassfish junk.  How
  
 can I

 remove the glassfish?  I don't believe that there is an option to not
 install glassfish.  Any help would be greatly appreciated.

 - Josh

  
 Drop Java EE 5 and install a current version of the java SDK.

 --David

 -
 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


  

RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread André Warnier

Hi.

I have a problem at tbe border between Apache httpd's mod_rewrite and the mod_jk 
Apache/Tomcat connector.


Versions are :
Apache httpd 2.2.3
mod_jk 1.2.18
OS : Linux Debian  2.6.18-6-686 #1 SMP Thu May 8 07:34:27 UTC 2008 i686 
GNU/Linux

(Not the latests versions, I know, but that's what that system has and the problem may not 
be version-linked, and there is something sweet about packages which just install/upgrade 
with apt-get)


The request URL I am using is
http://hostname/jsp/search.jsp

In the Apache httpd config, is the following RewriteRule :

RewriteCond %{REQUEST_URI} ^/jsp/(.*)$
RewriteRule ^/jsp/ /mir/%1 [PT]

OR, more simply (but with the same result at the end) :

RewriteRule ^/jsp/(.*)$ /mir/$1 [PT]

plus a Location section as follows :

Location /mir
  SetHandler jakarta-servlet
/Location

(OR the following, to the same end-effect also :
  JkMount /mir ajp13
  JkMount /mir/* ajp13
)


The above rewrite rule should rewrite /jsp/search.jsp to /mir/search.jsp
and it does, as per the mod_rewrite log :

[rid#8c06030/initial] (2) init rewrite engine with requested uri /jsp/search.jsp
[rid#8c06030/initial] (2) rewrite '/jsp/search.jsp' - '/mir/search.jsp'
[rid#8c06030/initial] (2) forcing '/mir/search.jsp' to get passed through to next API 
URI-to-filename handler


But then, in the mod_jk log, I see this :

...
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] map_uri_to_worker::jk_uri_worker_map.c 
(508): Attempting to map URI '/mir/search.jsp' from 2 maps
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] map_uri_to_worker::jk_uri_worker_map.c 
(520): Attempting to map context URI '/mir/*'
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] map_uri_to_worker::jk_uri_worker_map.c 
(534): Found a wildchar match ajp13 - /mir/*
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] jk_handler::mod_jk.c (1832): Into handler 
jakarta-servlet worker=ajp13 r-proxyreq=0
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] wc_get_worker_for_name::jk_worker.c (111): 
found a worker ajp13
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] init_ws_service::mod_jk.c (531): Service 
protocol=HTTP/1.1 method=GET host=(null) addrr=84.158.163.2 name=(hostname) port=80 
auth=(null) user=(null) laddr=192.168.245.20 raddr=84.158.163.2
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] ajp_get_endpoint::jk_ajp_common.c (2172): 
acquired connection pool slot=0
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] ajp_marshal_into_msgb::jk_ajp_common.c 
(566): ajp marshaling done
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] ajp_service::jk_ajp_common.c (1706): 
processing ajp13 with 2 retries
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] 
ajp_connection_tcp_send_message::jk_ajp_common.c (909): sending to ajp13 pos=4 len=424 
max=8192
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] 
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 12 34 01 A4 02 02 00 08 48 
54 54 50 2F 31 2E 31  - .4..HTTP/1.1
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] 
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 001000 00 0F 2F 6A 73 70 2F 73 
65 61 72 63 68 2E 6A  - .../jsp/search.j
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] 
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 002073 70 00 00 0C 38 34 2E 31 
35 38 2E 31 36 33 2E  - sp...84.158.163.
[Tue Jun 15 11:26:15 2010] [9170:30400] [debug] 
ajp_connection_tcp_send_message::jk_ajp_common.c (909): 003032 00 FF FF 00 17 6D 69 72 
2E 64 65 76 2E 77 69  - 2.mir.dev.wi

...

In other words, it appears to receive the URI /mir/search.jsp, try to map it to a 
worker, succeed, but then forwarding the request to Tomcat as /jsp/search.jsp anyway 
(which was the original URL, not the rewritten one).
This /jsp/search.jsp is indeed not found by Tomcat (because in Tomcat it is 
/mir/search.jsp), and I receive in return a 404 error page from Tomcat.


I have tried umpteen variations for the mapping and the rewrite rule, without 
success.

What am I doing wrong ?
Or, was this a bug in mod_jk 1.2.18, since corrected ?
(But I find nothing that appears relevant in the Changes log at 
http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html)


Thanks




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



Re: Session clustering across different contexts

2010-06-15 Thread Jon Brisbin

On Jun 15, 2010, at 1:32 AM, Mark Thomas wrote:

 On 15/06/2010 06:21, Andrew Bruno wrote:
 I am testing this on my laptop, windows 7 64bit, tomcat 6
 
 If I use the same contexts, i.e.
 
 localhost:8181/r2 and localhost:8080/r2 the sessions are replicated
 across them no problem.
 
 If I use a different context, e.g. r3 but same web app deployed, the
 sessions are no replicated, and I get this warning:
 
 org.apache.catalina.ha.session.ClusterSessionListener messageReceived
 WARNING: Context manager doesn't exist:localhost#/r2
 
 Correct. What you are trying to do is not supported. Tomcat has no mechanism 
 to map /r2 in one instance to /r3 in another.

As a shameless plug, the new session manager I wrote (which we're using 
internally in our Tomcat cloud) does this just fine because it doesn't care 
about contexts or IP addresses or anything like that. If the session manager is 
configured to connect to the same exchanges and RabbitMQ server as other Tomcat 
instances, the sessions will be shared.

I'm doing a write-up on it now for tomcatexpert.com 

Code is on GitHub: 
http://github.com/jbrisbin/vcloud/tree/master/session-manager/

Downside is it requires another component (RabbitMQ).


Jon Brisbin
Portal Webmaster
NPC International, Inc.


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



Active Directory authentication

2010-06-15 Thread Jill Han
  

Hi,

I tried to configure tomcat to authenticate against active directory.
Here is the relevant part in server.xml

 

Realm className=org.apache.catalina.realm.JNDIRealm

  debug=99

  connectionName=ad...@tst.mycollege.edu

  connectionPassword=adminpassword

  connectionURL=ldap://tst.mycollege.edu:389;

  userBase=DC=tst,DC=mycollege,DC=edu

  userSearch=(sAMAccountName={0})

  userRoleName=memberof

  roleBase=DC=tst,DC=mycollege,DC=edu

  roleName=cn

  roleSearch=(uniqueMember={0})

  userSubtree=true

  roleSubtree=false

  /

In the web.xml

...

security-constraint

.

auth-constraint

  role-nameOU=EMP,dc=tst,DC=mycollege,DC=edu/role-name

/auth-constraint

  /security-constraint

 

  login-config

auth-methodBASIC/auth-method

realm-nameNEWS/realm-name

  /login-config

 

  security-role

role-nameOU=EMP,dc=tst,DC=mycollege,DC=edu/role-name

  /security-role

...

The login window will prompt when you access the site, however no
login/password will be accepted, in the log file,

 

Jun 15, 2010 7:14:53 AM org.apache.catalina.realm.JNDIRealm authenticate

SEVERE: Exception performing authentication

javax.naming.PartialResultException: Unprocessed Continuation
Reference(s); remaining name 'DC=tst,DC=mycollege,DC=edu'

at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2763)

at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)

at
com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumerati
on.java:129)

at
com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeratio
n.java:198)

at
com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.ja
va:171)

at
org.apache.catalina.realm.JNDIRealm.getUserBySearch(JNDIRealm.java:1067)

at
org.apache.catalina.realm.JNDIRealm.getUser(JNDIRealm.java:958)

at
org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:907)

at
org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:808)

at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicA
uthenticator.java:180)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:490)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)

at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)

at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)

at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)

at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
684)

at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.
java:876)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)

at java.lang.Thread.run(Thread.java:595)

I don't know what could go wrong, AD setup on active directory site, or
the properties in the server.xml. 

Thanks for your help as always,

 

Jill



tomcat hibernate wiki

2010-06-15 Thread yuccanel
Please add to the wiki that hibernate dialect must still be set. Wiki says, 
must have NO database configuration properties but just got an exception 
complaining om missing dialect properties


--
From: Mark Eggers its_toas...@yahoo.com
Sent: Monday, June 14, 2010 11:45 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: hibernate not finding global resource datasource defined by 
tomcat


Please read the following for a detailed description on how to configure 
Hibernate to use JNDI resources supplied by Tomcat.


http://wiki.apache.org/tomcat/TomcatHibernate

Then you will need a ResourceLink element in META-INF/context.xml to 
make the resource in GlobalNamingResources available to your 
application.


The configuration for that information can be found here:

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource%20Links

Finally, unless you place Tomcat's manager and admin application's 
authentication and authorization information in your database, removing 
the UserDatabaseRealm from GlobalNamingResources will prevent you from 
using the manager and admin application.


You can place more than one Resource element in the 
GlobalNamingResources element of your server.xml.


I'm trying to finish up a document on DataSourceRealms. Hopefully that 
will get posted on Tomcat's Wiki today or tomorrow, depending on other 
time constraints.


just my two cents . . . . .

/mde/

--- On Mon, 6/14/10, yucca...@live.co.za yucca...@live.co.za wrote:

Hello tomcats!!

Please advise as to why hibernate us unable to find jndi
datasource configured in tomcat?

Trying 2 different setups here:

1) server.xml resource as follows:

GlobalNamingResources

!-- Editable user database that can also be used
by
 UserDatabaseRealm to
authenticate users

--

Resource

name=jdbc/auth
description=The
Jar Bar user authentication

type=javax.sql.DataSource

auth=Container

driverClassName=com.mysql.jdbc.Driver

maxActive=30 maxIdle=10

maxWait=1

password=myPass

url=jdbc:mysql://localhost:3306/yucca123_thejarbar

validationQuery=/* ping */ SELECT
1

username=yucca123_tom/



  /GlobalNamingResources

with hibernate.cfg.xml:
?xml version='1.0'
encoding='utf-8'?
!DOCTYPE hibernate-configuration PUBLIC

-//Hibernate/Hibernate Configuration DTD//EN
  http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
hibernate-configuration

session-factory
property
name=connection.urljdbc:mysql://localhost:3306/yucca123_thejarbar/property

property
name=hibernate.connection.datasourcejava:comp/env/jdbc/auth/property

property
name=connection.driver_classcom.mysql.jdbc.Driver/property

property
name=connection.usernameyucca123_tom/property

property
name=current_session_context_classthread/property

property
name=connection.passwordpookie123/property

mapping
resource=org/bar/jar/model/UserRolesEntity.hbm.xml/

mapping
resource=org/bar/jar/model/UsercommentsEntity.hbm.xml/

mapping
resource=org/bar/jar/model/UsersEntity.hbm.xml/

!-- DB schema will be updated if needed --
!-- 
property name=hbm2ddl.autoupdate/property --


/session-factory
/hibernate-configuration

so I try

2) moving resource and realm element to context.xml with
adding localdatasource attribute to  resource (true) and get same
exception?

What am I missing here?

tomcat is latest 6.0.26
mysql 5 with global connector (inside
common/lib)

Ideally I want the global(server.xml) config for the
resource as it WILL be shared among deployed applications, but because 
this is

first application I am willing to use just contect configured
resource.






-
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



Re: Support multiple apache contexts via one tomcat webapp context

2010-06-15 Thread Hassan Schroeder
On Mon, Jun 14, 2010 at 10:26 PM, Andrew Bruno andrew.br...@gmail.com wrote:
 I am trying to setup Apache with JkMount to tomcat to dynamically
 handle different contexts in Apache, but always use the same context
 in Tomcat.

That statement doesn't make sense to me, given your example, but...

 http://apachefrontenddomain.com.au/a/customer-1.com - jk ajp to -
 http://tomcatserver:8009/webapp
 http://apachefrontenddomain.com.au/a/customer-2.com - jk ajp to -
 http://tomcatserver:8009/webapp
 http://apachefrontenddomain.com.au/a/customer-3.com - jk ajp to -
 http://tomcatserver:8019/webapp2
 http://apachefrontenddomain.com.au/a/customer-4.com - jk ajp to -
 http://tomcatserver:8039/webapp4

 Doe anyone know how to do this?  Do I need to use Aliasing or Rewriting?

I would just use mod_proxy, but I'm a keep-it-simple kinda guy :-)

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread Tobias Crefeld
Am Tue, 15 Jun 2010 15:04:01 +0200
schrieb André Warnier a...@ice-sa.com:

 In other words, it appears to receive the URI /mir/search.jsp, try
 to map it to a worker, succeed, but then forwarding the request to
 Tomcat as /jsp/search.jsp anyway (which was the original URL, not
 the rewritten one). This /jsp/search.jsp is indeed not found by
 Tomcat (because in Tomcat it is /mir/search.jsp), and I receive in
 return a 404 error page from Tomcat.

I'm not quite sure whether I have understood your problem but maybe
this additional setting (after JkMount) helps:

  JkOptions +ForwardURIProxy


Gruß,
 Tobias.

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



Re: Support multiple apache contexts via one tomcat webapp context

2010-06-15 Thread Jon Brisbin
below...

On Jun 15, 2010, at 9:06 AM, Hassan Schroeder wrote:

 On Mon, Jun 14, 2010 at 10:26 PM, Andrew Bruno andrew.br...@gmail.com wrote:
 I am trying to setup Apache with JkMount to tomcat to dynamically
 handle different contexts in Apache, but always use the same context
 in Tomcat.
 
 That statement doesn't make sense to me, given your example, but...
 
 http://apachefrontenddomain.com.au/a/customer-1.com - jk ajp to -
 http://tomcatserver:8009/webapp
 http://apachefrontenddomain.com.au/a/customer-2.com - jk ajp to -
 http://tomcatserver:8009/webapp
 http://apachefrontenddomain.com.au/a/customer-3.com - jk ajp to -
 http://tomcatserver:8019/webapp2
 http://apachefrontenddomain.com.au/a/customer-4.com - jk ajp to -
 http://tomcatserver:8039/webapp4
 
 Doe anyone know how to do this?  Do I need to use Aliasing or Rewriting?
 
 I would just use mod_proxy, but I'm a keep-it-simple kinda guy :-)

FWIW- I've moved away from Apache as a proxy entirely. I use HAProxy with ACLs. 
It's more efficient and flexible, IMHO, and the only thing I really need Apache 
for is serving PHP pages.

That said, it seems to me it would simpler to proxy /a and have a servlet 
look at PATH_INFO, then forward to whatever path or context you want.

Jon Brisbin
Portal Webmaster
NPC International, Inc.


 
 FWIW,
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 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



RE: Active Directory authentication

2010-06-15 Thread dB .
I don't know why it doesn't work, but I think this idea is really bad when it 
comes to Windows Active Directory, even if you made it work.


* This won't work for trusted domains.

* This won't work for nested domain groups.

* This won't work for local groups.

* You're hard-coding a domain user password.

* You're asking the user to enter his domain credentials, which forces 
you to run under SSL (instead of doing single-sign-on).

If you are on Windows, you might want to try http://waffle.codeplex.com 
instead, it's a drop-in solution that just works.
dB. @ dblock.orghttp://www.dblock.org/
Moscow|Geneva|Seattle|New York


From: Jill Han [mailto:jill@alverno.edu]
Sent: Tuesday, June 15, 2010 9:26 AM
To: users@tomcat.apache.org
Subject: Active Directory authentication

Hi,
I tried to configure tomcat to authenticate against active directory. Here is 
the relevant part in server.xml

Realm className=org.apache.catalina.realm.JNDIRealm
  debug=99
  connectionName=ad...@tst.mycollege.edu
  connectionPassword=adminpassword
  connectionURL=ldap://tst.mycollege.edu:389;
  userBase=DC=tst,DC=mycollege,DC=edu
  userSearch=(sAMAccountName={0})
  userRoleName=memberof
  roleBase=DC=tst,DC=mycollege,DC=edu
  roleName=cn
  roleSearch=(uniqueMember={0})
  userSubtree=true
  roleSubtree=false
  /
In the web.xml
...
security-constraint
.
auth-constraint
  role-nameOU=EMP,dc=tst,DC=mycollege,DC=edu/role-name
/auth-constraint
  /security-constraint

  login-config
auth-methodBASIC/auth-method
realm-nameNEWS/realm-name
  /login-config

  security-role
role-nameOU=EMP,dc=tst,DC=mycollege,DC=edu/role-name
  /security-role
...
The login window will prompt when you access the site, however no 
login/password will be accepted, in the log file,

Jun 15, 2010 7:14:53 AM org.apache.catalina.realm.JNDIRealm authenticate
SEVERE: Exception performing authentication
javax.naming.PartialResultException: Unprocessed Continuation Reference(s); 
remaining name 'DC=tst,DC=mycollege,DC=edu'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2763)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)
at 
com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:129)
at 
com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:198)
at 
com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:171)
at 
org.apache.catalina.realm.JNDIRealm.getUserBySearch(JNDIRealm.java:1067)
at org.apache.catalina.realm.JNDIRealm.getUser(JNDIRealm.java:958)
at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:907)
at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:808)
at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
I don't know what could go wrong, AD setup on active directory site, or the 
properties in the server.xml.
Thanks for your help as always,

Jill


Tomcat 5.0/6.0, jasper2, log4j and Ant

2010-06-15 Thread Olivier DOREMIEUX

Hello,

How to propagate variables to the jasper2 task in ANT?

I have log4.properties with a variable, with define the path where the 
log file are located.
My variable is visible inside of ant, but doesn't get propagated with 
jasper2, they are empty.
Is there something equivalent to  sysproperty key=MY_VAR 
value=myPath/  for jasper2?


Any work around?

Thanks in advance,

Olivier DOREMIEUX


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



adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread jbuy
Hi,
Im using apache tomcat 6.0.18, and have configured it successfully with IIS7.  
I am able to view the Tomcat examples through both localhost and 
localhost:8080. I am also able to view servlets that I have deployed into the 
tomcat webapps folder through localhost and localhost:8080.  This is all under 
the Default Web Site of IIS7.
I'm having trouble viewing servlets i've made through an existing website?
I've tried adding a virtual directory to my website, like I did for Default 
web site to my tomcat conf directory, and added the according ISAPI 
redirectors. All i get is a 404 file not found error.
If i make a html file, say test.html, inside the \conf folder, i can get to 
it through:
 http://my website address/virtual directory name/test.html
I'm not sure if im going about this properly, or if iis is having trouble 
accessing the redirector.
How do i go about doing this?
any help is greatly appreciated,
thanks,
JB



Re: RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread Rainer Jung

On 15.06.2010 16:13, Tobias Crefeld wrote:

Am Tue, 15 Jun 2010 15:04:01 +0200
schrieb André Warniera...@ice-sa.com:


In other words, it appears to receive the URI /mir/search.jsp, try
to map it to a worker, succeed, but then forwarding the request to
Tomcat as /jsp/search.jsp anyway (which was the original URL, not
the rewritten one). This /jsp/search.jsp is indeed not found by
Tomcat (because in Tomcat it is /mir/search.jsp), and I receive in
return a 404 error page from Tomcat.


I'm not quite sure whether I have understood your problem but maybe
this additional setting (after JkMount) helps:

   JkOptions +ForwardURIProxy


Right, the Forward* JkOptions are the key here. There have been various 
attempts during the lifetime of mod_jk to try getting this right, so 
there are various possible options. Finally because of security 
problems, ForwardURIProxy was introduced in 1.2.24 and made the new default.


http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding

explains the options and also the limitations with respect to 
mod_rewrite. There's also a short note at


http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Encoding

It is possible, that you have explicitely configure 
ForwardURICompatUnparsed, i.e. please forward the original URI without 
any interpretation, decoding etc. Since decoding cannot be undone, this 
means any rewriting by mod_rewrite is not respected. This option was 
only default at the exact version 1.2.23 but it existed as an option in 
1.2.18.


Regards,

Rainer

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



The requested resource () is not available. index.html

2010-06-15 Thread faciolo

hi all, i'm a newbie with tomcat.
i've istalled tomcat on my windows xp of my work station and all is going
right.
i've tried to install it also at home, on a windows 7.
when i try to access my project home at localhost:8080/myApp/ or
localhost:8080/myApp/index.html i get this message:

HTTP Status 404 -  type Status report  message  description The requested
resource () is not available. Apache Tomcat/6.0.26

but if i ask for localhost:8080/ the home page of tomcat is correctly found.

can someone help me?

why i can't get my index.html? this is not a jsp...why i can't access a
static page?
-- 
View this message in context: 
http://old.nabble.com/%22The-requested-resource-%28%29-is-not-available.%22-index.html-tp28893830p28893830.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: hibernate not finding global resource datasource defined by tomcat

2010-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yucca Nel,

On 6/15/2010 1:23 AM, yucca...@live.co.za wrote:
 --
 From: Christopher Schultz ch...@christopherschultz.net
 Subject: Re: hibernate not finding global resource datasource defined by
 tomcat

 Maybe you need a resource-ref element in your web.xml?
 
 Can you explain?

No, but you can read.

http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html

Search for resource-ref.

 Tomcat 6 doesn't have a common/lib by default. Did you add that?
 
 No I was merely referring to the fact that I included driver in the lib
 directory of server

Okay, it's confusing to say you put it in common/lib when there's no
common/lib. Precision matters when you're trying to get things working.

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

iEYEARECAAYFAkwXsfUACgkQ9CaO5/Lv0PBesACdEKAqcQCTImUYiSmFgD3q2bW7
/ukAniXd3whUB11sa2M26vcO0d+ne3Ot
=SzZZ
-END PGP SIGNATURE-

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



Re: how to calculate a memory tomcat

2010-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matt,

On 6/14/2010 6:42 PM, Matthew Peterson wrote:
 Lambda Probe is stale. It has been forked to Psi Probe which has regular 
 activity: http://code.google.com/p/psi-probe/

Is Lambda Probe stale?

It may not have gotten any updates for a while, but is it really lacking
anything?

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

iEYEARECAAYFAkwXskIACgkQ9CaO5/Lv0PCH1ACfQByPb9MOuaHz0Ia5asvXm5Kb
2IAAoK/vXmq6pGUuFHV1VbSICAspz0In
=9Rij
-END PGP SIGNATURE-

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



Re: The requested resource () is not available. index.html

2010-06-15 Thread Pid
On 15/06/2010 17:58, faciolo wrote:
 
 hi all, i'm a newbie with tomcat.
 i've istalled tomcat on my windows xp of my work station and all is going
 right.
 i've tried to install it also at home, on a windows 7.
 when i try to access my project home at localhost:8080/myApp/ or
 localhost:8080/myApp/index.html i get this message:
 
 HTTP Status 404 -  type Status report  message  description The requested
 resource () is not available. Apache Tomcat/6.0.26
 
 but if i ask for localhost:8080/ the home page of tomcat is correctly found.
 
 can someone help me?
 
 why i can't get my index.html? this is not a jsp...why i can't access a
 static page?

Where have you deployed myApp?

What configuration have you changed?

What is in your app's web.xml file?


p



signature.asc
Description: OpenPGP digital signature


Re: The requested resource () is not available. index.html

2010-06-15 Thread Hassan Schroeder
On Tue, Jun 15, 2010 at 9:58 AM, faciolo lucor...@gmail.com wrote:

 when i try to access my project home at localhost:8080/myApp/ or
 localhost:8080/myApp/index.html i get this message:

 HTTP Status 404 -  type Status report  message  description The requested
 resource () is not available. Apache Tomcat/6.0.26

 but if i ask for localhost:8080/ the home page of tomcat is correctly found.

 why i can't get my index.html? this is not a jsp...why i can't access a
 static page?

Because your app isn't configured properly? :-)

Have you looked at your logs?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread Pid
On 15/06/2010 16:04, j...@rogers.com wrote:
 Hi,
 Im using apache tomcat 6.0.18, and have configured it successfully with IIS7. 
  I am able to view the Tomcat examples through both localhost and 
 localhost:8080. I am also able to view servlets that I have deployed into the 
 tomcat webapps folder through localhost and localhost:8080.  This is all 
 under the Default Web Site of IIS7.
 I'm having trouble viewing servlets i've made through an existing website?
 I've tried adding a virtual directory to my website, like I did for Default 
 web site to my tomcat conf directory, and added the according ISAPI 
 redirectors. All i get is a 404 file not found error.
 If i make a html file, say test.html, inside the \conf folder, i can get to 
 it through:
  http://my website address/virtual directory name/test.html

That sounds wrong tomcat/conf is not a directory that should be
published.  (It would be a security risk)

I'd undo that and start over.

What is it that you're trying to achieve?


p

 I'm not sure if im going about this properly, or if iis is having trouble 
 accessing the redirector.
 How do i go about doing this?
 any help is greatly appreciated,
 thanks,
 JB
 
 




signature.asc
Description: OpenPGP digital signature


Re: how to calculate a memory tomcat

2010-06-15 Thread Hassan Schroeder
On Tue, Jun 15, 2010 at 10:02 AM, Christopher Schultz
ch...@christopherschultz.net wrote:

 On 6/14/2010 6:42 PM, Matthew Peterson wrote:
 Lambda Probe is stale.

 It may not have gotten any updates for a while, but is it really lacking
 anything?

+1 -- it's running on all my deployed instances right now, and doing a
fine job of supplying the information I need...

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: tomcat hibernate wiki

2010-06-15 Thread Mark Eggers
I've added a sentence clarifying that, saying that you still need the dialect 
property.

--- On Tue, 6/15/10, yucca...@live.co.za yucca...@live.co.za wrote:


 Please add to the wiki that hibernate
 dialect must still be set. Wiki says, 
 must have NO database configuration properties but just got
 an exception 
 complaining om missing dialect properties



  


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



Re: tomcat hibernate wiki

2010-06-15 Thread yuccanel
Much appreciated, Very nice wiki that got me up and running apart from some 
odd exception (does not happen in development only production)



root cause

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


org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)

org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)

org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)

org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
$Proxy0.beginTransaction(Unknown Source)

org.bar.jar.view.validators.EmailExistsValidator.validate(EmailExistsValidator.java:28)
javax.faces.component.UIInput.validateValue(UIInput.java:1019)
javax.faces.component.UIInput.validate(UIInput.java:875)
javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
javax.faces.component.UIInput.processValidators(UIInput.java:672)

javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
javax.faces.component.UIForm.processValidators(UIForm.java:235)

javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:700)

com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)

root cause

java.lang.NullPointerException
sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
java.sql.DriverManager.getDriver(DriverManager.java:253)

org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)

org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)

org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)

org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
$Proxy0.beginTransaction(Unknown Source)

org.bar.jar.view.validators.EmailExistsValidator.validate(EmailExistsValidator.java:28)
javax.faces.component.UIInput.validateValue(UIInput.java:1019)
javax.faces.component.UIInput.validate(UIInput.java:875)
javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
javax.faces.component.UIInput.processValidators(UIInput.java:672)

javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
javax.faces.component.UIForm.processValidators(UIForm.java:235)

javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:700)

com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

Re: The requested resource () is not available. index.html

2010-06-15 Thread faciolo



 
 Where have you deployed myApp?
 
 What configuration have you changed?
 
 What is in your app's web.xml file?
 
 
 p
 
 


my application is named MediciRiuniti
it is in C:\Tomcat 6.0\webapps\ROOT\
if i search for localhosot:8081/ i can get tomcat home


i've changed only the port of tomcat, i set it on 8081


in my C:\Tomcat 6.0\webapps\ROOT\MediciRiuniti\WEB-INF\web.xml is written
this:

?xml version=1.0 encoding=UTF-8 ?  
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

display-nameMediciRiuniti Application/display-name
descriptionApplicazione/description

servlet
servlet-nameEventController/servlet-name
servlet-classmediciRiuniti.web.EventController/servlet-class
/servlet

servlet-mapping
servlet-nameEventController/servlet-name
url-pattern/controller/url-pattern
/servlet-mapping

welcome-file-list
welcome-fileindex.html/welcome-file 
/welcome-file-list

/web-app


if i build my project i can see the compiled class in WEB-INF/src/classes

thank you

--

faciolo

-- 
View this message in context: 
http://old.nabble.com/%22The-requested-resource-%28%29-is-not-available.%22-index.html-tp28893830p28894187.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: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread jbuy
hi,
thanks for the response
what im trying to do is host a servlet i've made onto my website
i packed it into a WAR file, then deployed it into Tomcat webapps, where i am 
able to access it through localhost:8080
then i configured iis to work with tomcat. after following various tutorials on 
how to configure the isapi redirector 
(http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and 
http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got eveyrthing 
working for localhost:8080, the default website
my servlet works under: 
http://localhost/servletname
and also works for the supplied tomcat examples in:
http://localhost/examples/servlets/
I tried following the same steps for my own website, as i did for the Default 
Website.
When i try to access the page i get 404 file not found errors
btw, tomcat/conf is where i have the isapi_redirector.dll, and also the 
various properties files.
thanks
JB

--- On Tue, 6/15/10, Pid p...@pidster.com wrote:

From: Pid p...@pidster.com
Subject: Re: adding servlet to existing website through iis7 and tomcat6
To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 1:10 PM

On 15/06/2010 16:04, j...@rogers.com wrote:
 Hi,
 Im using apache tomcat 6.0.18, and have configured it successfully with 
 IIS7.  I am able to view the Tomcat examples through both localhost and 
 localhost:8080. I am also able to view servlets that I have deployed into the 
 tomcat webapps folder through localhost and localhost:8080.  This is all 
 under the Default Web Site of IIS7.
 I'm having trouble viewing servlets i've made through an existing website?
 I've tried adding a virtual directory to my website, like I did for Default 
 web site to my tomcat conf directory, and added the according ISAPI 
 redirectors. All i get is a 404 file not found error.
 If i make a html file, say test.html, inside the \conf folder, i can get to 
 it through:
  http://my website address/virtual directory name/test.html

That sounds wrong tomcat/conf is not a directory that should be
published.  (It would be a security risk)

I'd undo that and start over.

What is it that you're trying to achieve?


p

 I'm not sure if im going about this properly, or if iis is having trouble 
 accessing the redirector.
 How do i go about doing this?
 any help is greatly appreciated,
 thanks,
 JB
 
 




Re: The requested resource () is not available. index.html

2010-06-15 Thread faciolo



Hassan Schroeder-2 wrote:
 
 
 Because your app isn't configured properly? :-)
 
 Have you looked at your logs?
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

so if my app isn't properly configured i can't get also static pages?


in my catalina.log i can read these lines:

AVVERTENZA: A docBase C:\Tomcat 6.0\webapps\ROOT\MediciRiuniti inside the
host appBase has been specified, and will be ignored
...
GRAVE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Tomcat
6.0\webapps\MediciRiuniti does not exist or is not a readable directory
...
GRAVE: Error in resourceStart()
...
GRAVE: Error getConfigured
...
GRAVE: Context [/MediciRiuniti] startup failed due to previous errors
...
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MediciRiuniti]
has not been started
...

that means that my apps doesn't start because tomcat can't access the
directory?
but i've give all privileges to everybody on my appBase...
and what does it means
A docBase C:\Tomcat 6.0\webapps\ROOT\MediciRiuniti inside the host appBase
has been specified, and will be ignored?

thanks

--

faciolo
-- 
View this message in context: 
http://old.nabble.com/%22The-requested-resource-%28%29-is-not-available.%22-index.html-tp28893830p28894236.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: The requested resource () is not available. index.html

2010-06-15 Thread Pid
On 15/06/2010 18:28, faciolo wrote:
 
 
 

 Where have you deployed myApp?

 What configuration have you changed?

 What is in your app's web.xml file?


 p


 
 
 my application is named MediciRiuniti
 it is in C:\Tomcat 6.0\webapps\ROOT\
 if i search for localhosot:8081/ i can get tomcat home

Don't put it inside ROOT.

Put it in webapps.


p

 i've changed only the port of tomcat, i set it on 8081
 
 
 in my C:\Tomcat 6.0\webapps\ROOT\MediciRiuniti\WEB-INF\web.xml is written
 this:
 
 ?xml version=1.0 encoding=UTF-8 ?  
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4
 
 display-nameMediciRiuniti Application/display-name
 descriptionApplicazione/description
 
 servlet
 servlet-nameEventController/servlet-name
 servlet-classmediciRiuniti.web.EventController/servlet-class
 /servlet
 
 servlet-mapping
 servlet-nameEventController/servlet-name
 url-pattern/controller/url-pattern
 /servlet-mapping
 
 welcome-file-list
 welcome-fileindex.html/welcome-file 
 /welcome-file-list
 
 /web-app
 
 
 if i build my project i can see the compiled class in WEB-INF/src/classes
 
 thank you
 
 --
 
 faciolo
 




signature.asc
Description: OpenPGP digital signature


Re: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread Pid
On 15/06/2010 18:29, j...@rogers.com wrote:
 hi,
 thanks for the response
 what im trying to do is host a servlet i've made onto my website
 i packed it into a WAR file, then deployed it into Tomcat webapps, where
 i am able to access it through localhost:8080
 then i configured iis to work with tomcat. after following various
 tutorials on how to configure the isapi redirector
 (http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and

You're using Tomcat 3.3?  I thought you said you were using 6.0?

Try:

 http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

 http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got eveyrthing
 working for localhost:8080, the default website
 my servlet works under:
 http://localhost/servletname
 and also works for the supplied tomcat examples in:
 http://localhost/examples/servlets/
 I tried following the same steps for my own website, as i did for the
 Default Website.
 When i try to access the page i get 404 file not found errors
 btw, tomcat/conf is where i have the isapi_redirector.dll, and also
 the various properties files.

If i make a html file, say test.html, inside the \conf folder, i can
get to it through:
 http://my website address/virtual directory name/test.html

So is the file test.html in tomcat/conf or somewhere else?

If somewhere else, where is it?


p


 thanks
 JB
 
 --- On *Tue, 6/15/10, Pid /p...@pidster.com/* wrote:
 
 
 From: Pid p...@pidster.com
 Subject: Re: adding servlet to existing website through iis7 and tomcat6
 To: Tomcat Users List users@tomcat.apache.org
 Date: Tuesday, June 15, 2010, 1:10 PM
 
 On 15/06/2010 16:04, j...@rogers.com
 /mc/compose?to=j...@rogers.com wrote:
  Hi,
  Im using apache tomcat 6.0.18, and have configured it successfully
 with IIS7.  I am able to view the Tomcat examples through both
 localhost and localhost:8080. I am also able to view servlets that I
 have deployed into the tomcat webapps folder through localhost and
 localhost:8080.  This is all under the Default Web Site of IIS7.
  I'm having trouble viewing servlets i've made through an existing
 website?
  I've tried adding a virtual directory to my website, like I did
 for Default web site to my tomcat conf directory, and added the
 according ISAPI redirectors. All i get is a 404 file not found error.
  If i make a html file, say test.html, inside the \conf folder, i
 can get to it through:
   http://my website address/virtual directory name/test.html
 
 That sounds wrong tomcat/conf is not a directory that should be
 published.  (It would be a security risk)
 
 I'd undo that and start over.
 
 What is it that you're trying to achieve?
 
 
 p
 
  I'm not sure if im going about this properly, or if iis is having
 trouble accessing the redirector.
  How do i go about doing this?
  any help is greatly appreciated,
  thanks,
  JB
 
 
 
 




signature.asc
Description: OpenPGP digital signature


Re: The requested resource () is not available. index.html

2010-06-15 Thread Hassan Schroeder
On Tue, Jun 15, 2010 at 10:33 AM, faciolo lucor...@gmail.com wrote:

 so if my app isn't properly configured i can't get also static pages?

Yep :-)

 in my catalina.log i can read these lines:

All of which should be strong clues there's something seriously wrong...

 GRAVE: Context [/MediciRiuniti] startup failed due to previous errors

and especially that one.

 and what does it means
 A docBase C:\Tomcat 6.0\webapps\ROOT\MediciRiuniti inside the host appBase
 has been specified, and will be ignored?

You can't nest contexts. Read the documentation on appBase and
docBase. Or do as Pid says :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread Martin Gainty

suppressing username/passowrds can you display contents of 

conf/auto/iis_redirect.reg

conf/auto/uriworkermap.properties

conf/auto/isapi_redirect.properties.


?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

 Date: Tue, 15 Jun 2010 10:29:13 -0700
 From: j...@rogers.com
 Subject: Re: adding servlet to existing website through iis7 and tomcat6
 To: users@tomcat.apache.org; p...@pidster.com
 
 hi,
 thanks for the response
 what im trying to do is host a servlet i've made onto my website
 i packed it into a WAR file, then deployed it into Tomcat webapps, where i am 
 able to access it through localhost:8080
 then i configured iis to work with tomcat. after following various tutorials 
 on how to configure the isapi redirector 
 (http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and 
 http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got eveyrthing 
 working for localhost:8080, the default website
 my servlet works under: 
 http://localhost/servletname
 and also works for the supplied tomcat examples in:
 http://localhost/examples/servlets/
 I tried following the same steps for my own website, as i did for the Default 
 Website.
 When i try to access the page i get 404 file not found errors
 btw, tomcat/conf is where i have the isapi_redirector.dll, and also the 
 various properties files.
 thanks
 JB
 
 --- On Tue, 6/15/10, Pid p...@pidster.com wrote:
 
 From: Pid p...@pidster.com
 Subject: Re: adding servlet to existing website through iis7 and tomcat6
 To: Tomcat Users List users@tomcat.apache.org
 Date: Tuesday, June 15, 2010, 1:10 PM
 
 On 15/06/2010 16:04, j...@rogers.com wrote:
  Hi,
  Im using apache tomcat 6.0.18, and have configured it successfully with 
  IIS7.  I am able to view the Tomcat examples through both localhost and 
  localhost:8080. I am also able to view servlets that I have deployed into 
  the tomcat webapps folder through localhost and localhost:8080.  This is 
  all under the Default Web Site of IIS7.
  I'm having trouble viewing servlets i've made through an existing website?
  I've tried adding a virtual directory to my website, like I did for 
  Default web site to my tomcat conf directory, and added the according 
  ISAPI redirectors. All i get is a 404 file not found error.
  If i make a html file, say test.html, inside the \conf folder, i can get 
  to it through:
   http://my website address/virtual directory name/test.html
 
 That sounds wrong tomcat/conf is not a directory that should be
 published.  (It would be a security risk)
 
 I'd undo that and start over.
 
 What is it that you're trying to achieve?
 
 
 p
 
  I'm not sure if im going about this properly, or if iis is having trouble 
  accessing the redirector.
  How do i go about doing this?
  any help is greatly appreciated,
  thanks,
  JB
  
  
 
 
  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Re: The requested resource () is not available. index.html

2010-06-15 Thread faciolo



Pid * wrote:
 
 On 15/06/2010 18:28, faciolo wrote:
 
 
 

 Where have you deployed myApp?

 What configuration have you changed?

 What is in your app's web.xml file?


 p


 
 
 my application is named MediciRiuniti
 it is in C:\Tomcat 6.0\webapps\ROOT\
 if i search for localhosot:8081/ i can get tomcat home
 
 Don't put it inside ROOT.
 
 Put it in webapps.
 
 
 p
 
 

owned! XD
thank you very much, i've wasted a lot of time with this thing (stupid, i
know, sorry)

--

faciolo
-- 
View this message in context: 
http://old.nabble.com/%22The-requested-resource-%28%29-is-not-available.%22-index.html-tp28893830p28894398.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: The requested resource () is not available. index.html

2010-06-15 Thread faciolo



Hassan Schroeder-2 wrote:
 
 On Tue, Jun 15, 2010 at 10:33 AM, faciolo lucor...@gmail.com wrote:
 
 so if my app isn't properly configured i can't get also static pages?
 
 Yep :-)
 
 in my catalina.log i can read these lines:
 
 All of which should be strong clues there's something seriously wrong...
 
 GRAVE: Context [/MediciRiuniti] startup failed due to previous errors
 
 and especially that one.
 
 and what does it means
 A docBase C:\Tomcat 6.0\webapps\ROOT\MediciRiuniti inside the host
 appBase
 has been specified, and will be ignored?
 
 You can't nest contexts. Read the documentation on appBase and
 docBase. Or do as Pid says :-)
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

ahahah sorry for my spam! XD
thanks to you also Hassan Schroeder :)

--

faciolo

-- 
View this message in context: 
http://old.nabble.com/%22The-requested-resource-%28%29-is-not-available.%22-index.html-tp28893830p28894410.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: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread jbuy
hi
sorry, yeah that was the apache tomcat connector page i was using, and i am 
using iis7
test.html file is in tomcat\conf, it is where the redirector dll is and it is 
where i have pointed my virtual directory.
all i have in test.html is a simple hello in the body
JB

--- On Tue, 6/15/10, Pid p...@pidster.com wrote:

From: Pid p...@pidster.com
Subject: Re: adding servlet to existing website through iis7 and tomcat6
To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 1:45 PM

On 15/06/2010 18:29, j...@rogers.com wrote:
 hi,
 thanks for the response
 what im trying to do is host a servlet i've made onto my website
 i packed it into a WAR file, then deployed it into Tomcat webapps, where
 i am able to access it through localhost:8080
 then i configured iis to work with tomcat. after following various
 tutorials on how to configure the isapi redirector
 (http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and

You're using Tomcat 3.3?  I thought you said you were using 6.0?

Try:

 http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

 http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got eveyrthing
 working for localhost:8080, the default website
 my servlet works under:
 http://localhost/servletname
 and also works for the supplied tomcat examples in:
 http://localhost/examples/servlets/
 I tried following the same steps for my own website, as i did for the
 Default Website.
 When i try to access the page i get 404 file not found errors
 btw, tomcat/conf is where i have the isapi_redirector.dll, and also
 the various properties files.

If i make a html file, say test.html, inside the \conf folder, i can
get to it through:
 http://my website address/virtual directory name/test.html

So is the file test.html in tomcat/conf or somewhere else?

If somewhere else, where is it?


p


 thanks
 JB
 
 --- On *Tue, 6/15/10, Pid /p...@pidster.com/* wrote:
 
 
     From: Pid p...@pidster.com
     Subject: Re: adding servlet to existing website through iis7 and tomcat6
     To: Tomcat Users List users@tomcat.apache.org
     Date: Tuesday, June 15, 2010, 1:10 PM
 
     On 15/06/2010 16:04, j...@rogers.com
     /mc/compose?to=j...@rogers.com wrote:
      Hi,
      Im using apache tomcat 6.0.18, and have configured it successfully
     with IIS7.  I am able to view the Tomcat examples through both
     localhost and localhost:8080. I am also able to view servlets that I
     have deployed into the tomcat webapps folder through localhost and
     localhost:8080.  This is all under the Default Web Site of IIS7.
      I'm having trouble viewing servlets i've made through an existing
     website?
      I've tried adding a virtual directory to my website, like I did
     for Default web site to my tomcat conf directory, and added the
     according ISAPI redirectors. All i get is a 404 file not found error.
      If i make a html file, say test.html, inside the \conf folder, i
     can get to it through:
   http://my website address/virtual directory name/test.html
 
     That sounds wrong tomcat/conf is not a directory that should be
     published.  (It would be a security risk)
 
     I'd undo that and start over.
 
     What is it that you're trying to achieve?
 
 
     p
 
      I'm not sure if im going about this properly, or if iis is having
     trouble accessing the redirector.
      How do i go about doing this?
      any help is greatly appreciated,
      thanks,
      JB
     
     
 
 




Re: RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread André Warnier

Rainer Jung wrote:

On 15.06.2010 16:13, Tobias Crefeld wrote:

Am Tue, 15 Jun 2010 15:04:01 +0200
schrieb André Warniera...@ice-sa.com:


In other words, it appears to receive the URI /mir/search.jsp, try
to map it to a worker, succeed, but then forwarding the request to
Tomcat as /jsp/search.jsp anyway (which was the original URL, not
the rewritten one). This /jsp/search.jsp is indeed not found by
Tomcat (because in Tomcat it is /mir/search.jsp), and I receive in
return a 404 error page from Tomcat.


I'm not quite sure whether I have understood your problem but maybe
this additional setting (after JkMount) helps:

   JkOptions +ForwardURIProxy


Right, the Forward* JkOptions are the key here. There have been various 
attempts during the lifetime of mod_jk to try getting this right, so 
there are various possible options. Finally because of security 
problems, ForwardURIProxy was introduced in 1.2.24 and made the new 
default.


http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding

explains the options and also the limitations with respect to 
mod_rewrite. There's also a short note at


http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Encoding 



It is possible, that you have explicitely configure 
ForwardURICompatUnparsed, i.e. please forward the original URI without 
any interpretation, decoding etc. Since decoding cannot be undone, this 
means any rewriting by mod_rewrite is not respected. This option was 
only default at the exact version 1.2.23 but it existed as an option in 
1.2.18.



Hi.
Thanks to both for your suggestions and explanations.
The version of mod_jk on that system is 1.2.18, and
I have not any of the JKOptions Forward* configured in my setup, which is just 
this :

JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

Anyway, adding
JkOptions +ForwardURICompat
works !

(which is strange, because the docs says it should be the default before 1.2.22)

Now I'll see if I can get a more recent mod_jk as a Debian package, and else I'll see if I 
can make one myself, so that I can use the latest default ForwardURIProxy.


I also did not understand the reason why in the docs it says This is .. not safe if you 
are using prefix JkMount.

Anyone care to elaborate ?

I am not using prefix JkMount specifically, but I am using
Location /mir
  SetHandler jakarta-servlet
/Location
Does this un-safeness apply in that case also ?




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



RE: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread jbuy
uriworkermap.prioperties:

/rpctodb/*=testWorker
/rpctodb/*servlet.class=testWorker


/examples/*=testWorker
/examples/*.jsp=testWorker
/examples/servlet/*=testWorker

worker.properties:

worker.list=testWorker

worker.testWorker.port=8009
worker.testWorker.host=localhost
worker.testWorker.type=ajp13

isapi_redirect.properties:
extension_uri=/tomcat/isapi_redirect.dll
log_file=C:\tomcat\logs\iis_redirect.log
log_level=debug
worker_file=C:\tomcat\conf\workers.properties
worker_mount_file=C:\Jakarta\conf\uriworkermap.properties

As for my iss_redirect.log file, it isnt altered when i try to reach my servlet 
unsuccessfully through
my website. But it is working properly when i access my servlet through 
http://localhost:80

thanksa lot
JB





--- On Tue, 6/15/10, Martin Gainty mgai...@hotmail.com wrote:

From: Martin Gainty mgai...@hotmail.com
Subject: RE: adding servlet to existing website through iis7 and tomcat6
To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 1:46 PM


suppressing username/passowrds can you display contents of 

conf/auto/iis_redirect.reg

conf/auto/uriworkermap.properties

conf/auto/isapi_redirect.properties.


?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

 Date: Tue, 15 Jun 2010 10:29:13 -0700
 From: j...@rogers.com
 Subject: Re: adding servlet to existing website through iis7 and tomcat6
 To: users@tomcat.apache.org; p...@pidster.com
 
 hi,
 thanks for the response
 what im trying to do is host a servlet i've made onto my website
 i packed it into a WAR file, then deployed it into Tomcat webapps, where i am 
 able to access it through localhost:8080
 then i configured iis to work with tomcat. after following various tutorials 
 on how to configure the isapi redirector 
 (http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and 
 http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got eveyrthing 
 working for localhost:8080, the default website
 my servlet works under: 
 http://localhost/servletname
 and also works for the supplied tomcat examples in:
 http://localhost/examples/servlets/
 I tried following the same steps for my own website, as i did for the Default 
 Website.
 When i try to access the page i get 404 file not found errors
 btw, tomcat/conf is where i have the isapi_redirector.dll, and also the 
 various properties files.
 thanks
 JB
 
 --- On Tue, 6/15/10, Pid p...@pidster.com wrote:
 
 From: Pid p...@pidster.com
 Subject: Re: adding servlet to existing website through iis7 and tomcat6
 To: Tomcat Users List users@tomcat.apache.org
 Date: Tuesday, June 15, 2010, 1:10 PM
 
 On 15/06/2010 16:04, j...@rogers.com wrote:
  Hi,
  Im using apache tomcat 6.0.18, and have configured it successfully with 
  IIS7.  I am able to view the Tomcat examples through both localhost and 
  localhost:8080. I am also able to view servlets that I have deployed into 
  the tomcat webapps folder through localhost and localhost:8080.  This is 
  all under the Default Web Site of IIS7.
  I'm having trouble viewing servlets i've made through an existing website?
  I've tried adding a virtual directory to my website, like I did for 
  Default web site to my tomcat conf directory, and added the according 
  ISAPI redirectors. All i get is a 404 file not found error.
  If i make a html file, say test.html, inside the \conf folder, i can get 
  to it through:
   http://my website address/virtual directory name/test.html
 
 That sounds wrong tomcat/conf is not a directory that should be
 published.  (It would be a security risk)
 
 I'd undo that and start over.
 
 What is it that you're trying to achieve?
 
 
 p
 
  I'm not sure if im going about this properly, or if iis is having trouble 
  accessing the redirector.
  How do i go about doing this?
  any help is greatly appreciated,
  thanks,
  JB
  
  
 
 
               
_
Hotmail has tools for the New Busy. Search, chat and 

Re: tomcat hibernate wiki

2010-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yucca Nel,

On 6/15/2010 1:25 PM, yucca...@live.co.za wrote:
 Much appreciated, Very nice wiki that got me up and running apart from
 some odd exception (does not happen in development only production)
 
 root cause
 
 org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
 driver of class '' for connect URL 'null'

Check the differences in configuration between production and development?

Specifically, check the exact syntax of your Resource element and make
sure that your JDBC library is only in one place: Tomcat's lib directory.

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

iEYEARECAAYFAkwXww0ACgkQ9CaO5/Lv0PAkSwCffXrqITTWwKuMx7x8s9o4TsYQ
jQQAniqmbQRx5I+1aeAgVo3P6/fPnBa+
=foni
-END PGP SIGNATURE-

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



Re: RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread Rainer Jung



On 15.06.2010 20:08, André Warnier wrote:

Rainer Jung wrote:

On 15.06.2010 16:13, Tobias Crefeld wrote:

Am Tue, 15 Jun 2010 15:04:01 +0200
schrieb André Warniera...@ice-sa.com:


In other words, it appears to receive the URI /mir/search.jsp, try
to map it to a worker, succeed, but then forwarding the request to
Tomcat as /jsp/search.jsp anyway (which was the original URL, not
the rewritten one). This /jsp/search.jsp is indeed not found by
Tomcat (because in Tomcat it is /mir/search.jsp), and I receive in
return a 404 error page from Tomcat.


I'm not quite sure whether I have understood your problem but maybe
this additional setting (after JkMount) helps:

JkOptions +ForwardURIProxy


Right, the Forward* JkOptions are the key here. There have been
various attempts during the lifetime of mod_jk to try getting this
right, so there are various possible options. Finally because of
security problems, ForwardURIProxy was introduced in 1.2.24 and made
the new default.

http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding

explains the options and also the limitations with respect to
mod_rewrite. There's also a short note at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Encoding


It is possible, that you have explicitely configure
ForwardURICompatUnparsed, i.e. please forward the original URI without
any interpretation, decoding etc. Since decoding cannot be undone,
this means any rewriting by mod_rewrite is not respected. This option
was only default at the exact version 1.2.23 but it existed as an
option in 1.2.18.


Hi.
Thanks to both for your suggestions and explanations.
The version of mod_jk on that system is 1.2.18, and
I have not any of the JKOptions Forward* configured in my setup, which
is just this :

JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

Anyway, adding
JkOptions +ForwardURICompat
works !

(which is strange, because the docs says it should be the default before
1.2.22)

Now I'll see if I can get a more recent mod_jk as a Debian package, and
else I'll see if I can make one myself, so that I can use the latest
default ForwardURIProxy.

I also did not understand the reason why in the docs it says This is ..
not safe if you are using prefix JkMount.
Anyone care to elaborate ?

I am not using prefix JkMount specifically, but I am using
Location /mir
SetHandler jakarta-servlet
/Location
Does this un-safeness apply in that case also ?


The problem is, that ForwardURICompat forwards the URL as decoded by 
Apache, e.g. usual percent encoding gets resolved. Tomcat decodes again.


So lets construct a URL like

/publicapp/../privateapp/privatedata

and so some encoding:

/publicapp/%2E%2E/privateapp/privatedata

Now if Apache gets this URK, it first decodes it

/publicapp/../privateapp/privatedata

and then normalizes it,

/privateapp/privatedata

Likely you don't have a JkMount /privateapp or a SetHandler in a 
Location /privateapp. OK, works.



*Now*: Let's double encode:

/publicapp/%252E%252E/privateapp/privatedata

Apache will decode (once) to

/publicapp/%2E%2E/privateapp/privatedata

As a decoded URL. Now there's no .. in it, so normalization doesn't 
change anything and the URL will match JkMount /publicapp/* or Location 
/publicapp.


Since ForwardURICompat is in use, mod_jk will forward this URL, so 
Tomcat gets the URL


/publicapp/%2E%2E/privateapp/privatedata

and decodes *again* resulting in

/publicapp/../privateapp/privatedata

normalizes to

/privateapp/privatedata

and serves your private data although you didn't map it in mod_jk.

So double decoding is desaster. That's why we now reencode every 
problematic character before forwarding to Tomcat.


So: depending on your Location URL the warning *does* apply.

Regards,

Rainer

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



Re: RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread André Warnier

Rainer Jung wrote:



On 15.06.2010 20:08, André Warnier wrote:

Rainer Jung wrote:

On 15.06.2010 16:13, Tobias Crefeld wrote:

Am Tue, 15 Jun 2010 15:04:01 +0200
schrieb André Warniera...@ice-sa.com:


In other words, it appears to receive the URI /mir/search.jsp, try
to map it to a worker, succeed, but then forwarding the request to
Tomcat as /jsp/search.jsp anyway (which was the original URL, not
the rewritten one). This /jsp/search.jsp is indeed not found by
Tomcat (because in Tomcat it is /mir/search.jsp), and I receive in
return a 404 error page from Tomcat.


I'm not quite sure whether I have understood your problem but maybe
this additional setting (after JkMount) helps:

JkOptions +ForwardURIProxy


Right, the Forward* JkOptions are the key here. There have been
various attempts during the lifetime of mod_jk to try getting this
right, so there are various possible options. Finally because of
security problems, ForwardURIProxy was introduced in 1.2.24 and made
the new default.

http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding

explains the options and also the limitations with respect to
mod_rewrite. There's also a short note at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Encoding 




It is possible, that you have explicitely configure
ForwardURICompatUnparsed, i.e. please forward the original URI without
any interpretation, decoding etc. Since decoding cannot be undone,
this means any rewriting by mod_rewrite is not respected. This option
was only default at the exact version 1.2.23 but it existed as an
option in 1.2.18.


Hi.
Thanks to both for your suggestions and explanations.
The version of mod_jk on that system is 1.2.18, and
I have not any of the JKOptions Forward* configured in my setup, which
is just this :

JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

Anyway, adding
JkOptions +ForwardURICompat
works !

(which is strange, because the docs says it should be the default before
1.2.22)

Now I'll see if I can get a more recent mod_jk as a Debian package, and
else I'll see if I can make one myself, so that I can use the latest
default ForwardURIProxy.

I also did not understand the reason why in the docs it says This is ..
not safe if you are using prefix JkMount.
Anyone care to elaborate ?

I am not using prefix JkMount specifically, but I am using
Location /mir
SetHandler jakarta-servlet
/Location
Does this un-safeness apply in that case also ?


The problem is, that ForwardURICompat forwards the URL as decoded by 
Apache, e.g. usual percent encoding gets resolved. Tomcat decodes again.


So lets construct a URL like

/publicapp/../privateapp/privatedata

and so some encoding:

/publicapp/%2E%2E/privateapp/privatedata

Now if Apache gets this URK, it first decodes it

/publicapp/../privateapp/privatedata

and then normalizes it,

/privateapp/privatedata

Likely you don't have a JkMount /privateapp or a SetHandler in a 
Location /privateapp. OK, works.



*Now*: Let's double encode:

/publicapp/%252E%252E/privateapp/privatedata

Apache will decode (once) to

/publicapp/%2E%2E/privateapp/privatedata

As a decoded URL. Now there's no .. in it, so normalization doesn't 
change anything and the URL will match JkMount /publicapp/* or Location 
/publicapp.


Since ForwardURICompat is in use, mod_jk will forward this URL, so 
Tomcat gets the URL


/publicapp/%2E%2E/privateapp/privatedata

and decodes *again* resulting in

/publicapp/../privateapp/privatedata

normalizes to

/privateapp/privatedata

and serves your private data although you didn't map it in mod_jk.

So double decoding is desaster. That's why we now reencode every 
problematic character before forwarding to Tomcat.


So: depending on your Location URL the warning *does* apply.

Regards,

Rainer


Got it, thanks for your time.

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



Re: RewriteRule rewrites, but mod_jk persists with old URI

2010-06-15 Thread Tobias Crefeld
Am Tue, 15 Jun 2010 20:08:15 +0200
schrieb André Warnier a...@ice-sa.com:

 The version of mod_jk on that system is 1.2.18, and
[..]
 Now I'll see if I can get a more recent mod_jk as a Debian package,

I'm not so familiar with Debian and we run only on sparc-version (5.0,
Lenny), but there should be a newer one at the normal repositories:

Server Version: Apache/2.2.9 (Debian) mod_jk/1.2.26

$ dpkg-query -p libapache2-mod-jk |head
Package: libapache2-mod-jk
Priority: optional
Section: web
Installed-Size: 536
Maintainer: Debian Java Maintainers 
pkg-java-maintain...@lists.alioth.debian.org
Architecture: sparc
Source: libapache-mod-jk
Version: 1:1.2.26-2+lenny1
Replaces: libapache2-mod-jk2
Depends: libc6 (= 2.7-1), apache2.2-common, apache2


Regards,
 Tobias.

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



Re: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread Pid
On 15/06/2010 20:49, j...@rogers.com wrote:
 with the test.html file, im not trying to achieve anything, it was just
 a test to see if the virtual directory pointing to the correct place.
 thanks for the advice about the conf directory, i will change it
 to be able to host the servlet in on my own domain, and not on
 localhost, im guessing i have to change something that has to do with
 host in the server.xml file. Do you have any suggestions on this?
 thanks a lot again

If IIS is 'in front' of Tomcat, then you'll configure the domain part there.

Tomcat with default config will serve applications from:

 path/to/tomcat/webapps

the default application is given the special name ROOT (capitals
matter), so if you want to serve a website, you'd put it in:

 path/to/tomcat/webapps/ROOT

It's completely safe to remove all of the contents of 'webapps' and
start over.  Alternatively, specify a different path in the 'appBase'
parameter of the default Host definition:

 Host ... appBase=C:\sites\myapps

and then place a ROOT directory in there.

The docs site has plenty of information in the Configuration section.


p

 --- On *Tue, 6/15/10, Pid /p...@pidster.com/* wrote:
 
 
 From: Pid p...@pidster.com
 Subject: Re: adding servlet to existing website through iis7 and tomcat6
 To: j...@rogers.com
 Date: Tuesday, June 15, 2010, 3:39 PM
 
 On 15/06/2010 18:58, j...@rogers.com
 /mc/compose?to=j...@rogers.com wrote:
  hi
  sorry, yeah that was the apache tomcat connector page i was using,
 and i
  am using iis7
  test.html file is in tomcat\conf, it is where the redirector dll
 is and
  it is where i have pointed my virtual directory.
 
 It sounds like you've got IIS to publish Tomcat's conf directory.
 
 If it works then you're publishing all of the config files too. (e.g.
 server.xml).  This is a BAD idea, don't do it.
 
 
  all i have in test.html is a simple hello in the body
 
 What exactly are you trying to achieve?
 
 
 p
 
 
 
  JB
 
  --- On *Tue, 6/15/10, Pid /p...@pidster.com
 /mc/compose?to=...@pidster.com/* wrote:
 
 
  From: Pid p...@pidster.com /mc/compose?to=...@pidster.com
  Subject: Re: adding servlet to existing website through iis7
 and tomcat6
  To: Tomcat Users List users@tomcat.apache.org
 /mc/compose?to=us...@tomcat.apache.org
  Date: Tuesday, June 15, 2010, 1:45 PM
 
  On 15/06/2010 18:29, j...@rogers.com
 /mc/compose?to=j...@rogers.com
  /mc/compose?to=j...@rogers.com
 /mc/compose?to=j...@rogers.com wrote:
   hi,
   thanks for the response
   what im trying to do is host a servlet i've made onto my website
   i packed it into a WAR file, then deployed it into Tomcat
 webapps,
  where
   i am able to access it through localhost:8080
   then i configured iis to work with tomcat. after following
 various
   tutorials on how to configure the isapi redirector
  
 (http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and
 
  You're using Tomcat 3.3?  I thought you said you were using 6.0?
 
  Try:
 
  http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
 
   http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got
  eveyrthing
   working for localhost:8080, the default website
   my servlet works under:
   http://localhost/servletname
   and also works for the supplied tomcat examples in:
   http://localhost/examples/servlets/
   I tried following the same steps for my own website, as i
 did for the
   Default Website.
   When i try to access the page i get 404 file not found errors
   btw, tomcat/conf is where i have the isapi_redirector.dll,
 and also
   the various properties files.
 
  If i make a html file, say test.html, inside the \conf
 folder, i can
  get to it through:
  http://my website address/virtual directory name/test.html
 
  So is the file test.html in tomcat/conf or somewhere else?
 
  If somewhere else, where is it?
 
 
  p
 
 
   thanks
   JB
  
   --- On *Tue, 6/15/10, Pid /p...@pidster.com
 /mc/compose?to=...@pidster.com
  /mc/compose?to=...@pidster.com
 /mc/compose?to=...@pidster.com/* wrote:
  
  
   From: Pid p...@pidster.com
 /mc/compose?to=...@pidster.com /mc/compose?to=...@pidster.com
 /mc/compose?to=...@pidster.com
   Subject: Re: adding servlet to existing website through iis7
  and tomcat6
   To: Tomcat Users List users@tomcat.apache.org
 /mc/compose?to=us...@tomcat.apache.org
  /mc/compose?to=us...@tomcat.apache.org
 

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

2010-06-15 Thread yuccanel
I have tried to check why this exception is thrown in production but not 
development

The difference between production snd development server is:

development) put mysql jar into CATALINA/lib (tomcat 6.0.26)

production) choice of common/lib or share/lib

exception is thrown by hibernate which is wrapping the exception from realm

Re: adding servlet to existing website through iis7 and tomcat6

2010-06-15 Thread jbuy
okay i'm reading the docs right now actually
thanks for all the help

--- On Tue, 6/15/10, Pid p...@pidster.com wrote:

From: Pid p...@pidster.com
Subject: Re: adding servlet to existing website through iis7 and tomcat6
To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 4:05 PM

On 15/06/2010 20:49, j...@rogers.com wrote:
 with the test.html file, im not trying to achieve anything, it was just
 a test to see if the virtual directory pointing to the correct place.
 thanks for the advice about the conf directory, i will change it
 to be able to host the servlet in on my own domain, and not on
 localhost, im guessing i have to change something that has to do with
 host in the server.xml file. Do you have any suggestions on this?
 thanks a lot again

If IIS is 'in front' of Tomcat, then you'll configure the domain part there.

Tomcat with default config will serve applications from:

 path/to/tomcat/webapps

the default application is given the special name ROOT (capitals
matter), so if you want to serve a website, you'd put it in:

 path/to/tomcat/webapps/ROOT

It's completely safe to remove all of the contents of 'webapps' and
start over.  Alternatively, specify a different path in the 'appBase'
parameter of the default Host definition:

 Host ... appBase=C:\sites\myapps

and then place a ROOT directory in there.

The docs site has plenty of information in the Configuration section.


p

 --- On *Tue, 6/15/10, Pid /p...@pidster.com/* wrote:
 
 
     From: Pid p...@pidster.com
     Subject: Re: adding servlet to existing website through iis7 and tomcat6
     To: j...@rogers.com
     Date: Tuesday, June 15, 2010, 3:39 PM
 
     On 15/06/2010 18:58, j...@rogers.com
     /mc/compose?to=j...@rogers.com wrote:
      hi
      sorry, yeah that was the apache tomcat connector page i was using,
     and i
      am using iis7
      test.html file is in tomcat\conf, it is where the redirector dll
     is and
      it is where i have pointed my virtual directory.
 
     It sounds like you've got IIS to publish Tomcat's conf directory.
 
     If it works then you're publishing all of the config files too. (e.g.
     server.xml).  This is a BAD idea, don't do it.
 
 
      all i have in test.html is a simple hello in the body
 
     What exactly are you trying to achieve?
 
 
     p
 
 
 
      JB
     
      --- On *Tue, 6/15/10, Pid /p...@pidster.com
     /mc/compose?to=...@pidster.com/* wrote:
     
     
      From: Pid p...@pidster.com /mc/compose?to=...@pidster.com
      Subject: Re: adding servlet to existing website through iis7
     and tomcat6
      To: Tomcat Users List users@tomcat.apache.org
     /mc/compose?to=us...@tomcat.apache.org
      Date: Tuesday, June 15, 2010, 1:45 PM
     
      On 15/06/2010 18:29, j...@rogers.com
     /mc/compose?to=j...@rogers.com
      /mc/compose?to=j...@rogers.com
     /mc/compose?to=j...@rogers.com wrote:
       hi,
       thanks for the response
       what im trying to do is host a servlet i've made onto my website
       i packed it into a WAR file, then deployed it into Tomcat
     webapps,
      where
       i am able to access it through localhost:8080
       then i configured iis to work with tomcat. after following
     various
       tutorials on how to configure the isapi redirector
      
     (http://tomcat.apache.org/tomcat-3.3-doc/tomcat-iis-howto.html  and
     
      You're using Tomcat 3.3?  I thought you said you were using 6.0?
     
      Try:
     
      http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
     
       http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html), i got
      eveyrthing
       working for localhost:8080, the default website
       my servlet works under:
       http://localhost/servletname
       and also works for the supplied tomcat examples in:
       http://localhost/examples/servlets/
       I tried following the same steps for my own website, as i
     did for the
       Default Website.
       When i try to access the page i get 404 file not found errors
       btw, tomcat/conf is where i have the isapi_redirector.dll,
     and also
       the various properties files.
     
      If i make a html file, say test.html, inside the \conf
     folder, i can
      get to it through:
      http://my website address/virtual directory name/test.html
     
      So is the file test.html in tomcat/conf or somewhere else?
     
      If somewhere else, where is it?
     
     
      p
     
     
       thanks
       JB
      
       --- On *Tue, 6/15/10, Pid /p...@pidster.com
     /mc/compose?to=...@pidster.com
      /mc/compose?to=...@pidster.com
     /mc/compose?to=...@pidster.com/* wrote:
      
      
       From: Pid p...@pidster.com
     /mc/compose?to=...@pidster.com /mc/compose?to=...@pidster.com
     

Multiple Tomcat Instances

2010-06-15 Thread Leo Donahue - PLANDEVX
In RUNNING.txt it says you can have a single copy of Tomcat binary shared among 
multiple users on the same server by setting the environment variable 
$CATALINA_BASE to the directory that contains the files for each personal 
Tomcat instance.

As simple as that reads, I don't understand it.  I don't understand how this is 
different than a virtual host with different appBase's.  Is it saying that 
whoever has a user login on the server can have their own Tomcat playground 
even though there is just one Tomcat installed?

So, if on Windows, you set a User environment variable of CATALINA_BASE to 
something like C:\TomcatDevUser1  ... that's it?
Tomcat figures out the CATALINA_BASE variable depending on who is logged in?
Does C:\TomcatDevUser1 need a ROOT directory for their default webapp?

Leo



Re: hibernate not finding global resource datasource defined by tomcat

2010-06-15 Thread Mark Eggers
My bad.

Copy and paste laziness led to a stray localDataSource=true attribute winding 
up in my server.xml Realm definition.

Fixed, and now everything works as expected. Back to writing.

/mde/

--- On Mon, 6/14/10, Mark Thomas ma...@apache.org wrote:

 From: Mark Thomas ma...@apache.org
 Subject: Re: hibernate not finding global resource datasource defined by 
 tomcat
 To: Tomcat Users List users@tomcat.apache.org
 Date: Monday, June 14, 2010, 11:31 PM
 On 15/06/2010 02:21, Mark Eggers
 wrote:
  Sure, I can make an attempt at it. I'd like to finish
 the wiki entry first. What I'm writing though will have to
 be drastically shortened for the documentation page I
 think.
 
  I just ran into a bit of a puzzle though. I was trying
 to unravel what happens when you put everything into
 server.xml and use a CombinedRealm. Under Linux, I had to
 add a ResourceLink element to my context.xml in order to use
 the sub-Realm.
 
  I can understand that I need a ResourceLink when I put
 the Resource in GlobalNamingResources and the Realm in
 context.xml, but I was rather surprised that I needed the
 ResourceLink when both are in server.xml.
 
  I'll see if I can reproduce this on Windows/XP (make
 sure I've done everything in a reasonable order).
 
  If that is indeed the case, can someone explain:
 
  1. Context.xml - everything
      no ResourceLink needed
 (obviously)
  2. Context.xml - Realm, server.xml Resource in
 GlobalNamingResources
      ResourceLink needed
 (obviously)
  3. Server.xml - CombinedRealm, Resource in
 GlobalNamingResources
      ResourceLink needed (??)
 
 Should be no. If not, it is a bug.
 
 Mark
 
 
 
 -
 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



RE: how to calculate a memory tomcat

2010-06-15 Thread Matthew Peterson
Yup. Have you seen the Bugs  Issues forum? 
http://www.lambdaprobe.org/forum2/forum.jspa?forumID=2start=0 or the Feature 
Request forum? http://www.lambdaprobe.org/forum2/forum.jspa?forumID=3

There are a lot of people who do think that it is lacking something, but their 
requests have been falling on deaf ears until the project was forked (for this 
very reason).

While Lambda Probe sits stale and unattended, progress continues in dependent 
areas (Tomcat, JDBC, etc.) regardless. It did a great job for the era it was 
developed for, but has slipped behind more recent developments, that's all.

Cheers,
Matt.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, 16 June 2010 3:03 AM
To: Tomcat Users List
Subject: Re: how to calculate a memory tomcat

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matt,

On 6/14/2010 6:42 PM, Matthew Peterson wrote:
 Lambda Probe is stale. It has been forked to Psi Probe which has regular 
 activity: http://code.google.com/p/psi-probe/

Is Lambda Probe stale?

It may not have gotten any updates for a while, but is it really lacking
anything?

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

iEYEARECAAYFAkwXskIACgkQ9CaO5/Lv0PCH1ACfQByPb9MOuaHz0Ia5asvXm5Kb
2IAAoK/vXmq6pGUuFHV1VbSICAspz0In
=9Rij
-END PGP SIGNATURE-

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



basic 2 virtual hosts configuration

2010-06-15 Thread MB

to deploy 2 virtual hosts in Tomcat 5.5.29 (no Apache) what more than
the server.xml file below and a context.xml per each host in Catalina do
you need to set up?

Where do I set path, like for /? Alright in the context file (see below)?

server.xml:
?xml version=1.0 encoding=UTF-8?
Server port=8005 shutdown=SHUTDOWN
  GlobalNamingResources
!-- Used by Manager webapp --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
   factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

  Service name=Catalina
Connector port=80 /
 Engine name=Catalina defaultHost=kron
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase /
  Host name=medpsy appBase=/home/webbplatser/medpsy.no /
  Host name=kron appBase=/home/webbplatser/kron.no /
/Engine
  /Service
/Server


Fragment context settings in /Catalina/kron/ROOT.xml (similar for the
other site: 

?xml version=1.0 encoding=UTF-8?
Context
docBase=/home/webbplatser/kron.no/ROOT
path=/
reloadable=true
workDir=work/Catalina/kron/_
  Listener className=org.apache.catalina.startup.TldConfig/
/Context:

This set up doesn't serve a pages physically put in any of the ROOT
folders of the sites. I get blank pages.

GUIDES?
Anyone that can point to a guide that focuses only on the steps
necessary to configure Tomcat 5.5.x for 2 or more virtual hosts?
Preferably without involvement with Apache.





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



Re: basic 2 virtual hosts configuration

2010-06-15 Thread Hassan Schroeder
On Tue, Jun 15, 2010 at 4:23 PM, MB digital.disc...@gmail.com wrote:

 GUIDES?
 Anyone that can point to a guide that focuses only on the steps
 necessary to configure Tomcat 5.5.x for 2 or more virtual hosts?

In the documentation?

http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



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

2010-06-15 Thread Mark Eggers
Are you developing on 6.0.x but deploying on 5.?.x (5.0 or 5.5)?

What version is running in production?

--- On Tue, 6/15/10, yucca...@live.co.za yucca...@live.co.za wrote:

 From: yucca...@live.co.za yucca...@live.co.za
 Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
 driver of class '' for connect URL 'null'
 To: Tomcat Users List users@tomcat.apache.org
 Date: Tuesday, June 15, 2010, 1:11 PM
 I have tried to check why this
 exception is thrown in production but not development
 
 The difference between production snd development server
 is:
 
 development) put mysql jar into CATALINA/lib (tomcat
 6.0.26)
 
 production) choice of common/lib or share/lib
 
 exception is thrown by hibernate which is wrapping the
 exception from realm


  


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



RE: basic 2 virtual hosts configuration

2010-06-15 Thread Caldarale, Charles R
 From: MB [mailto:digital.disc...@gmail.com]
 Subject: basic 2 virtual hosts configuration
 
 to deploy 2 virtual hosts in Tomcat 5.5.29 (no Apache) what more than
 the server.xml file below and a context.xml per each host in Catalina
 do you need to set up?

Nothing, but you must do it correctly.

 Where do I set path, like for /?

You don't set the path attribute - in almost all cases it is illegal (and / 
is never correct, under any circumstances - read the doc).

  Engine name=Catalina defaultHost=kron
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase /
   Host name=medpsy appBase=/home/webbplatser/medpsy.no /
   Host name=kron appBase=/home/webbplatser/kron.no /
 /Engine

The above looks ok.

 Fragment context settings in /Catalina/kron/ROOT.xml (similar 
 for the other site:
 
 docBase=/home/webbplatser/kron.no/ROOT
 path=/

Take out the docBase and path attributes; they're not allowed here.  The path 
is derived from the name of the .xml file, and the webapp is located in the 
Host appBase, so docBase must not be used.

 workDir=work/Catalina/kron/_

Remove the workDir attribute, since you've done nothing but specify the default.

   Listener className=org.apache.catalina.startup.TldConfig/

Why have you declared the above?  Where in the doc does it say you should do 
that?

 GUIDES?

It's all in the docs:
http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Don't forget to look in the Tomcat logs for deployment problems.

 - 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: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2010-06-15 Thread yuccanel
production is tomcat 6.0.20 thanks for the reply. had to call it a night so 
sorry for delay in reply.


--
From: Mark Eggers its_toas...@yahoo.com
Sent: Wednesday, June 16, 2010 3:16 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'



Are you developing on 6.0.x but deploying on 5.?.x (5.0 or 5.5)?

What version is running in production?

--- On Tue, 6/15/10, yucca...@live.co.za yucca...@live.co.za wrote:


From: yucca...@live.co.za yucca...@live.co.za
Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'

To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 1:11 PM
I have tried to check why this
exception is thrown in production but not development

The difference between production snd development server
is:

development) put mysql jar into CATALINA/lib (tomcat
6.0.26)

production) choice of common/lib or share/lib

exception is thrown by hibernate which is wrapping the
exception from realm






-
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



RE: Multiple Tomcat Instances

2010-06-15 Thread Caldarale, Charles R
 From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov]
 Subject: Multiple Tomcat Instances
 
 As simple as that reads, I don't understand it.

Read the rest of that section of RUNNING.txt as well:

When you use $CATALINA_BASE, Tomcat will calculate all relative references for
files in the following directories based on the value of $CATALINA_BASE instead
of $CATALINA_HOME:
* bin  - Only setenv.sh (*nix), setenv.bat (windows) and tomcat-juli.jar
* conf - Server configuration files (including server.xml)
* logs - Log and output files
* webapps - Automatically loaded web applications
* work - Temporary working directories for web applications
* temp - Directory used by the JVM for temporary files (java.io.tmpdir)

 I don't understand how this is different than a virtual host with 
 different appBase's.

Because in the multiple Tomcat instances scenario, each user gets a separate 
instance (hence the name), which he or she may start, stop, crash, hang in a 
loop, or otherwise manipulate without any impact to the other Tomcat instances. 
 When using multiple Host elements, everyone is using the *same* Tomcat 
instance, so when one user messes up, all suffer.

 Is it saying that whoever has a user login on the server 
 can have their own Tomcat playground even though there is
 just one Tomcat installed?

It has nothing to do with user logins, just the individual CATALINA_BASE 
settings.  If you choose to tie that to a login, fine, but that's not a 
requirement.

You seem to be confusing installation directories with running processes; do 
you think that because there's only one Notepad installed, you can only run one 
at a time?

 So, if on Windows, you set a User environment variable of 
 CATALINA_BASE to something like C:\TomcatDevUser1  ... 
 that's it?

No, you have to set up the files under that directory as described in 
RUNNING.txt.

 Tomcat figures out the CATALINA_BASE variable depending 
 on who is logged in?

No, Tomcat uses whatever CATALINA_BASE is active when Tomcat is run via the 
startup.bat or catalina.bat scripts.  Since each user has complete control over 
his/her environment variables, he or she can set the variable to any value 
desired.

 Does C:\TomcatDevUser1 need a ROOT directory for their default webapp?

Yes.

 - 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: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2010-06-15 Thread Caldarale, Charles R
 From: yucca...@live.co.za [mailto:yucca...@live.co.za]
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
 create JDBC driver of class '' for connect URL 'null'
 
 production is tomcat 6.0.20

Then there's no common/lib or shared/lib in production either.  Get your story 
straight.

I would strongly recommend that you do your development and testing on exactly 
the same Tomcat version that runs in production.  Anything else puts you at 
risk for unexpected surprises.  (I'd also upgrade production ASAP.)

 - 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: disabling non url match returns

2010-06-15 Thread Caldarale, Charles R
 From: nejm [mailto:emedei...@mms.org]
 Subject: RE: disabling non url match returns
 
 I'm running the Tomcat V6

What part of exact version don't you understand?  6.0.what?

 It looks like my mapping thats catching all requests would 
 be the culprit

Correct.

 I imagine if that mapping was removed it may change the
 behavior in other areas?

That's completely up to you - it's your servlet code.

 - 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: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2010-06-15 Thread yuccanel
Ok, no need to accuse me of lying, please see screenshot showing common/lib 
and other screenie showing there is no tomcat/lib :o



--
From: Caldarale, Charles R chuck.caldar...@unisys.com
Sent: Wednesday, June 16, 2010 4:03 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'



From: yucca...@live.co.za [mailto:yucca...@live.co.za]
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'

production is tomcat 6.0.20


Then there's no common/lib or shared/lib in production either.  Get your 
story straight.


I would strongly recommend that you do your development and testing on 
exactly the same Tomcat version that runs in production.  Anything else 
puts you at risk for unexpected surprises.  (I'd also upgrade production 
ASAP.)


- 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

Re: basic 2 virtual hosts configuration

2010-06-15 Thread MB
Caldarale, Charles R said:

Nothing, but you must do it correctly.
Yes, I figured that much. :)

You don't set the path attribute - in almost all cases it is illegal
(and / is never correct, under any circumstances - read the doc).
Interesting. Time for a reread.

  Engine name=Catalina defaultHost=kron
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase /
   Host name=medpsy appBase=/home/webbplatser/medpsy.no /
   Host name=kron appBase=/home/webbplatser/kron.no /
 /Engine

The above looks ok.
Thanks

 Fragment context settings in /Catalina/kron/ROOT.xml (similar
 for the other site:

 docBase=/home/webbplatser/kron.no/ROOT
 path=/
Take out the docBase and path attributes; they're not allowed here.  The
path is derived from the name of the .xml file, and the webapp is
located in the Host appBase, so docBase must not be used.
This seems to be vital info I'll try and incorporate. Time for testing!

Why have you declared the above?  Where in the doc does it say you
should do that?
Actually Tomcat did that.

Thanks for your response, Charles. Very helpful.



Hassan Schroeder said

In the documentation?

http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html

Thanks for your response, Hassan. Perhaps I should have been more clear
what I had done already.

I've read that page, took my time, cleaned out my old install,
reinstalled 5.5.28, updated and installed 5.5.29. I also have 3 books
about Tomcat with similar instructions. Information about Tomcat often
seem to me to be incomplete, not entirely relevant to what I want to set
up - multiple hosts, standalone and so on - or is often way too detailed
or just not based around real world examples, which makes it difficult
to extract info.
I have succeeded many times before setting up server with Tomcat 4. In
contrast configuring Apache2 - with vhosts anyway - is a piece of cake
to setup. Not the same cup of tea, but nevertheless.

I really want to understand Tomcat in this regard as it's very
difficult to run a java-based server unless you have a virtual server
and this means -  for me anyway - I have to set it up and administrate
it as there's no budget and no people I know that I can ask as of now.

In return for any help I receive, I'll write a guide for mere mortals,
put it on the web and make it known here, so no pesky newbies have to
ask about this more than necessarily.

This setup is so basic it should just work. Folding up my sleeves.




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