So in other words this is not the exact offender but rather a
simulation of the offending method.  That being the case it does no
good if it is not the actual code.

As I have told you before -run the profiler and just paste your damn
code so that everyone can see in its entirety.  BTW -what were the
results from the profiler?


----- Original Message -----
From: Anantha_Krishnan <[EMAIL PROTECTED]>
Date: Thursday, August 23, 2001 7:20 pm
Subject: Re: Out Of Memory Space Error....StringBuffer.append problem

> 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
> COMMENTEDFROM HERE
>
>
>
> //parametersOutput = parametersOutput + "<br><b>Name:</b>  " + new
> String("displayHeader") + "  <b>Value:</b>   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>  " + new
> String("displayHeader") +
> "  <b>Value:</b>   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>  " + new
> String("displayHeader") + "  <b>Value:</b>   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 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