Tomcat - Form based declarative Security


Web tier: servlets, JSP, Web frameworks: Tomcat - Form based declarative Security

  1. Tomcat - Form based declarative Security (3 messages)

      I am using Tomcat 4.1.30 on Windows 2000 Prof.
    Whenever the user tries to access any JSP page in the application at random in a new browser,without logging in first, (by copying and pasting the url, if he knows!), my application redirects the user to a login page.I am using FORM based authentication.
    After logging in successfully, Tomcat always seems to be displaying the JSP page or URL which he initially requested.
    But I am interested in displaying the Welcome page(search.jsp) listed in the web.xml, which happens to be the JSP page in my application, which has the correct navigational links.
    Any ideas of how to do this?
    The following is my web.xml.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">
        <display-name>This is the display name of my J2EE component</display-name>
        <description>This is the description of my J2EE component</description>
    <web-resource-name>Second Web Protected Resources</web-resource-name>



    Threaded Messages (3)

  2. more details...[ Go to top ]

    The first JSP page is search.jsp in my application (mentioned in the welcome file list in web.xml). This contains the correct navigational links and also loads some data into the session. It is essential that the user is redirected to this JSP page always after a successful login.

    Would appreciate any help on this,

  3. I have the same problem!
    The only solution I could find is some artifact (custom tag, include, method in action superclass with struts, etc.) that checks the session have some attribute. If not, it redirects the user to a specified page.
    I don't like this solution very much. I'd really like to have a session start or logon event that automatically executes when the user logs in and put there that logic you mention (session set up, redirect to proper pages, audit, etc.)
  4. More info: