Two tips:
1. When reporting a problem to a group like this, post your errors. Those
mean a lot more than "my servlet fails."
2. Use the forward() method of RequestDispatcher, not callPage(). There's
no such thing as callPage() in newer versions of the Servlet API.
Scott Stirling
West Newton, MA
-----Original Message-----
From: ����(�������Ƥ�)ZhangQi
Hi all,
I have a simple servlet .In doPost Method , it called a jsp page, but
failed in every time.
Can you tell me what's wrong? thank you! The codes of servlet are
metioned below.
import java.io.*;
import java.lang.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.sun.server.http.*;
import com.ibm.servlet.*;
public class TempletSave extends javax.servlet.http.HttpServlet {
}
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) {
try
{
((HttpServiceResponse)response).callPage("/jsp/SaveError.jsp",
(HttpServiceRequest)request);
}
catch(ServletException e)
{
........
}
catch(IOException e)
{
........
}
}
===========================================================================
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