I have this web application using FORM login access but I am having problem directing the navigation to the defined login page when user clicks on a secure link.
You see, I am using a DispatcherServlet as a navigation controller to direct users to the correct page and the URL is coded as:
Where "dispatcher" is the URL name of the DispatcherServlet. In the servlet, "admin" is translated to "/computers/admin/index.jsp" from values coded in web.xml.
Now when I declare the protected url-pattern as "/computers/admin/*" as below, when I click on the above link the login page is bypassed and I can access the admin index page without logging in.
To overcome this I had to hardcode the link in my webpage as: admin
I wish to keep my navigation based on logical names. Is there a work-around or solution to this problem?