How can I pass the value of 'j_username' to the destination page when using form based authentication? I'm also using the following hidden field: <input type='hidden' name='j_uri' value='/update.jsp'> So, I want the page 'update.jsp' to be able to use the value contained in 'j_username'. Thanks, Drew
Could you give a simple example of using filters to log in to a web application? I've never used filters before. Thanks, Drew
Joined: Jan 07, 1999
Well, bear in mind that filters are not covered by the current SCWCD, so if you are studying for the certification you don't need to get hung up on them. Anyway. A typical use of filters for security might map a filter to all page requests from the web application:
Then in the filter, do something like the following: is this request for the login page? if so, let it through. does a session already exist with valid credentials? if so let it through. If not, forward to the login page.