Jaman,
   I had similar problems of repeating text when I was experimenting with a
servlet.
   But  in my case, I was using a StringBuffer object and appending the html
code and then
   finally doing out.println(strBuff). strBuff was a member variable in my
servlet class.

   I solved this prob. by setting strBuff variable to null and then assigning it
a totally
   new  StringBuffer object like this
   public void doGet(.....)
  {
       strBuff = null;
       strBuff = new StringBuffer(.....);

       //appending my html stuff


      out.println(strBuff.toString());
 }

The above tech. worked for me.
U can try to solve the prob like this or try to do the same with your "out"
object.
Mohan

IBM
Somers, NY
PH: (914) 766-2259
T/L:  826 2259



Jaman Burton <[EMAIL PROTECTED]> on 09/08/99 04:48:31 PM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:
Subject:  Websphere servlet text repeating.





This is a weird problem that I don't even know if I can describe
accurately.  But here goes:

I have just finished installing webshere 2.02 on my NT box.  It working
in conjunction with Netscape Fast-Track 2.0.  Everything seems to be
running properly except this.

When I run the test servlets( or even a hello world) servlet of my own.
 All the text that is in servlet code enclosed in parenthesis gets
repeated over and over on the web page.  For instance...let's say the
following is a snippet of code:

...
out.println("<HTML>");
out.println("<Body><Title>Hello World page</Title></Body>");
out.println("<center>hello world</center>");
out.println("</HTML>");
out.flush();
out.close();
...

The web page will look something like this:


                        Hello World
TML> Hello World <Body><Title> Hello World </Body></Title>

This will repeat maybe 4 or 5 times...have any of you encounted
this...or have any ideas on how to fix it?

I've attached a copy of one of their sample servlets exhibiting this
behavior

Thanks a lot
Jaman
[EMAIL PROTECTED]

CheckMessage.html

Reply via email to