You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jon Wilmoth <jo...@yahoo.com> on 2004/08/30 08:10:46 UTC

404 response form authentication problem

I have a login form that works fine in my local
development environment with a single webapp deployed
to the default localhost "host".  However, in a hosted
environment with multiple "host"s defined in my
server.xml Tomcat returns a 404 response and a blank
page.  The html form follows the servlet spec
definition, the application deploys successfully in
(confirmed via log files), and I'm successfully
redirected to my login page when trying to access a
protected resource.  I have cookies enabled in my
browser and I see that a call to
request.isRequestedSessionIdFromCookie() = true in my
log files.  If I change the web.xml's <auth-method>
element from FORM to BASIC, I get challenged for a
login and then successfully redirected.  I'm at a loss
for why this isn't working any help/thoughts are
greatly appreciated!

<form method="POST" name="login"
action="j_security_check">
<input type="text" name="j_username"/>
<input type="password" name="j_password" />
<input type="submit" name="Submit"
value="Login"/><input type="reset" name="cancel"
value="Reset"/>
</form>

I've defined a host in the server.xml that uses a
sub-domain.  I also have another host running on the
same Tomcat instance

<Host name="dev.mydomain.com" debug="99"
appBase="webapps" unpackWARs="true" autoDeploy="true"
    	xmlValidation="true" xmlNamespaceAware="false">
</Host>

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