tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: How can I get the user value in the request forwarded to my Tomcat in my Java app?
Date Thu, 03 Jun 2010 21:20:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Melinda,

On 6/3/2010 1:52 PM, Savoy, Melinda wrote:
> 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

A second host is not necessary: any incoming requests for a host that
isn't explicitly defined will go to the "default" host. Unless you need
a complicated configuration, stick to a single <Host> that is the
default, and don't even worry about giving it a special name. We've run
with a single <Host name="localhost"> in production for years.

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

Is that not the expected behavior?

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

If Tomcat is running on localhost (with respect to IIS, of course), then
you do, in fact, want "localhost".

> 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
).

No. http://scmisdev is a URL with only the hostname. If you want to map
/scmisdev/* to your worker, the URL should be http://scmisdev/scmisdev

If you want the URL http://scmisdev to work, you're going to have to
name your web application's deployment WAR file ROOT.war (or
exploded-WAR directory called ROOT) (capitals are required, even on
Microsoft Windows).

> <Host name="localhost"  appBase="webapps"
>             unpackWARs="false" autoDeploy="false"
>             xmlValidation="false" xmlNamespaceAware="false">	
> [...]
> <Host name="scmis" appBase="scmisapp"
> 	unpackWARs="true" autoDeploy="false"
> 	xmlValidation="false" xmlNamespaceAware="false">
>
> 	<Alias>scmisdev</Alias>
> 	<Alias>scmisdev.texashealth.org</Alias>
> </Host>

See above for my comments on dual-Host configurations.


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

What URL are you trying to access? http://scmisdev? If that's it, then
your web server isn't configured to display any (accessible) content
when you make the following request:

GET / HTTP1.1
Host scmisdev

Try again with http://scmisdev/scmisdev/index.jsp (or whatever resource
should be available in your webapp) and let us know how it goes.

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

iEYEARECAAYFAkwIHKQACgkQ9CaO5/Lv0PApDgCghrf6F/mCTUmdBrzRW4FerFrj
zfIAoJh3Cmo2x16Sp+KBhw5xrxIyHe+s
=EEjg
-----END PGP SIGNATURE-----

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


Mime
View raw message