RE: j_security_check - Bookmarking the login page. A teaser!

2003-11-19 Thread David Legg
Hi Adoni,

No... you are not alone.  I've been there too!

My half hearted solution was to simply display a message on the login page
asking them not to bookmark it.  I think the proper solution would be to
allow developers to specify a 'default' url along with the login and error
urls.  This page could then be displayed instead of the error page when
there is no saved target url.

You will probably also come across another non-obvious problem to do with
form-based security.  When people use download accelerators like 'GetRight'
etc these programs attempt to download a given url.  Unfortunately if the
item they are trying to download falls under your protected region Tomcat
will present them with the login page instead of the resource they were
after.  This will happen even if you have successfully logged in because as
far as Tomcat is concerned the request came from a new and as yet not logged
in session.

Regards,

David Legg
Web Analyst - 3Dlabs

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



RE: IIS 5 + Tomcat 4.1.24 + JK2 Connector problem

2003-06-25 Thread David Legg
Do you have an entry for [shm] in your workers2.properties file?  It is
essential that it is present for the JK2 connector to work correctly.  This
didn't appear in any documentation I found.

Most of the error messages you mention are there even in working
configurations so don't worry about them.

Regards,

David Legg
Webmaster - 3Dlabs
Phone: +44 (0)118 982 8254
http://www.3dlabs.com
mailto:[EMAIL PROTECTED]



-Original Message-
From: Hertenstein Alain [mailto:[EMAIL PROTECTED]
Sent: 25 June 2003 14:45
To: 'Tomcat Users List'
Subject: IIS 5 + Tomcat 4.1.24 + JK2 Connector problem


Hi everybody,

Seems like this problem is quite known, so I hope you can help me (after
searching the web and reading Apache docs, I can't figure it out) :

I've installed IIS, JDK 1.4.1_01 and Tomcat 4.1.24 on a Win2k Server
computer : everything works fine, all pages work (http://localhost for IIS
and http://localhost:8080 for Tomcat, as well as the JSP and Servlets
examples).
After that I followed the instructions on the jakarta web site to install
the JK2 connector : after some trials (and some typo errors from my side in
the Registry...), I finally got that green arrow in the IIS Console
regarding the isapi_redirector2.dll ! Seems everything was working fine,
but...

1) the http://localhost/examples/ page doesn't show up (web error page
instead)
2) in the Event Log, the following error entries appear each time I try to
access the upper URL :

--
Error: [jk_worker_lb.c (192)]: lb.getWorker() reenable ajp13:localhost:8009 

Error: [jk_endpoint.c (90)]: workerEnv.init() create slot epStat.0 failed

Error: [jk_worker_lb.c (402)]: lb.service() worker failed 12 for
ajp13:localhost:8009

Error: [jk_worker_lb.c (415)]: lb.service() unrecoverable error...
---

I don't know what to do, I think all configuration is correct but still it
doesn't work.

Can anyone help me please ? Thanks a lot
Alain

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



RE: RE : IIS 5 + Tomcat 4.1.24 + JK2 Connector problem

2003-06-25 Thread David Legg
Aha!  I thought so :-)

Here's my workers2.properties file: -


#
# workers2.properties
#
[shm]
file=C:\tomcat4\logs\shm.file
size=1048576

