In my FileServeServlet, the HTML file is served as follow;
---------------------------------------------------------------------------------

public void service(HttpServletRequest ...
//...
String path = req.getPathTranslated();

 if ( path.indexOf(".jsp") != -1 ) {

     System.out.println("IT IS JSP");
     RequestDispatcher dispatcher =
       getServletContext().getRequestDispatcher("/servlet/jsp");

     dispatcher.forward(req, res);
     return;
 }

try {
   fis = new FileInputStream(path);
   byte[] buf = new byte[1024 * 4]; // 4K buffer
   int bytesRead;

   while ( (bytesRead=fis.read(buf)) != -1 ) {
    out.write(buf, 0 , bytesRead);
   }
//....
 ---------------------------------------------------------------------------------

It doesn't work in serving jsp.

How can I serve jsp files in FileServeServlet?

___________________________________________________________________________
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