Hi everyone, i encountered this error when i want to forward user to different page according to different situation.
The error occurs if the login is null and the cash is null :(
seems like the it does not know where to forward because there is two forward.
is there anywhere to redirect or forward or whatever and don't run the remaining code?
any help on this will be very appreciated.
-----------------------------------------------------------------------------------
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
if (request.getAttribute("login") == null) {
pageContext.forward("login.jsp");
}
if (request.getAttribute("cash") == null) {
pageContext.forward("no_cash.jsp");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Content Page</title>
</head>
<body>
</body>
</html>