Hello

 

I have a /myApp/displayDatasetPage which is used to display content. In this
page, I incorporate the default Tomcat login code as follows:

 

<div id = "login">

                <form action='<%= response.encodeURL("/myApp/loginPage") %>'
method = "post">

                    <table border = "0">

                        <tr>

                            <th align = "right">Username</th>

                            <td align = "left"><input type = "text" name =
"userName"></td>

                        </tr>

                        <tr>

                            <th align = "right">Password</th>

                            <td align = "left"><input type = "password" name
= "password"></td>

                        </tr>

                        <tr>

                            <td align = "right"><input type = "submit" value
= "Log In"></td>

                            <td align = "left"><input type = "reset"></td>

                        </tr>

                    </table>                    

                </form>

            </div>

 

And path /myApp/loginPage is protected in web.xml. This seems to be alright
but if a user doesn't enter login details, or enters incorrect login
details, and then presses 'Log in' the page simply reloads. I am assuming
that this is because I have no login error page working alongside use
/myApp/displayDatasetPage to catch login exceptions. 

 

Is it possible to use /myApp/displayDatasetPage to display login errors? Or
can anyone say tell me if I catch Tomcat's login verification process  to do
this?

 

Thanks

 

Mr Morgan.

Reply via email to