You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Partha Ranjan Das <pa...@sonata-software.com> on 2002/12/12 06:46:23 UTC

problem with chinese output in jsp/tomcat 4.1.12

> Hi,
> I am using Tomcat 4.1.12. My requirement is to get Chinese 
> characters in JSP
> pages.
> I am using the following code:
> 
> in one page which has the form I am using:
> <BODY>
> <form name=frm1 action="page2.jsp" method=POST>
> <Select name=sel1>
> <option value=1>??????</option>
> <option value=2>????</option>
> </select><br>
> <input type=submit value=submit>
> </form>
> </BODY>
> 
> 
> in the next page (page2.jsp) i am using the following code:
> <%@ page contentType = "text/html; charset=big5"%> 
> <BODY>
> this is a chinese output:
> <br>
> <%if(request.getParameter("sel1").equals("1"))%>
> ??????
> <%out.println("hi from partha");%>
> </BODY>
> 
> The problem is that in any case i am getting the output as 
> the chinese chars
> that have been written into the jsp body of page2.jsp irrespective of
> whether i choose the first or the second option. and in the 
> html output is
> also similar to the jsp code, which means that the jsp 
> translation is not
> taking place in the tomcat. For other english pages it is happening
> perfectly alright.
> Any idea what can be done so that the translation takes place and the
> conditional display of chinese is possible. Also shall be 
> highly grateful if
> you give idea as to how to initialize and manipulate chinese strings.
> 
> 
> Thanks in advance,
> Regards,
> Partha
> 
> ps- those ? marks are the chinese characters. I am using 
> Unicode text option
> while saving the jsp files. So character conversion to ASCII 
> while saving is
> ruled out. In fact the IE output is giving chinese.
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat uptime and stability in production environments

Posted by Tim Funk <fu...@joedog.org>.
We try to restart our tomcats at least once every other week. This is 
because we are JSP heavy and we have "many" page changes per day. We 
have found we can get through 2 weeks without running OutofMemory from 
the JSP recompile memory leak. (YMMV)

If it weren't for the JVM javac memory leak - we could probably stay up 
much longer.

We have other other internal instances which go months between restarts.

-Tim

Mike W-M wrote:
> I remember someone telling me once, "No wonder we're having problems - that
> NT box hasn't been rebooted for a week."
> 
> I haven't seen any mention of it here, but wondered if anyone has any
> similar(ly pithy) advice to offer on matters of Tomcat / Java stability and
> uptime.
> Is one sensible to plan to restart a production Tomcat every night, or
> foolish if you plan to do it every month?
> Do JVMs eat more and more memory unless they're restarted?
> 
> I'm planning to deploy on Linux, but it'd be interesting to see how opinion
> varies by platform.
> 
> Ta.
> Mike.
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat uptime and stability in production environments

Posted by Torsten Fohrer <TF...@t-online.de>.
I maintain and using three standalone tomcat servers. One of the three has a 
request count  of 40000-70000 per day, and traffic 1-5.5 gb traffic per 
month.

cu Torsten Fohrer


On Friday 13 December 2002 04:23, you wrote:
> On Thu, 12 Dec 2002, Mike W-M wrote:
> > Date: Thu, 12 Dec 2002 13:24:27 -0000
> > From: Mike W-M <mi...@ward-murphy.co.uk>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: Tomcat uptime and stability in production environments
> >
> > I remember someone telling me once, "No wonder we're having problems -
> > that NT box hasn't been rebooted for a week."
> >
> > I haven't seen any mention of it here, but wondered if anyone has any
> > similar(ly pithy) advice to offer on matters of Tomcat / Java stability
> > and uptime.
> > Is one sensible to plan to restart a production Tomcat every night, or
> > foolish if you plan to do it every month?
> > Do JVMs eat more and more memory unless they're restarted?
> >
> > I'm planning to deploy on Linux, but it'd be interesting to see how
> > opinion varies by platform.
>
> Although I regularly reloaded my Tomcat-based app (mostly to add new
> features), I had the luxury of managing one Linux-based server that stayed
> up for over 400 days (i.e. well over a year) without a reboot -- and we
> only had to then because the machine was being moved to a new power plug
> at the ISP's co-lo site :-).
>
> More seriously, the precise behavior is pretty dependent on exactly which
> versions of JDK and Tomcat you're using, as well as any possible memory
> leaks in your app, or the libraries it uses (JDBC drivers can be
> notorious).  I'd probably start with a weekly cycle on a heavily used app,
> but monitor things to see if more often or less often would be
> appropriate.
>
> > Ta.
> > Mike.
>
> Craig
>
>
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org> For additional
> commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat uptime and stability in production environments

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

