> "Balakrishnan, Ajan" wrote:
>
> Hi,
>
> I'm getting ERROR 404 while forwarding to a different page. I don't if
> i'm doing anything stupid here. The
> response.sendRedirect works fine if the page gets an database error message. When
> i get no messges it gives ERROR
> 404.Please help me out. The code is below
>
> FYI, The current JSP page is "http:/localhost:8080/examples/jsp/PRSAS/PRSASLogin.jsp"
>
> <%@ page language="java" import="ActLogin" %>
> <jsp:useBean id="act" scope="session" class="ActLogin" />
>
> <HTML>
> <HEAD>
> <TITLE>PRSAS appraisal</TITLE>
> </HEAD>
> <body>
>
> <%
>
> act.dbConnection();
> act.validateUserId("999999999");
> act.validatePassword("SYSADMIN");
> act.validateUserAccess("999999999");
> act.dbdisconnect();
> request.getSession(true).putValue("NextTime","next");
> %>
>
> <%= act.getError() %>
>
> <%
>
> if (act.getError().equals(""))
> {
> %>
> <jsp:forward
>page="http://localhost:8080/examples/jsp/PRSAS/PRSASSiteInfo.jsp" />
The jsp:forward action takes a URL relative to the servlet context path
as the page attribute value, not an absolute URL as you use. If the servlet
context path is /examples, use:
<jsp:forward page="/jsp/PRSAS/PRSASSiteInfo.jsp" />
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html