Thanks Leo. I do have the Web Service Extension created. -----Original Message----- From: Leo Donahue - PLANDEVX [mailto:leodona...@mail.maricopa.gov] Sent: Thursday, June 03, 2010 4:34 PM To: 'Tomcat Users List' Subject: RE: How can I get the user value in the request forwarded to my Tomcat in my Java app?
I can't remember if anyone has already mentioned this. If so, my apologies. In IIS, do you have a "Web Service Extension" that is mapped to the isapi_redirect.dll, and that is set to "allowed"? -----Original Message----- From: Savoy, Melinda [mailto:melindasa...@texashealth.org] Sent: Thursday, June 03, 2010 1:53 PM To: 'Tomcat Users List' Subject: RE: How can I get the user value in the request forwarded to my Tomcat in my Java app? I think I was finally able to TEST that my tomcat connector and its respective config files have been setup correctly. I think I have narrowed my problem to an IIS Directory Security ISSUE on jakarta. If anyone has run into this issue can you please respond to the following problem: In IIS I have the Default Web Site setup with: ISAPI Filters: jakarta and it points to C:\Server\Tomcat 6.0\bin\isapi_redirect.dll And the Directory Security is: Enable anonymous access (checked only) In IIS I have the jakarta virtual directory setup with: Where the local path is: C:\Server\Tomcat 6.0\bin And the Directory Security is: Integrated Windows authentication (checked only) The result I get in my IE browser is: You are not authorized to view this page You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept. -------------------------------------------------------------------------------- Please try the following: Contact the Web site administrator if you believe you should be able to view this directory or page. Click the Refresh button to try again with different credentials. HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration. Internet Information Services (IIS) But when I change the jakarta Directory Security to the following I am able to get to the ERROR.jsp page in my application on Tomcat: Directory Security changed to Anonymous access (checked only) The ERROR.jsp page comes up because I do not have a USER value in the request. It is empty as depicted from the isapi log: [Thu Jun 03 15:27:24.665 2010] [948:3148] [debug] jk_isapi_plugin.c (3108): Service protocol=HTTP/1.1 method=GET host=167.99.60.10 addr=167.99.60.10 name=scmisdev port=80 auth= user= uri=/pics/plus.jpg Any suggestions or direction on how I can remedy this issue would be appreciated. Thank you. -----Original Message----- From: Savoy, Melinda Sent: Thursday, June 03, 2010 12:53 PM To: 'Tomcat Users List' Subject: RE: How can I get the user value in the request forwarded to my Tomcat in my Java app? Let me try to answer Andre's questions below as well as communicate the results I got given the settings I have in the Windows 2003 server and ANY HELP or DIRECTION would be GREATLY APPRECIATED : I spoke to the guy who had setup our Tomcat server and he said that the SECOND HOST in our server.xml file was there to define the virtual host that is in our enterprise DNS (see settings below). The baseapp="scmisapp" which is a directory in our tomcat server: C:\Server\Tomcat 6.0\scmisapp I removed the SECOND virtual directory as you instructed and now I'm getting Windows login dialog boxes when trying to go the URL: http://scmisdev. If we could start from the following settings and if someone could let me know what I'm doing wrong to get the error (see below) I'm getting it would be greatly appreciated: Workers.properties file: worker.scmisWorker.type=ajp13 worker.scmisWorker.host=localhost (I'm not sure if this should match the host name="scmis" in my server.xml file or not) worker.scmisWorker.port=8009 uriworkermap.properties file: /scmisdev/*=scmisWorker (this matches the virtual host that we have defined in the enterprise DNS and what we use to get to this server via the URL in our browsers (IE) http://scmisdev ). Server.xml: <Host name="localhost" appBase="webapps" unpackWARs="false" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> --> </Host> <Host name="scmis" appBase="scmisapp" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false"> <Alias>scmisdev</Alias> <Alias>scmisdev.texashealth.org</Alias> </Host> In IIS I have the Default Web Site setup with: ISAPI Filters: jakarta and it points to C:\Server\Tomcat 6.0\bin\isapi_redirect.dll And the Directory Security is: Enable anonymous access (checked only) In IIS I have the jakarta virtual directory setup with: Where the local path is: C:\Server\Tomcat 6.0\bin And the Directory Security is: Integrated Windows authentication (checked only) The result I get in my IE browser is: You are not authorized to view this page You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept. -------------------------------------------------------------------------------- Please try the following: Contact the Web site administrator if you believe you should be able to view this directory or page. Click the Refresh button to try again with different credentials. HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration. Internet Information Services (IIS) -------------------------------------------------------------------------------- Technical Information (for support personnel) Go to Microsoft Product Support Services and perform a title search for the words HTTP and 401. Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled About Security, Authentication, and About Custom Error Messages. -----Original Message----- From: Savoy, Melinda Sent: Wednesday, June 02, 2010 5:12 PM To: Tomcat Users List; Tomcat Users List Subject: RE: How can I get the user value in the request forwarded to my Tomcat in my Java app? Andre, First my apologies for forgetting my earlier setup within my Windows XP box and therefore as you say not learning what I had done previously. Second - this Windows 2003 server was already setup and the second host was created in order that the user could enter a URL of http://scmisdev and then get to the application which is how it has been working. In your comment: "It seems that you have not learned a lot, or forgotten what you previously learned. Why do you need this last "virtual directory" in IIS ? The "jakarta" virtual directory will already re-direct (or rather "proxy") all the calls to "/scmisdev/*" to Tomcat. You do not want IIS to go directly put its nose in the Tomcat directories. You want it to go through the isapi redirector for that, which you already do with the jakarta virtual directory setup." What do I put in the uriworkermap.properties file that redirects to where the JSP's are? The directory path in Tomcat as to where the app is located is: C:\Server\Tomcat 6.0\scmisapp\ROOT\WEB-INF You are correct that I'm probably mixing up 2 things but I'm trying retain all the info that you and Ranier have each given but sometimes it would appear to me to be confusing. Lastly, let me state again my apologies. It is NOT my intent to waste the time of you or anyone else on this list just trying to get some help. I will try again in the morning. Regards. ________________________________________ From: André Warnier [...@ice-sa.com] Sent: Wednesday, June 02, 2010 16:29 To: Tomcat Users List Subject: Re: How can I get the user value in the request forwarded to my Tomcat in my Java app? Savoy, Melinda wrote: > I finally got my Windows 2003 development box setup with the Tomcat Connector > and IIS 6.0. The following is my setup: > > In the server.xml file I have the following in the HOST element: > > <!-- Define the default virtual host > Note: XML Schema validation will not work with Xerces 2.2. > --> > <Host name="localhost" appBase="webapps" > unpackWARs="false" autoDeploy="false" > xmlValidation="false" xmlNamespaceAware="false"> > > <!-- SingleSignOn valve, share authentication between web applications > Documentation at: /docs/config/valve.html --> > <!-- > <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> > --> > > <!-- Access log processes all example. > Documentation at: /docs/config/valve.html --> > <!-- > <Valve className="org.apache.catalina.valves.AccessLogValve" > directory="logs" > prefix="localhost_access_log." suffix=".txt" pattern="common" > resolveHosts="false"/> > --> > > </Host> > > <Host name="scmisdev" appBase="scmisapp" > unpackWARs="true" autoDeploy="false" > xmlValidation="false" xmlNamespaceAware="false"> > > <Alias>scmisdev</Alias> not necessary, since this is already the hostname > <Alias>scmisdev.texashealth.org</Alias> > </Host> Why this second Host anyway ? > > In my uriworkermap.properties file: > > /scmisdev/*=scmisWorker > /scmisdev/*.jsp=scmisWorker > /scmisdev/servlet/*=scmisWorker the first one covers the other 2, so why have them ? > > In my workers.properties file: > > # workers.properties from = > http://onjava.com/pub/a/onjava/2002/12/18/tomcat.html > # > # This file provides minimal jk configuration properties needed to > # connect to Tomcat. > # > # The workers that jk should create and work with > > worker.list=scmisWorker > > # > # Defining a worker named ajp13w and of type ajp13 > # Note that the name and the type do not have to match. > # > worker.scmisWorker.port=8009 > worker.scmisWorker.host=localhost > worker.scmisWorker.type=ajp13 > > In IIS I have the Default Web Site setup with: > > ISAPI Filters: jakarta and it points to C:\Server\Tomcat > 6.0\bin\isapi_redirect.dll > And the Directory Security is: Enable anonymous access (checked only) > > In IIS I have the jakarta virtual directory setup with: > > Where the local path is: C:\Server\Tomcat 6.0\bin > And the Directory Security is: Integrated Windows authentication (checked > only) > > In IIS I have the scmisdev virtual directory setup with: > > Where the local path is: C:\Server\Tomcat 6.0\scmisapp\ROOT\WEB-INF (points > to WEB-INF directory) > And the Directory Security is: Integrated Windows authentication (checked > only) It seems that you have not learned a lot, or forgotten what you previously learned. Why do you need this last "virtual directory" in IIS ? The "jakarta" virtual directory will already re-direct (or rather "proxy") all the calls to "/scmisdev/*" to Tomcat. You do not want IIS to go directly put its nose in the Tomcat directories. You want it to go through the isapi redirector for that, which you already do with the jakarta virtual directory setup. > > However my result when going to URL http://localhost/scmisdev is: > > HTTP Status 404 - /scmisdev/ > > Type Status report > > Message /scmisdev/ > > Description The requested resource (/scmisdev/) is not available. > > Any suggestions or direction would be greatly appreciated. Ok, what does this error page look like ? Does it look like a Tomcat error page ? Melinda, it seems that you are mixing two issues (again) : - the first is in the basic setup of IIS+Tomcat, and how to set things up so that the URLs which you are interested in are actually redirected to Tomcat in the proper way. - the second is, once the first one is working properly, to set things up so that IIS authenticates users which request these URLs, and that the isapi redirector forwards this authentication to Tomcat (which it does, by default). --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --------------------------------------------------------------------- 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 The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org