On Thu, 12 Dec 2002, Mike W-M wrote:

> Date: Thu, 12 Dec 2002 13:24:27 -0000
> From: Mike W-M <mi...@ward-murphy.co.uk>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Tomcat uptime and stability in production environments
>
> I remember someone telling me once, "No wonder we're having problems - that
> NT box hasn't been rebooted for a week."
>
> I haven't seen any mention of it here, but wondered if anyone has any
> similar(ly pithy) advice to offer on matters of Tomcat / Java stability and
> uptime.
> Is one sensible to plan to restart a production Tomcat every night, or
> foolish if you plan to do it every month?
> Do JVMs eat more and more memory unless they're restarted?
>
> I'm planning to deploy on Linux, but it'd be interesting to see how opinion
> varies by platform.
>

Although I regularly reloaded my Tomcat-based app (mostly to add new
features), I had the luxury of managing one Linux-based server that stayed
up for over 400 days (i.e. well over a year) without a reboot -- and we
only had to then because the machine was being moved to a new power plug
at the ISP's co-lo site :-).

More seriously, the precise behavior is pretty dependent on exactly which
versions of JDK and Tomcat you're using, as well as any possible memory
leaks in your app, or the libraries it uses (JDBC drivers can be
notorious).  I'd probably start with a weekly cycle on a heavily used app,
but monitor things to see if more often or less often would be
appropriate.

> Ta.
> Mike.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat uptime and stability in production environments

Posted by Tim Funk <fu...@joedog.org>.
I am still on 4.0.X. For production purposes (main site) - we have 4 
tomcats clustered behind 2 apaches behind 1 loadbalancer. (Personally - 
the 4 tomcats are overkill - 2 would be plenty)

Each tomcat receives over 40,000 requests per day. We have had no 
problems with load.

Personally - 4.1 is not ready for production but very close. (Others 
will disagree) But, I am interested in 4.1.17. It seems that 4.1.X is 
getting really close for production use. Once some of my projects die 
down, I hope to migrate my sites to our test environment with 4.1 and 
beat the crap out of it and see how it reacts.

-Tim


Mike W-M wrote:
> It's all making interesting reading.
> I'm slightly surprised to see so many people on 4.1.x.  When I stuck my head
> down a month or so ago to do some work, 4.0.4 was the production release.
> (A longstanding one, I believe.)
> Suddenly 4.1.x is the production version and everyone seems to be using
> that.  And there seem to be more than a few complaints about it.....
> 
> I'm expecting to deploy to 4.0.x  (where x = 5, I guess)...
> 
> Mike.
> 
> 
> ----- Original Message -----
> From: "Brandon Cruz" <bc...@norvax.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, December 12, 2002 3:35 PM
> Subject: RE: Tomcat uptime and stability in production environments
> 
> 
> Mike,
> 
> I had this mysterious problem with Tomcat 3.2.4 which would force us to
> restart the server almost every day due to CPU usage slowly increasing over
> time.  We tried upgrading to Tomcat 4.1.12 and found it to have several bugs
> and crash every once in a while (the crashing could have been configuration
> problems).  We upgraded to tomcat 4.1.16 and do not seem to see any of the
> original problems and the server has not crashed or slowed down yet, it has
> only been up for about four days without restart so far, but the memory and
> CPU seems to be totally under control.
> 
> We are on a linux machine as well.
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat uptime and stability in production environments

Posted by Mike W-M <mi...@ward-murphy.co.uk>.
It's all making interesting reading.
I'm slightly surprised to see so many people on 4.1.x.  When I stuck my head
down a month or so ago to do some work, 4.0.4 was the production release.
(A longstanding one, I believe.)
Suddenly 4.1.x is the production version and everyone seems to be using
that.  And there seem to be more than a few complaints about it.....

I'm expecting to deploy to 4.0.x  (where x = 5, I guess)...

Mike.


----- Original Message -----
From: "Brandon Cruz" <bc...@norvax.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, December 12, 2002 3:35 PM
Subject: RE: Tomcat uptime and stability in production environments


Mike,

I had this mysterious problem with Tomcat 3.2.4 which would force us to
restart the server almost every day due to CPU usage slowly increasing over
time.  We tried upgrading to Tomcat 4.1.12 and found it to have several bugs
and crash every once in a while (the crashing could have been configuration
problems).  We upgraded to tomcat 4.1.16 and do not seem to see any of the
original problems and the server has not crashed or slowed down yet, it has
only been up for about four days without restart so far, but the memory and
CPU seems to be totally under control.

