Try using a relative path for your redirected string instead of an absolute
path, i.e replace d:/htdocs/index.jsp?sort=1 with
/index.jsp/?sort=1 if displayed page and index are in the same directory , else
/../htdocs/index.jsp?sort=1 or whatever that matches your directory structure .
Santosh.
achang <[EMAIL PROTECTED]> on 07/04/2000 01:01:39 AM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Santosh Daryani/IT/Aon Consulting)
Subject: Fw: help me!!
Forwarded by achang <[EMAIL PROTECTED]>
----------------------- Original Message -----------------------
From: achang <[EMAIL PROTECTED]>
To: "<[EMAIL PROTECTED]>" <<[EMAIL PROTECTED]>>
Date: Mon, 03 Jul 2000 09:11:05 +0800
Subject: help me!!
----
hello.
I use <jsp:forward page='redirectstr'/> in iplanet server 4.1.but it
report: Can't find file d:/htdocs/index.jsp?sort=1.the file index.jsp
is here.
code:
<%! int type=1;%>
<%! int sort=1;%>
<%! String redirectstr=null;%>
<%
String typestr=request.getParameter("type");
if (typestr!=null){
type=Integer.valueOf(typestr).intValue();
}
String sortstr=request.getParameter("sort");
if (sortstr!=null){
sort=Integer.valueOf(sortstr).intValue();
}
try{
switch (type){
case 1:
redirectstr="index.jsp?sort="+sort;
break;
case 2:
redirectstr="land.jsp?sort="+sort;
break;
case 3:
redirectstr="utlility.jsp?sort="+sort;
break;
........(more)
}
}catch(Exception e){
out.println(e.getMessage());
}
%>
<jsp:forward page='<%=redirectstr%>' />
--
achang <[EMAIL PROTECTED]>
--------------------- Original Message Ends --------------------
--
achang <[EMAIL PROTECTED]>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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