Re: OT: OutOfMemory

2005-11-28 Thread Chen Jerry
Rechard, I suppose Eric wanna output HTML. I myself prefer css to font tags. Introducing an XSLT engine is a nice idea, however, it seems not the choice of Eric. I suppose the current problem results from default configuration of JVM or large numbers of substring with a big string. Regards, Je

Re: OT: OutOfMemory

2005-11-28 Thread Chen Jerry
2005/11/29, Eric Plante <[EMAIL PROTECTED]>: > for (Integer posLetter: positions){ Well, would you please post code relative to the variable of postions? > String subText = fullText.substring(start, posLetter); > textFormat.append(subText); > subText = null; //not required > start

Re: OT: OutOfMemory

2005-11-28 Thread Chen Jerry
Well, to replace each 'create' with 'create', you can leverage: String origin = ... String result = origin.replaceAll("create","create"); I am not sure whether this operation should result in the same problem. 2005/11/29, Eric Plante <[EMAIL PROTECTED]>: > The only difference between StringBuil

Re: OT: OutOfMemory

2005-11-28 Thread Chen Jerry
Sorry to hear that. Would you please show some source code relative to the problem? Well, 5000 loops of substring with a big string is terrible. 2005/11/29, Eric Plante <[EMAIL PROTECTED]>: > It wasn't there but I added it and whatever I used -Xmx or -XX, it didn't > work. I wrote 100m for the -

Re: OT: OutOfMemory

2005-11-28 Thread Chen Jerry
I found in my catalina.bat: set JAVA_OPTS= Instead of that, use: set JAVA_OPTS=-XX:MaxPermSize=10m -Xmx512m seems only increase max size of heap rather than perm division. 2005/11/29, Eric Plante <[EMAIL PROTECTED]>: > I found the required catalina files and I see 4 lines with the JAVA_OPTS > var

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
at.util.buf.StringCache.trainThreshold=50 > #tomcat.util.buf.StringCache.cacheSize=5000 > > Is there anything there I can modify to help? > > Thanks > > > > if your os is linux and like, it is bin/catalina.sh > > 2005/11/28, Chen Jerry <[

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
if your os is linux and like, it is bin/catalina.sh 2005/11/28, Chen Jerry <[EMAIL PROTECTED]>: > Well, you use tomcat, right? > There is bin/catalina.bat, where you can specify -XX options. > > 2005/11/28, Chen Jerry <[EMAIL PROTECTED]>: > > Well, heap size and

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
Well, you use tomcat, right? There is bin/catalina.bat, where you can specify -XX options. 2005/11/28, Chen Jerry <[EMAIL PROTECTED]>: > Well, heap size and each division has its default value. In fact, they > are specified proper values, such as minimal size, maximal size,

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
Well, heap size and each division has its default value. In fact, they are specified proper values, such as minimal size, maximal size, ratio, etc., according to requirement. Did you try customizing memory model of Hotspot at application startup? I suppose your problem can be solved by increase the

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
2005/11/28, Eric Plante <[EMAIL PROTECTED]>: > Thanks > > 1-How do I know if I use hotspot or not? $ java -version > 2-Is StringBuilder using the same heap as String? "xxx" is regard as permniant object. does your StringBuilder leverages sb.append("xxx")? If so, I suppose it is the same to String

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
Well, It's -XX:MaxPermSize option rather than some -X option; you can refer to this link for more information: http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf Regards, Jerry 2005/11/28, Chen Jerry <[EMAIL PROTECTED]>: > Well, I suppose I can offer some tip that may help. >

Re: OT: OutOfMemory

2005-11-27 Thread Chen Jerry
Well, I suppose I can offer some tip that may help. Let me suppose you use Hotspot VM. Sun's Hotspot VM 's heap space consists of three divisions for young generation, old generation and perminant generation. Young generation refers to objects that are created and usually it died in a short time.

How can I keep multiple selection of html:options when I am back

2005-11-14 Thread Chen Jerry
Well, I make multiple selection and submit the page, which will be forwarded to if validation is not passed. I want to keep selected the multiple s of when I am back. What can I do? This is the fragment of source code: Thanks in advance. Jerry -