Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

JSP equivalant of ASP code

  • 27-01-2010 01:13PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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