Hi All
I tried whatever u have mentioned. Still i got a problem in
###
RequestDispatcher rd=getServletContext().getRequestDispatcher("/index.html");
###

I'm using JavaWebServer1.1.3,solaris paltform.The Servlet Chaining is ENABLED in
JavaWebServer Admin.
The index.html is in JAVA_WEBSERVER_ROOT directory(in public_html).
What could be wrong? Please guide me.
I have tried with/without doGet method.

-----------
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="/servlet/servlet4";
System.out.println("2 Check");
RequestDispatcher rd=getServletContext().getRequestDispatcher("/index.html");
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");
           }
//doGet(req,res);

   }
/*public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException{
        ServletOutputStream out1= res.getOutputStream();
        res.setContentType("text/html");
        out1.println("<HEAD><TITLE> lpm_dar doGet Output </TITLE></HEAD><BODY>")
;
        out1.println("<P>This is from  LPM_DAR doGet Servlet program.");
        out1.println("</p></pre></BODY>");
        out1.close();
}
*/
}



                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

Reply via email to