Hi All
I'm trying to write a sevlet chaining and i have enabled sevlet chaining in the
JavaWebSever(1.1.3).But if i invoke the servlet, it says "Document contains no data".
What is wrong here? I got stuck in the following line.
What i'm trying to do?
-----------------------
I'm invoking servlet5, that servlet should return sun.html file to the client using
servlet
chaining mechanism.
Any Help?
RequestDispatcher rd=getServletContext().getRequestDispatcher(servletBpath);//**ERORR
AT THIS
POINT **/
==================
SOURCE CODE
==================
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class servlet5 extends HttpServlet
{
public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
System.out.println("Ist Check");
String servletBpath="http://129.149.144.118:8080/sun.html";
System.out.println("2 Check");
RequestDispatcher rd=getServletContext().getRequestDispatcher(servletBpath);//**ERORR
AT THIS
POINT **/
System.out.println("3rd Check");
rd.forward(req,res);
System.out.println("4th Check");
if (rd == null) {
// No dispatcher means the html file can not be delivered
res.sendError(res.SC_NO_CONTENT);
System.out.println("Dispatcher is null");
}
}
}
Thank you
Saminathan Seerangan
510-574-7898
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html