Results 1 to 2 of 2
Thread: jsp:forward problem
- 02-11-2011, 01:11 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 1
- Rep Power
- 0
jsp:forward problem
Hi!
I'm pretty new to JSP and JSTL. At the moment I'm trying to create a simple login system and ran into a weird problem I haven't been able to solve.
I have a login.jsp page which has a standard html form for username and password and also a JSTL core tag that looks like this:
<c:if test="${sessionScope.login == 'ok'} >
<jsp:forward page="LoginServlet" />
</c:if>
The idea is that if the user has already logged in succesfully, the LoginServlet creates a session which has login attribute with a value 'ok'. If the user after that comes to the login.jsp page, the page forwards the user automatically. Well, it works on some level...
The problems start if I happen the restart the Tomcat server my application runs on. Before the restart everything is working as it should be. After the restart when I come to the login page, it tries to forward me even though there should be no session nor login attribute anywhere! The same thing happens even if I invalidate the session or assign the login attribute null values before restarting the server.
I honestly have no idea what's going on and it would be great if someone could help me with this.
- 03-22-2011, 07:00 PM #2
Member
- Join Date
- Mar 2011
- Location
- chennai
- Posts
- 55
- Rep Power
- 0
Similar Threads
-
Forward references
By Norm in forum Advanced JavaReplies: 2Last Post: 06-30-2010, 02:19 AM -
jsp:forward vs jsp:redirect / XML tag if
By lse123 in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 01-25-2010, 08:23 AM -
[SOLVED] Problem using jsp:forward to a servlet
By Norm in forum Java ServletReplies: 6Last Post: 04-27-2009, 09:49 PM -
<jsp:include> Vs <%@include> Vs <jsp:forward> Vs RequestDispatcher .forward/includeVs
By freddieMaize in forum Java ServletReplies: 5Last Post: 07-29-2008, 02:13 PM -
jsp:forward action
By Java Tip in forum Java TipReplies: 0Last Post: 12-24-2007, 10:04 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks