Re: ROOT.xml problem

2012-06-03 Thread Kevin Marx
OK, so now, how is this working?  How to fix it?

ROOT.xml is located in conf/Catalina/localhost

File contents are thus:

?xml version='1.0' encoding='utf-8'?
Context
docBase=C:\Corda\CenterView4\Server\corda\
reloadable=true
/

in the browser I am entering http://localhost:8080

the URL is comes up with is thus:

http://localhost:8080/dashboards/welcome/main.dashxml

However it should be:

http://localhost:8080/corda/dashboards/welcome/main.dashxml

This URL will work when entered.  The /corda is necessary

Why is the /corda missing from the URL?  What needs to be in the ROOT.xml file 
to make it show up?

Kevin



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



Re: ROOT.xml problem

2012-06-03 Thread André Warnier

Kevin Marx wrote:

OK, so now, how is this working?  How to fix it?

ROOT.xml is located in conf/Catalina/localhost

File contents are thus:

?xml version='1.0' encoding='utf-8'?
Context
docBase=C:\Corda\CenterView4\Server\corda\
reloadable=true
/

in the browser I am entering http://localhost:8080

the URL is comes up with is thus:

http://localhost:8080/dashboards/welcome/main.dashxml


What do you mean by it comes up with ? who ? where ? how ? what ?



However it should be:

http://localhost:8080/corda/dashboards/welcome/main.dashxml

This URL will work when entered.  The /corda is necessary


why ? if that application was correctly designed, it shouldn't be.
It means that somewhere in that application, there is a harcoded /corda/ prefix 
pre-pended to URLs.




Why is the /corda missing from the URL?  What needs to be in the ROOT.xml file 
to make it show up?


We don't know what that application is doing inside.
All we can tell you here, is that if the application used only relative URLs (which is the 
cleanest design), then it shouldn't matter if it was moved around here or there.


I believe that you are looking at this the wrong way.  You seem to expect the container to 
be able to override everything that the application specifies.  It cannot; or maybe it 
can, but it is likely to be hard work, re-rewriting URLs all over.


The application seems to work fine when it is installed in ../webapps/corda/, and 
accessed with URLs starting with /corda. Fine.


Now /you/ would like it instead to be the default application, and to be able to drop that 
/corda prefix.  You have asked how to do that, and have done it.  And it should work.


