Hi all,
I have no problem using response.sendRedirect(URL); when I pass parameters to
my JSP page but what I also want to do is if I do not pass anything or by
default when I initialize the JSP w/out any parameters I want it to redirect
user to my main.html any Ideas by default? the code is below
/* start */
<%@ page import ="java.io.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%
//COPY from parameters to variables
String prm = request.getParameter("HOME");
if (prm.equals("HOME"))
{
response.sendRedirect("./main.html");
}
if (prm.equals("SAS"))
{
response.sendRedirect("./sasdoc/sashtml/default.htm");
}
%>
/* end */
Thank you.
Paul
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets