I have zeroed upon a simple function to depict the scenario Iam facing.
There are multiple other functions like this..

This function fills the header part of the page with parameters fetched from
the HashMap and also depending upon the get or post method called by the
invoker servlet.


////////////////////Function Begin

        private synchronized void fillSetHeaderProperty(HashMap map,
HttpServletRequest req,int getOrPost)
        {

                String tempStr=null;
                String toWhere=req.getParameter("TOWHERE");
                String tempStr1 = null;

                int counter=0;

                for(int i=0; i < Constants.RESTRICT_HEADER_DISPLAY.length;
i++)
                {
                        tempStr = Constants.RESTRICT_HEADER_DISPLAY[i];

                        if(getOrPost==Constants.HTTP_GET)
                        {
                                tempStr1 = toWhere + ".GET";
                                if
((tempStr1.trim()).equals(tempStr.trim()))
                                {
                                        map.put(new String("displayHeader"),
"N");

////////////////////////////////////////////////////////////////////////////
/////////////////////

//COMMENTED BY ANANTH   THE PARAMETERVARIABLE  I SUSPECT AND I COMMENTED
FROM HERE



//parametersOutput = parametersOutput + "<br><b>Name:</b>&nbsp;&nbsp;" + new
String("displayHeader") + "&nbsp;&nbsp;<b>Value:</b>&nbsp;&nbsp; N" ;



/////////////////////////TILL HERE



                                                counter =counter + 1;
                                }
                        }
                        else
                        {
                                tempStr1 = toWhere + ".POST";

                                if
((tempStr1.trim()).equals(tempStr.trim()))
                                {
                                        map.put(new String("displayHeader"),
"N");



//COMMENTED BY ANANTH SIMILARLY HERE ALSO
//                                      parametersOutput = parametersOutput
+ "<br><b>Name:</b>&nbsp;&nbsp;" + new String("displayHeader") +
"&nbsp;&nbsp;<b>Value:</b>&nbsp;&nbsp; N" ;


                                                counter=counter+1;
                                }
                        }
                }
                if (counter==0)
                {
                        map.put(new String("displayHeader"), "Y");


//COMMENTED BY ANANTH
//                      parametersOutput = parametersOutput + "<br><b>" +
tempStr + "</b><br><b>" + tempStr1 + "</b><b>Name:</b>&nbsp;&nbsp;" + new
String("displayHeader") + "&nbsp;&nbsp;<b>Value:</b>&nbsp;&nbsp; Y" ;

                }
        }






/////////////////Function Ends


Suggest me whether this is the "solution" or anyother is there. So far i did
not receive the error and the site runs pretty fast.This variable
"parametersOutput" i was using to view the parameters of the pages I left it
just by commenting the out.println. But the variable was getting populated
again and again and may be it threw that error. Correct me whether the
solution is right.

thanks
ananth

___________________________________________________________________________
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