That is, it should work as long as the application's pages themselves don't fight this all 
the way.  If you access the application's main page, and it returns a page in which there 
is a link with an absolute URL starting with /xyz/*, (or starting with nothing when it 
should be /xyz/), then that is /the application's doing/, not the container's.  The 
container code, by itself, does not scan every page that the application is returning to 
check if there is a URL inside there that should or should not have some prefix, and 
change it.


I believe that you should go back to the creators of that application, tell them what you 
have done, tell them that it is not working as you expect, and ask /them/ why.



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



Re: Unable to build tomcat-connectors

2012-06-03 Thread Thad Humphries
On Sun, Jun 3, 2012 at 2:44 AM, Sharon S Sreedh sharonkai...@gmail.comwrote:

 Hi,

 I was tring to build tomcat-connectors but it doesnt come in success. I
 tried a number of times.. But all the time it ends up error. Please sugest
 me a way to make this win.


 -
 Linux Kernel version: 2.6.18-308.el5.028stab099.3
 GCC version : gcc-4.1.2-52.el5_8.1

 Server version: Apache/2.4.2 (Unix)
 Server built:   Jun  3 2012 16:46:17
 Server's Module Magic Number: 20120211:3
 Server loaded:  APR 1.4.6, APR-UTIL 1.4.1
 Compiled using: APR 1.4.6, APR-UTIL 1.4.1
 Architecture:   32-bit
 Server MPM: event
   threaded: yes (fixed thread count)
 forked: yes (variable process count)
 Server compiled with
  -D APR_HAS_SENDFILE
  -D APR_HAS_MMAP
  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
  -D APR_USE_SYSVSEM_SERIALIZE
  -D APR_USE_PTHREAD_SERIALIZE
  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -D APR_HAS_OTHER_CHILD
  -D AP_HAVE_RELIABLE_PIPED_LOGS
  -D DYNAMIC_MODULE_LIMIT=256
  -D HTTPD_ROOT=/usr/local/apache
  -D SUEXEC_BIN=/usr/local/apache/bin/suexec
  -D DEFAULT_PIDLOG=logs/httpd.pid
  -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
  -D DEFAULT_ERRORLOG=logs/error_log
  -D AP_TYPES_CONFIG_FILE=conf/mime.types
  -D SERVER_CONFIG_FILE=conf/httpd.conf

 ==

 tomcat-connectors
 -
 tomcat-connectors-1.2.37-src
 
 Build error
 ---
 .
 .
 .
 .
 /usr/local/src/httpd-2.4.2/include/ap_hooks.h:39:17: error: apr.h: No such
 file or directory
 /usr/local/src/httpd-2.4.2/include/ap_hooks.h:40:23: error: apr_hooks.h:
 No such file or directory
 /usr/local/src/httpd-2.4.2/include/ap_hooks.h:41:32: error:
 apr_optional_hooks.h: No such file or directory
 In file included from /usr/local/src/httpd-2.4.2/include/ap_config.h:136,
  from mod_jk.c:29:
 /usr/local/src/httpd-2.4.2/os/unix/os.h:31:17: error: apr.h: No such file
 or directory
 mod_jk.c:30:21: error: apr_lib.h: No such file or directory
 mod_jk.c:31:22: error: apr_date.h: No such file or directory
 mod_jk.c:32:27: error: apr_file_info.h: No such file or directory
 mod_jk.c:33:25: error: apr_file_io.h: No such file or directory
 In file included from /usr/local/src/httpd-2.4.2/include/httpd.h:47,
  from mod_jk.c:34:
 /usr/local/src/httpd-2.4.2/include/ap_release.h:25:41: error:
 apr_general.h: No such file or directory
 In file included from mod_jk.c:34:
 /usr/local/src/httpd-2.4.2/include/httpd.h:51:24: error: apr_tables.h: No
 such file or directory
 /usr/local/src/httpd-2.4.2/include/httpd.h:52:23: error: apr_pools.h: No
 such file or directory
 /usr/local/src/httpd-2.4.2/include/httpd.h:53:22: error: apr_time.h: No
 such file or directory
 /usr/local/src/httpd-2.4.2/include/httpd.h:54:28: error: apr_network_io.h:
 No such file or directory
 /usr/local/src/httpd-2.4.2/include/httpd.h:55:25: error: apr_buckets.h: No
 such file or directory
 /usr/local/src/httpd-2.4.2/include/httpd.h:56:22: error: apr_poll.h: No
 such file or directory
 /usr/local/src/httpd-2.4.2/include/httpd.h:57:29: error:
 apr_thread_proc.h: No such file or directory
 In file included from /usr/local/src/httpd-2.4.2/include/httpd.h:61,
  from mod_jk.c:34:
 .
 .
 .
 Attaching Full Build Output with this. Please help me to resolve this.

 Thanks  Regards
 Sharon Sreedh


Just my guess:  In running the configure script, did you
include --with-apxs[=FILE], where FILE is the full path to apxs? If apxs is
your path, are the include directory and the ap_*.h headers nearby, as in
if apxs is at [foo]/apache2/bin/axpx are the include files
at [foo]/apache2/include  ?

I prefer to build Apache myself, so I always point my configure script at
the apxs I've built in whatever I'm running. Line #28 of
tomcat-connectors-1.2.xx-src/native/BUILDING.txt has made my life simple in
this regard:

./configure -with-apxs=/home2/local/apache/bin/apxs

-- 
Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)


Re: ROOT.xml problem

2012-06-03 Thread Stefan Mayr

Am 03.06.2012 09:17, schrieb Kevin Marx:

OK, so now, how is this working?  How to fix it?

ROOT.xml is located in conf/Catalina/localhost

File contents are thus:

?xml version='1.0' encoding='utf-8'?
Context
docBase=C:\Corda\CenterView4\Server\corda\
reloadable=true
/

in the browser I am entering http://localhost:8080

the URL is comes up with is thus:

http://localhost:8080/dashboards/welcome/main.dashxml

However it should be:

http://localhost:8080/corda/dashboards/welcome/main.dashxml

This URL will work when entered.  The /corda is necessary

Why is the /corda missing from the URL?  What needs to be in the ROOT.xml file 
to make it show up?


So you have a third-party app which needs to be called in the /corda 
context. There seems no way to make it accessible as ROOT applications.


I think you just need a redirect pointing to your applications location.

Steps:
1. remove everything you did to make it work as ROOT; back to the 
working /corda version

2. Create a redirect in your ROOT context

Options to make no. 2 work:
create webapps/ROOT/index.jsp with content
%
response.sendRedirect(http://yourhostname:8080/corda/;);
%

or a simple html-only version index.html:
html
head
meta http-equiv=refresh
  content=0; URL=/corda/
head
body
a href=/corda/Go to corda/a
/body
/html

hope this fulfills your needs

Stefan

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



Re: Unable to build tomcat-connectors

2012-06-03 Thread Sharon S Sreedh
I already run the configure script --with-apxs2=/path/to/apxs
--with-apache=/path/to/apache and header file are in the directory
apache/include

when I compile with ./configure -with-apxs2=/path/to/apxs  alone I got,
configure: error: Cannot find the WebServer
then I compiled with -with-apxs2=/path/to/apxs
--with-apache=/path/to/apache this time compilation completed succefully
but build faild with above error.


On Sun, Jun 3, 2012 at 6:01 PM, Thad Humphries thad.humphr...@gmail.comwrote:

 On Sun, Jun 3, 2012 at 2:44 AM, Sharon S Sreedh sharonkai...@gmail.com
 wrote:

  Hi,
 
  I was tring to build tomcat-connectors but it doesnt come in success. I
  tried a number of times.. But all the time it ends up error. Please
 sugest
  me a way to make this win.
 
 
  -
  Linux Kernel version: 2.6.18-308.el5.028stab099.3
  GCC version : gcc-4.1.2-52.el5_8.1
 
  Server version: Apache/2.4.2 (Unix)
  Server built:   Jun  3 2012 16:46:17
  Server's Module Magic Number: 20120211:3
  Server loaded:  APR 1.4.6, APR-UTIL 1.4.1
  Compiled using: APR 1.4.6, APR-UTIL 1.4.1
  Architecture:   32-bit
  Server MPM: event
threaded: yes (fixed thread count)
  forked: yes (variable process count)
  Server compiled with
   -D APR_HAS_SENDFILE
   -D APR_HAS_MMAP
   -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
   -D APR_USE_SYSVSEM_SERIALIZE
   -D APR_USE_PTHREAD_SERIALIZE
   -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
   -D APR_HAS_OTHER_CHILD
   -D AP_HAVE_RELIABLE_PIPED_LOGS
   -D DYNAMIC_MODULE_LIMIT=256
   -D HTTPD_ROOT=/usr/local/apache
   -D SUEXEC_BIN=/usr/local/apache/bin/suexec
   -D DEFAULT_PIDLOG=logs/httpd.pid
   -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
   -D DEFAULT_ERRORLOG=logs/error_log
   -D AP_TYPES_CONFIG_FILE=conf/mime.types
   -D SERVER_CONFIG_FILE=conf/httpd.conf
 
  ==
 
  tomcat-connectors
  -
  tomcat-connectors-1.2.37-src
  
  Build error
  ---
  .
  .
  .
  .
  /usr/local/src/httpd-2.4.2/include/ap_hooks.h:39:17: error: apr.h: No
 such
  file or directory
  /usr/local/src/httpd-2.4.2/include/ap_hooks.h:40:23: error: apr_hooks.h:
  No such file or directory
  /usr/local/src/httpd-2.4.2/include/ap_hooks.h:41:32: error:
  apr_optional_hooks.h: No such file or directory
  In file included from /usr/local/src/httpd-2.4.2/include/ap_config.h:136,
   from mod_jk.c:29:
  /usr/local/src/httpd-2.4.2/os/unix/os.h:31:17: error: apr.h: No such file
  or directory
  mod_jk.c:30:21: error: apr_lib.h: No such file or directory
  mod_jk.c:31:22: error: apr_date.h: No such file or directory
  mod_jk.c:32:27: error: apr_file_info.h: No such file or directory
  mod_jk.c:33:25: error: apr_file_io.h: No such file or directory
  In file included from /usr/local/src/httpd-2.4.2/include/httpd.h:47,
   from mod_jk.c:34:
  /usr/local/src/httpd-2.4.2/include/ap_release.h:25:41: error:
  apr_general.h: No such file or directory
  In file included from mod_jk.c:34:
  /usr/local/src/httpd-2.4.2/include/httpd.h:51:24: error: apr_tables.h: No
  such file or directory
  /usr/local/src/httpd-2.4.2/include/httpd.h:52:23: error: apr_pools.h: No
  such file or directory
  /usr/local/src/httpd-2.4.2/include/httpd.h:53:22: error: apr_time.h: No
  such file or directory
  /usr/local/src/httpd-2.4.2/include/httpd.h:54:28: error:
 apr_network_io.h:
  No such file or directory
  /usr/local/src/httpd-2.4.2/include/httpd.h:55:25: error: apr_buckets.h:
 No
  such file or directory
  /usr/local/src/httpd-2.4.2/include/httpd.h:56:22: error: apr_poll.h: No
  such file or directory
  /usr/local/src/httpd-2.4.2/include/httpd.h:57:29: error:
  apr_thread_proc.h: No such file or directory
  In file included from /usr/local/src/httpd-2.4.2/include/httpd.h:61,
   from mod_jk.c:34:
  .
  .
  .
  Attaching Full Build Output with this. Please help me to resolve this.
 
  Thanks  Regards
  Sharon Sreedh
 

 Just my guess:  In running the configure script, did you
 include --with-apxs[=FILE], where FILE is the full path to apxs? If apxs is
 your path, are the include directory and the ap_*.h headers nearby, as in
 if apxs is at [foo]/apache2/bin/axpx are the include files
 at [foo]/apache2/include  ?

 I prefer to build Apache myself, so I always point my configure script at
 the apxs I've built in whatever I'm running. Line #28 of
 tomcat-connectors-1.2.xx-src/native/BUILDING.txt has made my life simple in
 this regard:

 ./configure -with-apxs=/home2/local/apache/bin/apxs

 --
 Hell hath no limits, nor is circumscrib'd In one self-place; but where we
 are is hell, And where hell is, there must we ever be --Christopher
 Marlowe, *Doctor Faustus* (v, 121-24)



Re: ROOT.xml problem

2012-06-03 Thread Pid
On 03/06/2012 14:20, Stefan Mayr wrote:
 
 So you have a third-party app which needs to be called in the /corda
 context. There seems no way to make it accessible as ROOT applications.
 
 I think you just need a redirect pointing to your applications location.
 
 Steps:
 1. remove everything you did to make it work as ROOT; back to the
 working /corda version
 2. Create a redirect in your ROOT context

@Kevin /you/ asked us how to remove the '/corda' bit of the URL.

Like Stefan says, if you need that, then go back to how you had the app
before.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: getting frustrated with web sockets

2012-06-03 Thread Pid
On 02/06/2012 03:38, Ravi wrote:
 
 I am trying to build an android app that connects to tomcat web sockets.
 
 I need a few java classes that can interact with tomcat websockets. I
 have tried 3 different implementations
 (strumsoft, jwebsockets and something else also) but neither one can
 talk to tomcat correctly.
 
 The issue seems to be protocol incompatibility between tomcat as server
 and any existing java websockets client.
 
 I even compiled jwebsockets swing based test client and that also cannot
 talk to tomcat. Surprisingly all javascript based clients can talk to
 tomcat, only java based cannot.
 
 
 So having done all that research, I wonder if somebody can help me
 identify java classes that will work with tomcat. Does tomcat have a
 client jar I can use?

http://tomcat.apache.org/tomcat-7.0-doc/web-socket-howto.html


p

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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: getting frustrated with web sockets

2012-06-03 Thread Mark Thomas
On 02/06/2012 08:32, Christian Finckler wrote:
 Hello,
 I had the same problem some time ago.
 I could get jwesocket to work either.
 But I then used autobahn:
 http://autobahn.ws/developers/autobahnandroid/installation

The Tomcat WebSocket implementation is tested against Autobahn (and
everything passes) so the Autobahn client is very likely to just work.

 That worked great for me.
 
 I couldn't find out if the different client libraries do something wrong
 or tomcat but I was a bit disapointet, too.

There have been many versions of the WebSocket protocol as it has
evolved into what is now RFC 6455. I suspect that the clients that don't
work either have been written to an earlier version of the protocol or
have some bugs.

 Perhaps that gets better when the draft is finished.

RFC 6455 support is what you need to look for. If you find something
that doesn't work with an RFC 6455 client then you'll almost certainly
need to collect a wireshark trace to find out what is going wrong and where.

Mark

 
 Btw. for normal java I use asynch http with netty.
 
 Bye,
 Chris
 
 Am 02.06.2012 04:38, schrieb Ravi:

 I am trying to build an android app that connects to tomcat web sockets.

 I need a few java classes that can interact with tomcat websockets. I
 have tried 3 different implementations
 (strumsoft, jwebsockets and something else also) but neither one can
 talk to tomcat correctly.

 The issue seems to be protocol incompatibility between tomcat as
 server and any existing java websockets client.

 I even compiled jwebsockets swing based test client and that also
 cannot talk to tomcat. Surprisingly all javascript based clients can
 talk to tomcat, only java based cannot.


 So having done all that research, I wonder if somebody can help me
 identify java classes that will work with tomcat. Does tomcat have a
 client jar I can use?

 Help!


 -
 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
 


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



Re: non blocking Websockets?

2012-06-03 Thread Mark Thomas
On 31/05/2012 18:45, Christian Finckler wrote:
 
 
 Am 31.05.2012 11:09, schrieb Mark Thomas:
 On 31/05/2012 10:02, Christian Finckler wrote:
 Hello,
 as far I understood, the websocket implementation of tomcat is using one
 thread per client.
 Is there also a possibility to configure it to use non blocking IO?
 No. That has not yet been implemented. It shouldn't be too hard provided
 that non-blocking is used between messages and blocking is used during
 messages. Obviously, the BIO connector will always use blocking.

Whoops. My bad. I implemented this already. NIO and APR/native will be
non-blocking between messages and have been since the first Tomcat
release to include WebSocket support. Note that all connectors will
block between the point the upgrade is started and the first message is
sent.

This was on my to-do list for a while and I simply forgot I had actually
implemented. Had I looked at the code first (like I just did) it would
have been clear that this was implemented.

Sorry for the mis-information.

Mark



 Mark

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 Ok, if that is so easy, it should be done. I am developing an online
 game, in which the player dont send messages very often (max: ten
 messages per minute), but is is very important to get the messages of
 other players very fast. Thats why I want to use websockets. But now it
 would be sad, if I need multiple tomcat instances only for connection
 handling although the process handling itself is not very complicated
 (cpu and memory intensive).
 
 Thank you,
 Chris
 
 -
 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: non blocking Websockets?

2012-06-03 Thread Christian Finckler

Am 03.06.2012 19:50, schrieb Mark Thomas:

On 31/05/2012 18:45, Christian Finckler wrote:


Am 31.05.2012 11:09, schrieb Mark Thomas:

On 31/05/2012 10:02, Christian Finckler wrote:

Hello,
as far I understood, the websocket implementation of tomcat is using one
thread per client.
Is there also a possibility to configure it to use non blocking IO?

No. That has not yet been implemented. It shouldn't be too hard provided
that non-blocking is used between messages and blocking is used during
messages. Obviously, the BIO connector will always use blocking.

Whoops. My bad. I implemented this already. NIO and APR/native will be
non-blocking between messages and have been since the first Tomcat
release to include WebSocket support. Note that all connectors will
block between the point the upgrade is started and the first message is
sent.

This was on my to-do list for a while and I simply forgot I had actually
implemented. Had I looked at the code first (like I just did) it would
have been clear that this was implemented.

Sorry for the mis-information.

Mark

Hello Mark,
you have confused me a bit. So there isn't one thread for each websocket 
client used? If not. What are the configuration possibilities for that? 
And how to do it?
Perhaps you can describe more deeply how you handle websockets in regard 
of blocking/non blocking and thread handling?


Thank you,
Chris


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



Re: non blocking Websockets?

2012-06-03 Thread Mark Thomas
On 03/06/2012 21:26, Christian Finckler wrote:
 Am 03.06.2012 19:50, schrieb Mark Thomas:
 On 31/05/2012 18:45, Christian Finckler wrote:

 Am 31.05.2012 11:09, schrieb Mark Thomas:
 On 31/05/2012 10:02, Christian Finckler wrote:
 Hello,
 as far I understood, the websocket implementation of tomcat is
 using one
 thread per client.
 Is there also a possibility to configure it to use non blocking IO?
 No. That has not yet been implemented. It shouldn't be too hard
 provided
 that non-blocking is used between messages and blocking is used during
 messages. Obviously, the BIO connector will always use blocking.
 Whoops. My bad. I implemented this already. NIO and APR/native will be
 non-blocking between messages and have been since the first Tomcat
 release to include WebSocket support. Note that all connectors will
 block between the point the upgrade is started and the first message is
 sent.

 This was on my to-do list for a while and I simply forgot I had actually
 implemented. Had I looked at the code first (like I just did) it would
 have been clear that this was implemented.

 Sorry for the mis-information.

 Mark
 Hello Mark,
 you have confused me a bit. So there isn't one thread for each websocket
 client used?

For the BIO connector it is always one thread == one connection. You
cannot do non-blocking IO with the blocking IO connector.

For NIO and APR/native is:
 - as many connections as you like up to maxConnections
 - one thread == WebSocket frame

The threads are taken from the connector's connection pool and are
returned once the WebSocket frame has been read.

Reads are non-blocking between frames but blocking during a frame (to
save having track detailed state between reads)

Writes are always blocking.

In short, if the client isn't sending any data, Tomcat doesn't allocate
a thread to read it. The poller monitors the connection and passes it to
a thread when there is a message to read.

 If not. What are the configuration possibilities for that?

maxThreads, maxConnections on the connector just like HTTP.

 And how to do it?

Use the NIO or APR/native connector and it just works.

 Perhaps you can describe more deeply how you handle websockets in regard
 of blocking/non blocking and thread handling?

See above. If you want more detail, look at the source code. I am not
going to translate that into pseudo code for you.

Mark

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



Request for Aliases or Alias as element inside Context

2012-06-03 Thread Esmond Pitt
I have a large and growing number of requirements for aliases, and the
existing (new for Tomcat 7) aliases= attribute is unwieldy for me. The line
is already 289 characters long ;-(
 
It would be a lot more convenient if aliases could be specified individually
via a repeatable nested Alias entry, something like:
 
Context
Alias aliasPath=/xyz docBase=/real_path/
...
/Context
 
Comments welcome.
 
EJP


Followup old thread(s) about Apache, AJP, and tomcatAuthentication, and roles

2012-06-03 Thread ohaya
Hi,

Awhile ago, I had this thread, where I originally trying to see if I could get 
Tomcat, using the AJP connector and tomcatAuthentication to work, when I had 
an OAM webgate installed on the Apache proxy fronting the Tomcat:

http://tomcat.10.n6.nabble.com/Do-any-of-the-Tomcat-LDAP-type-realms-support-quot-no-password-quot-authentication-td2055999.html

The bottom line at the time was that it didn't seem to work, probably because 
the user name wasn't being populated in the AJP packet.

I'm picking this subject up again, from scratch, because I happened to find out 
that mod_ssl has a directive, SSLUserName that is suppose to populate the user 
name after 2-way SSL authentication.

So, I set up a new Apache and Tomcat, and I added that SSLUserName directive to 
the Apache httpd-ssl.conf, but not with the OAM agent yet, and did some tests, 
and it looks like it ALMOST worked, i.e., it looks like *A* user name is being 
passed to Tomcat (in Tomcat logs, I see already authenticated and the 
username from the SSL client cert.

However, I get a 403/access denied on my test web app.  

This is even though I have a role in the realm (the original/default flatfile 
realm), so it looks like even though the tomcatAuthentication=false is kind 
of working, the user is not picking up the Tomcat roles.

So, I've been googling, and found this:

http://tomcat.10.n6.nabble.com/Container-managed-security-and-Proxy-support-td2168081.html

which seems to describes the problem I'm encountering, but that thread didn't 
seem to conclude.

So, does anyway know, when a user is asserted into Tomcat via 
tomcatAuthentication='false', does that authenticated user pickup the Tomcat 
roles from the realm?

There's one msg in the thread from Pid saying that a custom realm is needed, 
and then Andre Warnier seemed to think that wasn't the case, but then nothing 
after that.

Thanks,
Jim

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