problem with textarea

Posted on 2006-03-27
Last Modified: 2010-04-01
Hi Experts,
I am getting a blank space in my text area and not able to remove it.

<%String query = (String)request.getAttribute("query");
 if(query == null) query = "";
 <textarea cols="100" rows="10" name="query"><%=query%>

Please Help
Question by:AmodKr
    LVL 10

    Accepted Solution

    Hi AmodKr,

    textarea interprets whatever is nested inside as its contents.
    Try this:

    <%String query = (String)request.getAttribute("query");
     if(query == null) query = "";
     <textarea cols="100" rows="10" name="query"><%=query%></textarea>

    Hope it helps!

    LVL 2

    Author Comment

    Hey man, I don't believe that it makes a difference.
    Thanks a lot ;-)
    LVL 10

    Expert Comment

    Thanks dude! That makes my JSP score 50000+. Awaiting my first certificate!


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Synchronize a new Active Directory domain with an existing Office 365 tenant
    Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now