[channel.socket:127.0.0.1:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp
--

The [shm] entry seems to be some sort of shared memory area and I've seen
references to something called the 'scoreboard' in conjunction with it.
Anyway, the bottom line is you need this entry for JK2 to work on IIS.  If
you look in your W2k Event log you'll probably also notice a tell-tale
Tomcat application error similar to this: -

  Error: [jk_shm.c (333)]: shm.init(): No file

Hope this helps.

Regards,

David Legg
Webmaster - 3Dlabs
http://www.3dlabs.com
mailto:[EMAIL PROTECTED]



-Original Message-
From: Hertenstein Alain [mailto:[EMAIL PROTECTED]
Sent: 25 June 2003 15:32
To: 'Tomcat Users List'
Subject: RE : IIS 5 + Tomcat 4.1.24 + JK2 Connector problem


Hi David,

No I don't have any, here is what I have in my workers2.properties file :


#Define the communication channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp
-

What is that [shm] entry you mentioned ?

Thanks again,
Alain


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



RE: Connectors for IIS/Tomcat SHOULD make sense

2003-06-24 Thread David Legg
I know this will seem trivial... but I've set several systems up now under
NT4/W2k JK1 (both versions) and more recently JK2 and you can't beat a good
reboot between changes to the configuration.  Have you rebooted your server
at all during these many tests?

Part of the trouble is there are several flavors of JK1 connector and some
don't work!  Here's part of my diary for 7th February 2003...

  Decided to try and fix the problem with rebooting the server and Tomcat
not coming up properly.  Documentation is scarce!  I already knew that there
were two versions of redirector files; one called  isapi_redirect.dll and
one called isapi_redirector.dll.  I had the notion that the latter was newer
and that is what is currently being used on the site.  I soon discovered
this is no longer the case and the latest version is now called
isapi_redirect.dll and can be found here
(http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.
2/bin/win32/).

Guess my horror when I discovered a couple of weeks ago that there was yet
another connector available (JK2) and all the configuration syntax was
different yet again!

Regards,

David Legg
Webmaster - 3Dlabs
http://www.3dlabs.com
mailto:[EMAIL PROTECTED]

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



RE: Having a problem with IIS and Tomcat 4.1.24 config

2003-06-11 Thread David Legg
Jeff,

I downloaded the JK2 binary from: -

 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.
2/bin/win32/

and installed it from the JK2 quick start guide at: -

 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/jk2/confi
ghowto.html

However, the only problem I found was the binaries don't come with any
sample configuration files and the JK2 quick start web page mentioned above
makes no reference to the [shm] entry you MUST add to the
workers2.properties file to make it all work.   This is where Dom came to my
rescue by posting his working config files.  So in the spirit of this mail
list here are my working settings: -

jk2.properties 

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelJni
#
# The default port is 8009 but you can use another one
channelSocket.port=8009

# Default: 
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess


workers2.properties ---

[shm]
file=C:\tomcat4\logs\shm.file
size=1048576

[channel.socket:127.0.0.1:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp



Hope that helps.


David Legg
Webmaster - 3Dlabs
Phone: +44 (0)118 982 8254
http://www.3dlabs.com
mailto:[EMAIL PROTECTED]



-Original Message-
From: Jeff Cummings [mailto:[EMAIL PROTECTED]
Sent: 11 June 2003 00:18
To: 'Tomcat Users List'
Subject: RE: Having a problem with IIS and Tomcat 4.1.24 config


Thanks Dav,
That being said - where do I get isapi_redirector2.dll, documentation and
examples of jk2.properties
 workers2.properties files.


Jeff



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



RE: Having a problem with IIS and Tomcat 4.1.24 config

2003-06-10 Thread David Legg
Hi Jeff,

What you need to be aware of (and this took a while to sink in for me) is
there are at least two different connectors out there; JK1 and JK2.  Each
has a different set of files associated with it and the formats are
different too.

JK1 used the following files: -

  uriworkermap.properties
  workers.properties
  isapi_redirector.dll (or isapi_redirect.dll depending which version you
used)

JK2 uses the following files: -

  jk2.properties
  workers2.properties
  isapi_redirector2.dll

So if you are talking about uriworkermap.properties you are probably trying
to use the JK1 connector.  I used JK1 with Tomcat 4.0.3 but I believe you
are supposed to use JK2 for Tomcat 4.1.24.

Dom is right about that shm file entry though in the JK2 file.  The JK2
connector won't work unless you include the entry in the workers2.properties
file.

David Legg
Webmaster - 3Dlabs



-Original Message-
From: Dominic Parry [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 09:27
To: Tomcat Users List
Subject: Re: Having a problem with IIS and Tomcat 4.1.24 config


Hi Jeff

Those lines belong in workers.properties not uriworkermap.properties

You can point it to the logs folder, but it's more of a virtual memory file.
It is necessary though, to get tomcat to work with IIS, I have found.

Good luck!
  - Original Message - 
  From: Jeffrey Cummings 
  To: 'Tomcat Users List' 
  Sent: Tuesday, June 10, 2003 12:48 AM
  Subject: RE: Having a problem with IIS and Tomcat 4.1.24 config



  Excuse my ignorance, but I am not sure which file these lines belong to.
Is
  it the uriworkermap.properties file? What is shm.file a log file? Could I
  have the file parameter point to C:\Jakarta-4.1.24\logs\shm.file since all
  my log files are in that directory?

  Jeff


  -Original Message-
  From: Dominic Parry [mailto:[EMAIL PROTECTED]
  Sent: Monday, June 09, 2003 1:52 PM
  To: Tomcat Users List
  Subject: Re: Having a problem with IIS and Tomcat 4.1.24 config

  Hi

  Sure can, here is an examples of mine:

  # Define the communication channel
  [shm]
  file=C:\Program Files\Apache Group\Tomcat 4.1\logs\shm.file
  size=1048576

  [channel.socket:127.0.0.1:8009]
  info=Ajp13 forwarding over socket
  tomcatId=localhost:8009

  # Map the Tomcat examples webapp to the Web server uri space
  [uri:/examples/*]
  info=Map the whole webapp

  [uri:/admin/*]

  [uri:/manager/*]

  [uri:/DynaServlet/*]

  [uri:/HamiltonBank/*]

  hope this helps.

  Dom
- Original Message -
From: John Turner
To: Tomcat Users List
Sent: Monday, June 09, 2003 6:25 PM
Subject: Re: Having a problem with IIS and Tomcat 4.1.24 config



I'm pretty sure Jeffrey did...at least as far as I can tell.  Do you
have
some examples of the correct way?

John

On Mon, 9 Jun 2003 18:16:49 +0200, Dominic Parry [EMAIL PROTECTED]
wrote:

 you need to specify your uri's in workers.properties
 - Original Message - From: John Turner To: Tomcat Users List
 Sent: Monday, June 09, 2003 6:13 PM
 Subject: Re: Having a problem with IIS and Tomcat 4.1.24 config



 Sorry, I'm stumped, and I don't use IIS enough (hardly at all) to help
 out with nitty gritty stuff.  Hopefully someone else has more insight.

 John

 On Mon, 9 Jun 2003 10:43:27 -0400, Jeffrey Cummings [EMAIL PROTECTED]
 wrote:

  Yes I did install the filter and it does have the green arrow.
  This as the log file, mod_jk_iis.log when I start IIS
  [jk_uri_worker_map.c (156)]: Into 
 jk_uri_worker_map_t::uri_worker_map_alloc
  [jk_uri_worker_map.c (196)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open
  [jk_uri_worker_map.c (211)]:
jk_uri_worker_map_t::uri_worker_map_open,
  rule
  map size is 5
  [jk_uri_worker_map.c (267)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open,
  match rule /servlet/=ajp13 was added
  [jk_uri_worker_map.c (267)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open,
  match rule /examples/=ajp13 was added
  [jk_uri_worker_map.c (256)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open,
  suffix rule /examples/.jsp=ajp13 was added
  [jk_uri_worker_map.c (267)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open,
  match rule /examples/servlet/=ajp13 was added
  [jk_uri_worker_map.c (267)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open,
  match rule /admin/=ajp13 was added
  [jk_uri_worker_map.c (296)]: Into 
 jk_uri_worker_map_t::uri_worker_map_open,
  there are 5 rules
  [jk_uri_worker_map.c (317)]:
jk_uri_worker_map_t::uri_worker_map_open,
  done
  [jk_worker.c (82)]: Into wc_open
  [jk_worker.c (207)]: Into build_worker_map, creating 1 workers
  [jk_worker.c (213)]: build_worker_map, creating worker ajp13
  [jk_worker.c (138)]: Into wc_create_worker
  [jk_worker.c (152)]: wc_create_worker, about to create instance
ajp13

RE: TOMCAT IIS and html

2003-06-09 Thread David Legg
Hi Dom,

It depends how you have configured your connector.

If you have set up your workers.properties or workers2.properties file to
forward /examples/*.jsp to Tomcat then Tomcat will only see JSP file
requests and all the HTML or GIF etc requests will be handled by IIS.

If however you put /examples/* in the file then IIS will forward all and
every request on to Tomcat for processing and IIS won't handle anything in
that directory.


David Legg


-Original Message-
From: Dominic Parry [mailto:[EMAIL PROTECTED]
Sent: 09 June 2003 08:11
To: Tomcat Users List
Subject: TOMCAT IIS and html


Hi

Can I safely assume that When tomcat is configured with IIS that IIS will
always serv anything but JSP's and Servlets? Even when HTML files etc lie
within Tomcat contexts?

Thanks

Dom

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



RE: Newbie Q:How to prevent Directory listing in Tomcat?

2003-06-09 Thread David Legg
Hi Bob,

In version 4.x Tomcat look for the file TOMCAT_HOME/conf/web.xml

This file sets all the default web application settings.  Look for the tag
sequence: -

  param-namelistings/param-name

And change the param-value tag below it from 'true' (the default setting)
to false.

Hope that helps.


David Legg


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 09 June 2003 00:02
To: [EMAIL PROTECTED]
Subject: Newbie Q:How to prevent Directory listing in Tomcat?


How can I prevent a client from listing the contents of my web appl. 
directories without having to put an 'index.html' in the base of each
directory?

Thanks.

Bob.

P.s.: I can find any solution(s) in the Tomcat-user archive:

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



RE: TOMCAT IIS and html

2003-06-09 Thread David Legg
 Ok. So is there a way to exclude certain extensions. *.html *.jpg, etc.

As far as I know there is no way to selectively exclude file extensions.
All you can do is selectively include which file types should be passed on
to Tomcat.

Usually that is not a problem because you either want IIS to handle
everything except JSP files for speed reasons or you want Tomcat to handle
ALL files because that context is part of a secure realm.


David Legg

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



RE: Where do I get MOD_JK2 - directory is empty

2003-06-09 Thread David Legg
I got my copy from : -

 
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.
2/bin/win32/

David Legg


-Original Message-
From: Kevin Passey [mailto:[EMAIL PROTECTED]
Sent: 09 June 2003 12:38
To: Tomcat (E-mail)
Subject: Where do I get MOD_JK2 - directory is empty


The d/l page is empty - what's wrong??

http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4
/bin/win32/

Regards

Kevin

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

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



RE: how to unsubscribe - tried twice!

2003-06-09 Thread David Legg
Have you tried sending an email to the following address...

[EMAIL PROTECTED]
org

Maybe the address you are sending from is not the one you subscribed with?

It may take a few hours to have any effect.

David Legg


-Original Message-
From: Tomcat User [mailto:[EMAIL PROTECTED]
Sent: 09 June 2003 17:37
To: 'Tomcat Users List'
Subject: RE: how to unsubscribe - tried twice!


I have as well...anyone have any ideas??

Dan LeBaron, CSSA
Ingenuit Technologies, Inc
Complete Business Technology Solutions

P 503.267.4089
F 888.861.9051
www.ingenuittechnologies.com
[EMAIL PROTECTED]

-Original Message-
From: Keith Adams [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 8:25 AM
To: Tomcat Users List
Subject: how to unsubscribe - tried twice!

I tried twice, with the subject line:
[EMAIL PROTECTED], on Friday, and I'm still
receiving the emails. I even received a confirmation that I'd been
unsubscribed.  Has anybody else experienced this?
 
Keith

 




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

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



Connecting IIS 5.0 to Tomcat 4.1.24?

2003-06-04 Thread David Legg
I'm trying to set up the latest release of Tomcat (4.1.24) on a W2K server
running IIS 5.0.  Tomcat is happily running as a service and responding to
web requests on port 8080.  I'm using the tomcat-4.1.24-LE-jdk14.zip and
I've installed Java 1.4.1_02

Has anyone managed to get IIS to talk to this version of Tomcat?

Following hints in the Tomcat documentation I've tried installing JK2
version 2.0.2 but without success.  For simplicity I've tried hooking up the
/examples context.  http://localhost:8080/examples/jsp works fine but
http://localhost/examples/jsp gives me a 404 error.

The registry file contains: -

  [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
Redirector\2.0]
  serverRoot=c:\\tomcat4
  extensionUri=/jakarta/isapi_redirector2.dll
  workersFile=c:\\tomcat4\\conf\\workers2.properties
  logLevel=INFO

The jk2.properties file contains: -

  # The default port is 8009 but you can use another one
  channelSocket.port=8009

The workers2.properties files contains: -

  [channel.socket:localhost:8009]
  info=Forwarding over socket connection to local tomcat instance.
  host=localhost
  port=8009

  [ajp13:localhost:8009]
  info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol.
  channel=channel.socket:localhost:8009

  [uri:/examples/*]
  info=JSP examples
  context=/examples

I've configured several versions of Tomcat over the years and am getting
used to spending a couple of weeks tinkering with it each time :-)  I'd love
to hear from anyone who has got it working.

Regards,

David Legg
Webmaster - 3Dlabs
http://www.3dlabs.com
mailto:[EMAIL PROTECTED]

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



RE: Connecting IIS 5.0 to Tomcat 4.1.24? - SOLVED

2003-06-04 Thread David Legg
Hi Dom,

Thanks ever so much for your help.

The magic missing ingredient turned out to be that [shm] entry in the
workers2.properties file.  I had seen it mentioned in various bits of
documentation but got the impression it was something to do with connecting
to an Apache server via shared memory.

You were also spot on about checking the event log.  There was an entry in
there warning: -

  Error: [jk_shm.c (333)]: shm.init(): No file

I also noticed the following 3 warnings which are still there after the
system started working: -

Error: [jk_worker_lb.c (415)]: lb.service() unrecoverable error...
Error: [jk_worker_lb.c (402)]: lb.service() worker failed 12 for
ajp13:127.0.0.1:8009
Error: [jk_endpoint.c (90)]: workerEnv.init() create slot epStat.0 failed

I'm presuming they aren't serious but I'll keep an eye on them.

Anyway, thanks again.  Now all I have to do is install Cocoon followed by
the Lenya Content Management System and I'm ready :-)

Regards,

David Legg
Webmaster - 3Dlabs
Phone: +44 (0)118 982 8254
http://www.3dlabs.com
mailto:[EMAIL PROTECTED]

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