Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JSP equivalant of ASP code

Options
  • 27-01-2010 1:13pm
    #1
    Registered Users Posts: 1,477 ✭✭✭


    I have the following ASP code and need to find how to get the same to work in a jsp page. Can anyone help? Is there a rs.EOF in jsp?

    ASP as follows:
    <code>
    If rs.EOF Then
    Response.Redirect ("retry.asp")

    Else
    Session("logged_in") = "true"
    Response.Redirect ("welcome.asp")
    End If

    </code>


Comments

  • Registered Users Posts: 378 ✭✭sicruise


    Is rs a result set from a sql query?
    <%@ page pageEncoding="ISO-8859-1" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
    <c:choose>
    <c:when test="${rs == null}">
    <c:redirect url="retry.asp" />
    </c:when>
    <c:otherwise>
    <c:set var="logged_in" scope="session" value="true"/>
    <c:redirect url="welcome.asp" />
    </c:otherwise>
    </c:choose>
    


Advertisement