User Authentication using Servlet and JSp

Hi,

I am developing a web app where i need to implement user Authentication to allow members to view and upload files on a certain directory say /data

For this i am using a servlet as a controller which then forwads request to other jsps/servlets based on user response. I tried using servlet mapping in web.xml so that all browser requests would be directed to controller servlet and would branch from there on. However the problem all RequestDispatcher.forward() requests redirected to the servlet putting it in a loop.

Is there another way to achieve this. (Apart from using form-based Basic Authentication).

I am using Resin 1.2.8 servlet/jsp container.

Any response as soon as possible would be appreciated.

Thanks,

Kushagra

[796 byte] By [kushM] at [2007-9-26 5:05:36]
# 1

RequestDispatcher.forward() cause the HTTP request to be sent through the request processing flow as if the original request for the resource being forwarded to.

It seems the servlet mapping you are talking about in web.xml should be made more specific. i.e. the mapping should be such that only your so called controller servlet will match up.

You might want to specify the mapping for the controller servlet to be noticeably/effectively different from the mapping for other servlets and JSPs.

neville_sequeira at 2007-6-29 19:04:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...