"./AuthLogin" and "AuthLogin" still don't work.

It works with the fully qualified path
"http://yourserver:port/yourwebapp/AuthLogin"; or "../../AuthLogin"

Thank you.


-----Original Message-----
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Sunday, February 14, 2010 5:53 AM
To: Tomcat Users List
Subject: Re: Tomcat not seeing servlet

2010/2/14 David Short <dsh...@san.rr.com>:
>    <servlet-mapping>
>
>        <servlet-name>AuthLoginServlet</servlet-name>
>
>        <url-pattern>/AuthLogin</url-pattern>
>
>    </servlet-mapping>

The above is correct.

> Login.jsp snippet:
> <form name="login" method="post" action="/AuthLogin">

Try this instead:

 <form name="login" method="post" action="AuthLogin">

or this
 <form name="login" method="post" action="./AuthLogin">



The mappings in web.xml are relative to your webapp, so you'll have to call
http://yourserver:port/yourwebapp/AuthLogin
unless your webapp is named ROOT (case-sensitively).


The <form> is processed by browser, and action="/AuthLogin"> instructs
it to create a relative URL using "/AuthLogin" for the path. The
starting "/" tells the browser that it is an absolute path on that
server.  My proposals above turn this into a relative path (relative
to the URL of the page that displayed that login.jsp snippet).

See "relative URLs" in HTML spec for more details.

Best regards,
Konstantin Kolinko

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

Reply via email to