Servlet chaining problem..

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

publicclass Deblinkextends HttpServlet{

publicvoid doGet(HttpServletRequest req, HttpServletResponse res)

throws ServletException, IOException{

String contentType = req.getContentType();// get the incoming type

if (contentType ==null)return;// nothing incoming, nothing to do

res.setContentType(contentType);// set outgoing type to be incoming type

PrintWriter out = res.getWriter();

BufferedReader in = req.getReader();

String line =null;

while ((line = in.readLine()) !=null){

line = replace(line,"<BLINK>","");

line = replace(line,"</BLINK>","");

out.println(line);

}

}

publicvoid doPost(HttpServletRequest req, HttpServletResponse res)

throws ServletException, IOException{

doGet(req, res);

}

private String replace(String line, String oldString, String newString){

int index = 0;

while ((index = line.indexOf(oldString, index)) >= 0){

// Replace the old string with the new string (inefficiently)

line = line.substring(0, index) +

newString +

line.substring(index + oldString.length());

index += newString.length();

}

return line;

}

}

What is pre request fo above code to work.

I had tried this many time but it is not working, what will be calling servlet look like

[2780 byte] By [pinchittera] at [2007-11-26 18:17:56]
# 1
Perhaps you can start off by telling us how is it not working?
singchyuna at 2007-7-9 5:51:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
And can you explain why your title is "Servlet chaining problem"?
DrClapa at 2007-7-9 5:51:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...