You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Taavi Tiirik <ta...@ibs.ee> on 2001/08/25 22:03:20 UTC

default encoding of jsp pages

How can I set encoding of .jsp page to something other than 8859-1.

thanks in advance,
Taavi



Re: Memory used by java process

Posted by Vladimir Grishchenko <vl...@hotmail.com>.
As long as the growing process stops at some point it's fine.
Java is dynamic by nature, meaning the classes are loaded
on demand, not proactively. Jsp pages are compiled
into servlets and get loaded only as needed, that's why
process size is growing with time. Try -verbose
options to see how many classes get loaded per request.
You're also generating objects yourself in servlets/Jsp's.
Some of them are long lived, which contributes to growing
heap/process size. Another thing is that VM doesn't give
all memory back even after it's reclaimed by GC.

 If it keeps growing
without bounds most likely you have a memory leak
somewhere, meaning some objects cannot be reclaimed by
GC because they are strongly reachable. 

Also, the -Xincgc option you use enables "train" or incremental
garbage collection, which from my experience makes
GC less aggressive in general (this is what it's meant for anyway),
 which translates into larger Java process/heap size but less
noticeable GC pauses.

Hope this helps,
--V.


----- Original Message ----- 
From: "Roy K. Mayr R." <sy...@uapar.edu>
To: <to...@jakarta.apache.org>
Sent: Saturday, August 25, 2001 6:25 PM
Subject: Memory used by java process


> Hi,
> 
> I'm working with Solaris 8, Tomcat 3.3b, jdk 1.3.1, and Apache...
> 
> When I start tomcat, java process use 16M and when I run JSP pages this
> process grow more, more, more....
> 
> I start java with options:
> 
> export TOMCAT_OPTS=" -server -verbosegc -Xincgc -Xmx150m"
> 
> What is wrong??
> 
> Output of "verbosegc" is:
> 
> [GC 2048K->315K(2368K), 0.0462030 secs]
> [GC 2363K->700K(2816K), 0.0608491 secs]
> [GC 2748K->892K(3072K), 0.0341915 secs]
> [Full GC 2532K->1166K(2944K), 0.1949014 secs]
> [Full GC 1182K->1166K(2944K), 0.1618361 secs]
> [Full GC 1182K->1166K(2944K), 0.1584852 secs]
> [Full GC 1182K->1165K(2944K), 0.1936703 secs]
> [Full GC 1181K->1165K(2944K), 0.1533219 secs]
> [Full GC 1181K->1165K(2944K), 0.1563846 secs]
> [Full GC 1181K->1166K(2944K), 0.1545294 secs]
> [Full GC 1182K->1165K(2944K), 0.1559197 secs]
> [Full GC 1181K->1165K(2944K), 0.1528804 secs]
> [Full GC 1181K->1166K(2944K), 0.1569995 secs]
> [Full GC 1182K->1165K(2944K), 0.1563494 secs]
> [Full GC 1181K->1165K(2944K), 0.1603762 secs]
> [Full GC 1181K->1165K(2944K), 0.1538769 secs]
> [Full GC 1181K->1165K(2944K), 0.1532354 secs]
> [Full GC 1181K->1165K(2944K), 0.1560933 secs]
> [Full GC 1181K->1165K(2944K), 0.1897674 secs]
> [Full GC 1181K->1165K(2944K), 0.1539893 secs]
> [Full GC 1181K->1165K(2944K), 0.1579279 secs]
> [Full GC 1181K->1165K(2944K), 0.1608534 secs]
> [Full GC 1181K->1165K(2944K), 0.1537858 secs]
> [Full GC 1181K->1165K(2944K), 0.1563487 secs]
> [Full GC 1181K->1165K(2944K), 0.1607285 secs]
> [Full GC 1181K->1165K(2944K), 0.1566505 secs]
> [Full GC 1181K->1165K(2944K), 0.1559282 secs]
> [Full GC 1181K->1165K(2944K), 0.1530489 secs]
> [Full GC 1181K->1165K(2944K), 0.1607813 secs]
> [Full GC 1181K->1165K(2944K), 0.1538563 secs]
> ...
> 
> And finaly, every page that I see, output:
> 
> [GC 6976K->6516K(7232K), 0.0142359 secs]
> [GC 7021K->6564K(7232K), 0.0164692 secs]
> [GC 7076K->6643K(7360K), 0.0208976 secs]
> ....
> 
> What it means ??
> 
> Roy
> 
> 

Memory used by java process

Posted by "Roy K. Mayr R." <sy...@uapar.edu>.
Hi,

I'm working with Solaris 8, Tomcat 3.3b, jdk 1.3.1, and Apache...

When I start tomcat, java process use 16M and when I run JSP pages this
process grow more, more, more....

I start java with options:

export TOMCAT_OPTS=" -server -verbosegc -Xincgc -Xmx150m"

What is wrong??

Output of "verbosegc" is:

[GC 2048K->315K(2368K), 0.0462030 secs]
[GC 2363K->700K(2816K), 0.0608491 secs]
[GC 2748K->892K(3072K), 0.0341915 secs]
[Full GC 2532K->1166K(2944K), 0.1949014 secs]
[Full GC 1182K->1166K(2944K), 0.1618361 secs]
[Full GC 1182K->1166K(2944K), 0.1584852 secs]
[Full GC 1182K->1165K(2944K), 0.1936703 secs]
[Full GC 1181K->1165K(2944K), 0.1533219 secs]
[Full GC 1181K->1165K(2944K), 0.1563846 secs]
[Full GC 1181K->1166K(2944K), 0.1545294 secs]
[Full GC 1182K->1165K(2944K), 0.1559197 secs]
[Full GC 1181K->1165K(2944K), 0.1528804 secs]
[Full GC 1181K->1166K(2944K), 0.1569995 secs]
[Full GC 1182K->1165K(2944K), 0.1563494 secs]
[Full GC 1181K->1165K(2944K), 0.1603762 secs]
[Full GC 1181K->1165K(2944K), 0.1538769 secs]
[Full GC 1181K->1165K(2944K), 0.1532354 secs]
[Full GC 1181K->1165K(2944K), 0.1560933 secs]
[Full GC 1181K->1165K(2944K), 0.1897674 secs]
[Full GC 1181K->1165K(2944K), 0.1539893 secs]
[Full GC 1181K->1165K(2944K), 0.1579279 secs]
[Full GC 1181K->1165K(2944K), 0.1608534 secs]
[Full GC 1181K->1165K(2944K), 0.1537858 secs]
[Full GC 1181K->1165K(2944K), 0.1563487 secs]
[Full GC 1181K->1165K(2944K), 0.1607285 secs]
[Full GC 1181K->1165K(2944K), 0.1566505 secs]
[Full GC 1181K->1165K(2944K), 0.1559282 secs]
[Full GC 1181K->1165K(2944K), 0.1530489 secs]
[Full GC 1181K->1165K(2944K), 0.1607813 secs]
[Full GC 1181K->1165K(2944K), 0.1538563 secs]
...

And finaly, every page that I see, output:

[GC 6976K->6516K(7232K), 0.0142359 secs]
[GC 7021K->6564K(7232K), 0.0164692 secs]
[GC 7076K->6643K(7360K), 0.0208976 secs]
....

What it means ??

Roy


Re: Error when processing octal integer values passed as parameters.

Posted by Allan Kamau <hu...@yahoo.com>.
--- Allan Kamau <hu...@yahoo.com> wrote:
> Hi all,
> I am trying to pass Color values like 0xeeeeee or
> 0xEEEEEE as values to parameters from a get post (in
> the header). However I am unable to process the
> value
> into an integer value which is a requirement for the
> Color(int) constructor I will use to create the new
> color based on this passed value, I have tried 
> 
> <code>
> int
>
colorvalue=Integer.parseInt(req.getParameterValue("ColorParameter"));
> 
> </code>
> 
> It is throwing an NumberFormatException which I am
> printing displaying the actual value of the
> parameter
> e.g 
> 
> <output> NumberFormatException : 0xEEEEEE </output> 
> 
> Could anyone kindly tell me how to process this
> value
> of the parameter into an integer value so I may pass
> it to the Color(int) constructor.
> Thanks. 
> Allan.
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute
> with Yahoo! Messenger
> http://phonecard.yahoo.com/


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Error when processing octal integer Color codes passed as parameters.

Posted by Allan Kamau <hu...@yahoo.com>.
Hi all,
I am trying to pass Color values like 0xeeeeee or
0xEEEEEE as values to parameters from a get post (in
the header). However I am unable to process the value
into an integer value which is a requirement for the
Color(int) constructor I will use to create the new
color based on this passed value, I have tried 

<code>
int
colorvalue=Integer.parseInt(req.getParameterValue("ColorParameter"));

</code>

It is throwing an NumberFormatException which I am
printing displaying the actual value of the parameter
e.g 

<output> NumberFormatException : 0xEEEEEE </output> 

Could anyone kindly tell me how to process this value
of the parameter into an integer value so I may pass
it to the Color(int) constructor.
Thanks. 
Allan.




__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: default encoding of jsp pages

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sat, 25 Aug 2001, Taavi Tiirik wrote:

> Date: Sat, 25 Aug 2001 22:03:20 +0200
> From: Taavi Tiirik <ta...@ibs.ee>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: default encoding of jsp pages
>
> How can I set encoding of .jsp page to something other than 8859-1.
>

Add a page directive at the top:

  <%@ page contentType="text/html;charset=BIG5" %>

This also sets the charater encoding that will be sent to the browser, so
that it knows how to interpret the content.

In JSP 1.2 (i.e. Tomcat 4) you can also set a "pageEncoding" attribute in
the page directive, in case the page itself is encoded in a character set
different than what you want to set in the response (which is still set
with the contentType attribute).

> thanks in advance,
> Taavi
>
>
>
Craig