We are on a linux machine as well.



-----Original Message-----



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat uptime and stability in production environments

Posted by Brandon Cruz <bc...@norvax.com>.
Mike,

I had this mysterious problem with Tomcat 3.2.4 which would force us to
restart the server almost every day due to CPU usage slowly increasing over
time.  We tried upgrading to Tomcat 4.1.12 and found it to have several bugs
and crash every once in a while (the crashing could have been configuration
problems).  We upgraded to tomcat 4.1.16 and do not seem to see any of the
original problems and the server has not crashed or slowed down yet, it has
only been up for about four days without restart so far, but the memory and
CPU seems to be totally under control.

We are on a linux machine as well.



-----Original Message-----
From: Mike W-M [mailto:mike@ward-murphy.co.uk]
Sent: Thursday, December 12, 2002 7:24 AM
To: Tomcat Users List
Subject: Tomcat uptime and stability in production environments


I remember someone telling me once, "No wonder we're having problems - that
NT box hasn't been rebooted for a week."

I haven't seen any mention of it here, but wondered if anyone has any
similar(ly pithy) advice to offer on matters of Tomcat / Java stability and
uptime.
Is one sensible to plan to restart a production Tomcat every night, or
foolish if you plan to do it every month?
Do JVMs eat more and more memory unless they're restarted?

I'm planning to deploy on Linux, but it'd be interesting to see how opinion
varies by platform.

Ta.
Mike.


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Tomcat uptime and stability in production environments

Posted by Mike W-M <mi...@ward-murphy.co.uk>.
I remember someone telling me once, "No wonder we're having problems - that
NT box hasn't been rebooted for a week."

I haven't seen any mention of it here, but wondered if anyone has any
similar(ly pithy) advice to offer on matters of Tomcat / Java stability and
uptime.
Is one sensible to plan to restart a production Tomcat every night, or
foolish if you plan to do it every month?
Do JVMs eat more and more memory unless they're restarted?

I'm planning to deploy on Linux, but it'd be interesting to see how opinion
varies by platform.

Ta.
Mike.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: problem with chinese output in jsp/tomcat 4.1.12

Posted by Mike W-M <mi...@ward-murphy.co.uk>.
I don't quite see where the chinese characters come into it, but I think
you've forgotten to put the curly-brackets
round the thing that's supposed to be conditional.
Instead of....
<%if(request.getParameter("sel1").equals("1"))%>
??????
<%out.println("hi from partha");%>

...I suggest you try...
<% if(request.getParameter("sel1").equals("1")) { %>
Hi from partha
<% } %>

However, I think this in itself is a little flawed because you're going to
get a null-reference error if you try the equals comparison if no "sel1" was
supplied.

Hope that helps.
Mike.



----- Original Message -----
From: "Partha Ranjan Das" <pa...@sonata-software.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, December 12, 2002 5:46 AM
Subject: problem with chinese output in jsp/tomcat 4.1.12


> Hi,
> I am using Tomcat 4.1.12. My requirement is to get Chinese
> characters in JSP
> pages.
> I am using the following code:
>
> in one page which has the form I am using:
> <BODY>
> <form name=frm1 action="page2.jsp" method=POST>
> <Select name=sel1>
> <option value=1>??????</option>
> <option value=2>????</option>
> </select><br>
> <input type=submit value=submit>
> </form>
> </BODY>
>
>
> in the next page (page2.jsp) i am using the following code:
> <%@ page contentType = "text/html; charset=big5"%>
> <BODY>
> this is a chinese output:
> <br>
> <%if(request.getParameter("sel1").equals("1"))%>
> ??????
> <%out.println("hi from partha");%>
> </BODY>
>
> The problem is that in any case i am getting the output as
> the chinese chars
> that have been written into the jsp body of page2.jsp irrespective of
> whether i choose the first or the second option. and in the
> html output is
> also similar to the jsp code, which means that the jsp
> translation is not
> taking place in the tomcat. For other english pages it is happening
> perfectly alright.
> Any idea what can be done so that the translation takes place and the
> conditional display of chinese is possible. Also shall be
> highly grateful if
> you give idea as to how to initialize and manipulate chinese strings.
>
>
> Thanks in advance,
> Regards,
> Partha
>
> ps- those ? marks are the chinese characters. I am using
> Unicode text option
> while saving the jsp files. So character conversion to ASCII
> while saving is
> ruled out. In fact the IE output is giving chinese.
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>