Hi,
I am confronted with a strange problem. I have defined some variables in the doPost method,and initialised them by request.getParameter() . I am modifying their value in the code , but the next time the doPost method is executed , I get the modified values??I am actually calling the doGet method first and the the doPost. I am not writing the modified value or saving it in the instance variables or the static variles , I think it is absolutly crazy
HERE IS THE
SERVLET TAG (I am using JServ)
<servlet code="com.MindShaper.ClassTeacher.Apps.HigherEd.IIFT.Utility.QueryResultAsLink" codebase="/servlets">
<param name="table" value="INSTITUTE_CHAPTERS,IIFT_CHAPTERS">
<param name="where" value="INSTITUTE_CHAPTERS.icourse_id,icourse_id">
</servlet>
HERE IS THE CODE
public class QueryResultAsLink extends HttpServlet
{
static MSConnectionBroker connBroker;
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
doPost(req,res);
}
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out = res.getWriter();
res.setContentType("text/html");
try{
String[] where=req.getParameterValues("where");
String[] whereVal=null;
if (where!=null)
{
whereVal=new String[where.length];
for (int i=0;i<where.length;i++)
{
int j=where[i].indexOf(",");
if(j==-1)
{
whereVal[i]=req.getParameter(where[i]);
}
else
{
String where2=where[i].substring(j+1,where[i].length());
where[i]=where11;
//IF I COMMENT OUT ABOVE LINE, I GET THE ACTUAL VALUES ELSE I GET THE MODIFIED VALUES
whereVal[i]=req.getParameter(where2);
}
}
}
else where=new String[0];
}
catch(Exception e)
{
Log.log(e);
}
}
GOD BLESS THOSE WHO HELP MEE!!!
}
[ February 01, 2002: Message edited by: manoj pandey ]