Getting rid of POST servlet header, or is it an error?

I am doing a post operation to a servlet. I send it some data, and then get some data back. I am doing this by the below code. When I print out the "servletText" then I get some unusual characters at the front...something like: -i00z000
Can someone please tell me how to get rid of this.
Any/All help is appreciated!
String servletText = null;
java.net.URL url = null;
java.net.URLConnection connection = null;
java.io.DataOutputStream out = null;
String userInfo = null;
java.io.DataInputStream input = null;
java.io.BufferedReader reader = null;
try
  /* Make connection. */
  url = new java.net.URL("http://ip/dir_tomcat/servlet/packg.class");
  connection = countryBook.openConnection();
  connection.setDoInput(true);
  connection.setDoOutput(true);
  connection.setUseCaches(false);
  connection.setDefaultUseCaches(false);
  /* Output info. */
  out = new java.io.DataOutputStream(connection.getOutputStream());
  userInfo = ("Here is query information for the servlet");
  out.writeBytes(userInfo);
  out.flush();
  out.close();
  /* Input info. */
  input = new java.io.DataInputStream(connection.getInputStream());
  reader = new java.io.BufferedReader(new java.io.InputStreamReader(input));
  /* Read in one line. */
  servletText = reader.readLine();
catch(java.net.MalformedURLException e)
  e.printStackTrace();
catch(java.io.IOException e)
  e.printStackTrace();
System.out.println(servletText);
public void doPost(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException {
  /* Declarations. */
  String outputString = null;
  java.io.DataInputStream input = null;
  java.io.BufferedReader reader = null;
  DatabaseConnectionManager databaseConnection = null;
  java.io.ObjectOutputStream out = null;
  /* Create reader and read in info from applet. */
  input = new java.io.DataInputStream(req.getInputStream());
  reader = new java.io.BufferedReader(new java.io.InputStreamReader(input));
  String inputStr = reader.readLine();
  /* Create database object. */
  databaseConnection = new DatabaseConnection("user", "pass");
  outputString = databaseConnection.getInfo();
  /* Create out stream & send info. */
  out = new java.io.ObjectOutputStream(res.getOutputStream());
  out.writeBytes(outputString);
  out.close();
}

ps) It also throws in random unusual characters throughout the text. Example:
Here is text. More text. Here come unusual z0000characters. Did you see them?

