April 10th, 2002, 02:19 PM
I am trying to create a registration/login system, and I have the individual parts working fine. Once a user is registered, I want to direct them straight to the "home" (post login) page instead of having to login in each time. The index page is a JSP page (index.jsp), and I want to forward them to home.jsp if they've already registered.
I have been trying to use a cookie to store the information, but apparently the cookies aren't available to a JSP the first time it is displayed.
Is there another way I should be approaching this? The only APIs I am currently using are JSP/Servlet/JDBC and would prefer to stay there (for now) if possible.
April 11th, 2002, 03:29 AM
I don't know about JSPs not being able to read cookies the first time, but you can definitely do this with servlets instead.
April 11th, 2002, 09:22 AM
The problem seems to have been the fact that I wasn't setting the path of the cookie. I was setting the domain and the age, but not the path. I have everything working great now.