Similar Messages

  • How do I get rid of the silver header on my docs?

    How do I get rid of the silver header on my docs? I'm opening them as tabs but it remains?! Do I go full screen?
    I can't get my workspace to look like the tutorial videos?...

    yup, i'm a moron. welcome to cs6. thx

  • "Portal Content Area Builder" how to get rid of this page heading?

    "Portal Content Area Builder" how to get rid of this page heading?
    Hi All
    I have created a Single page Website..??? by using folders.
    when a user click on any link that call a folder but not a page and that folder is displayed with the layout specified in "Content Area Page" however there is no such option available to change the Heading <Title>Page title</Title> for browsers so for every folder called it displays a Oracle defined Content area page title.
    "Portal Content Area Builder"
    Is there anywork around for this.
    Thanks.
    Rakesh.

    This problem is fixed in Release 2. There is no supported workaround in 3.0.

  • Get rid of "itunes store" heading in left column

    how do i get rid of the "itunes store" heading in the left column of itunes? thanks

    Well, that was a great post Meg!
    Hoorah!
    Didn't even think to look there.

  • HT2500 i cannot seem to get rid of the long header in my inbound e-mails help?

    I am having trouble getting rid of the 10 to 15 lines of long header on my incoming e-mails.  I have gone to mail,messages and clicked long header which removed it but still no sucess.  How would I go about this in rules if there is no other way?  Thanks

    What do you have set for the following?
    mail preferences --> Viewing --> Show Header Detail
    Should be set to Default or None to suppress the full headers.

  • I am trying to sync my new MacBook Air iCal with my iMac calendar.  I can get it to sync if my iMac is set to MobileMe calendar, but I cannot get rid of iCal which keeps coming up with an error message.

    I am trying to sync my new MacBook Air iCal with my iMac calendar.  It will synce with MobileMe calendar on the iMac, but I can't get rid of iCal on the iMac and this one keeps coming up with an error message. 

    About the only thing you can try is using the Online Internet Recovery system to reinstall Lion on your Mac over the top of the current install. that will reset all system files and should not touch your personal files or the apps you have installed.
    Or iof you have a recent Time Machine backup use that to restore your Mac to that point in time.

  • How can I get rid of posts when there is no little x to click on?

    I was in Farmville Freaks and clicked on share and now it's on my home page and can't get it off because there's now little x beside of it to click on.

    See this: <br />
    http://support.mozilla.com/en-US/kb/How+to+set+the+home+page

  • How do I get rid of the white space between my header and my spry navigation bar?

    I have been grappling with a problem for the past 2 days and cannot seem to work my way around it. I have been working on a page in dreamweaver cs4 that seems to have whitespace between the header and my spry menu bar ONLY in Firefox. Google Chrome and Safari show it correctly. Could you steer me in the right direction for getting rid of that space. Here is the page: http://www.margaritascafe.com/margaritas_layout.html
    Here is my code and thanks in advance for your help:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <link href="margaritastyles.css" rel="stylesheet" type="text/css" />
    <script src="Margaritas_temp_spry/SpryMenuBar.js" type="text/javascript"></script>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <link href="Margaritas_temp_spry/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper">
      <div id="header">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1000" height="250" id="FlashID" tabindex="10" title="Margarita's Cafe header 2">
          <param name="movie" value="flash_movies/Margaritas Header 3.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="swfversion" value="9.0.45.0" />
          <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="flash_movies/Margaritas Header 3.swf" width="1000" height="250">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="opaque" />
            <param name="swfversion" value="9.0.45.0" />
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
            <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
            <div>
              <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
      </div>
      <div id="navigation">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="#">Home</a></li>
          <li><a href="#" class="MenuBarItemSubmenu">Menus</a>
            <ul>
              <li><a href="#">Lunch</a></li>
              <li><a href="#">Dinner</a></li>
              <li><a href="#">Cocktail</a></li>
              <li><a href="#">Take Out</a></li>
            </ul>
          </li>
          <li><a href="#">Photos</a></li>
          <li><a href="#" class="MenuBarItemSubmenu">Catering</a>
            <ul>
              <li><a href="#">Private Parties</a></li>
            </ul>
          </li>
          <li><a href="#">Reservations</a></li>
          <li><a href="#">Contact</a></li>
          <li><a href="#">Reviews</a></li>
          <li><a href="#">Directions</a></li>
        </ul>
      </div>
      <div id="maincontentlayout3">Content for  id "maincontentlayout3" Goes Here</div>
      <div id="specials"><img src="png-gif-jpg/Tuesday Night Banner.jpg" width="200" height="70" alt="Margarita's Tuesday Night Special" /><img src="png-gif-jpg/Wednesday Banner.jpg" width="200" height="70" alt="Wednesday 2 for 1 dinner special at Margarita's" /><img src="png-gif-jpg/Thursday Banner.jpg" width="200" height="70" alt="Ladie's Night Thursdays at Margarita's Cafe" /><img src="png-gif-jpg/Friday Banner.jpg" width="200" height="70" alt="TGIF Happy Hour on Friday's at Margarita's Cafe" /><img src="png-gif-jpg/Sunday Banner.jpg" width="200" height="70" alt="Sunday Kids Eat Free at Margarita's Cafe!" /></div>
      <div id="footer"><img src="png-gif-jpg/Margaritas Facebook logo.png" alt="Facebook" width="40" height="25" align="absmiddle" /> <img src="png-gif-jpg/Margaritas Twitter logo.png" alt="Twitter Logo" width="40" height="25" align="absmiddle" /><img src="png-gif-jpg/merchantcircle_mini.png" alt="Merchant Circle Logo" width="63" height="25" align="absmiddle" /></div>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"Margaritas_temp_spry/SpryMenuBarDownHover.gif", imgRight:"Margaritas_temp_spry/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

    CSS:
    #navigation {margin-top: -3px;}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Can I get rid of the flashing bar of words while texting? Or even writing this post?

    Can I get rid of the flashing bar of words while texting? Or even writing this post?

    Settings - general - keyboard - turn off predictive text.

  • Can't get rid of account icon photo in mail header area

    How can I get rid of the thumbnail photo icon in the mail header area when I send an e-mail in Mail?
    It is one of the supplied icons that is in system preferences for "accounts", to distinguish my account from my wife's on our iMac G5 (10.4.10). I recently only selected this icon....the boxer dog....but there was nothing in that area before when I used the generic sillohuete as my account log-in identifier.
    Basically, I don't want to be sending e-mails with a dog's photo....as much as I like dogs.
    I have read how to ADD a custom photo in .Mac preferences/profile but, I didn't see how to get rid of one and I did not consciously choose to add the photo that is there now.....it just appeared after I changed it in System Preferences/Accounts. I understand that it might appear in iChat, but, I am not/wasn't using iChat.

    Those photos don't actually get sent. They are a "feature" of Mail. You probably have a "Me" card in your address book? Get rid of the picture there, and it should get rid of the picture in the header region of your emails as displayed in Mail.app. But, like I said, those don't actually get sent, anyways. Got Windoze at work? Send an email to yourself at your work email address -- you'll see -- no boxer dog. But, please pay a visit to http://www.apple.com/macosx/feedback/ and let them know what you think of this feature.

  • After udate to IOS 8 when I call up a pdf file for my lyrics it now had a header and footer that are blocking my words.  Can I get rid of the header and footer

    I have all my lyrics for my songs in iBooks on my Ipad.  Before updating to IOS8 when I called up a song only the lyrics came up.  Now after updating to IOS 8 there is a header and bottom(showing the page).  The header is cutting off my words and they are making my songs now appear on 2 pages instead of 1.  Is there anyway to get rid of the header and footer so only my lyrics show on the page?

    Tap the screen once and the header/footer disappears.  Tap again and it reappears.

  • Ever since upgrading the other day, there is an obnoxious flowery graphic behind my tool bar and taking up the whole header portion of my browser. How do I get rid of it?

    There is a flowery, very colorful background on the heading portion of my browser behind my toolbars ever since I upgraded. It makes the tabs very hard to read and everything else too. How do I get rid of it? I certainly did NOT pick it out or change the appearance. When I go to "appearance" there is not an option to change this. It just changes everything below the tabs.
    == This happened ==
    Every time Firefox opened
    == I upgraded 2 days ago (app. 7/18/2010

    Thank you! Thank you! I had chosen the themed header, which I liked very much, but it was too busy and I got frustrated with not being able to see my links. But when I tried to delete it I could ''not figure out'' how. I love the idea, but need to see my links.

  • How do I get rid of this annoying tag at the end of my wordpress posts: // ![CDATA[ div id="" class="_mp3rocket_overlay_style" style="left: ; top: ; width: ;

    Whenever I post on my blog, this shows up at the bottom:
    <pre><nowiki>// <![CDATA[
    <div id="" class="_mp3rocket_overlay_style" style="left: ; top: ; width: ; height: ">
    // ]]>
    </nowiki></pre>
    How do I get rid of it?

    Does the name mp3rocket ring a bell?? It may be related to a browser add-on. You could check for and possibly disable or remove such an add-on here:
    orange Firefox button ''or'' classic Tools menu > Add-ons
    Try both the Plugins and Extensions categories.
    If it doesn't seem related to an add-on, perhaps it's something added by a Wordpress plugin, or your blog theme. If you provide a link to your blog, a volunteer here could take a look and see whether they get the same text.

  • How do I get rid of a page number that's not in the header of a Pages doc?

    On one of my pages document is a page number beside the header area but not in the header.
    I can't select it, can't find anything in the Pages help to tell me how that page number came about and how to get rid of it.

    Try Format > Advanced > Make Master objects selectable.
    S.

  • How do you get rid of the blank row/line after the header?

    My report needs to use the "Different first Page" and "Odd and even page" layout options. However, after the header is printed, it also print out a blank line and then print out the data table. How can I get rid of the blank line. Also, after the table is printed. A blank line is printed and then it the footer gets print. How can I get rid of the blank line as well? Thanks for your help!

    No idea what you're talking about. i don't see anything like that.

Maybe you are looking for