Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6715971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:40:39+00:00 2026-05-26T08:40:39+00:00

In my web application (my first with Java, Spring, OR Roo), I’m building a

  • 0

In my web application (my first with Java, Spring, OR Roo), I’m building a form that has nothing to do with any JPA objects, it’s just a form. I really don’t want to use JSTL to build my forms here, because there’s no data backing for them at this point. I’m using tiles to assemble the pages, so the guts of this form comes from a view, but apart from that there’s nothing JSPish about it; it’s just a form.

Inside that form, I have a text area that I’ve written:

<textarea id="whatever" name="whatever"></textarea>

When that comes to the screen, the </textarea> tag is gone. Different browsers deal with that differently, up to and including swallowing up the whole rest of the body HTML inside the text area field.

So I tried putting some content inside that textarea. Spaces and line breaks don’t change its behavior, but it appears that any non-space character does. If I go

<textarea>.</textarea>

… it respects my close textarea tag. But then of course my text area renders on the screen with a dot in it, which isn’t what I want.

Is this a known issue? Am I doing something wrong?

EDIT:
@bozho: Here’s a pertinent chunk of my jsp:

<div id="notes" class="detailPanel">
    <div class="panelLabel">Notes</div>
    <table >
    <thead><tr><th>Date</th><th>By</th><th>Note</th></tr></thead>
    <tbody id="notesBody"></tbody>
    </table>
    <textarea id="newNote" rows="5" cols="80" >.</textarea>
    <button id="addNewNote" onClick="saveNote();">Add New Note</button>
</div>

Absolutely nothing fancy going on here (I populate the tbody with rows on the client, is why that’s empty). Without the dot in the third-to-last line, the closing textarea tag does not come out in the resulting HTML.

EDIT2 (Solution):

This URL became googlable after hearing some key words from people responding here:
http://www.jroller.com/komu/entry/textareas_with_jspx

Turns out that when jspx pages are parsed, empty tags are collapsed into a single self-closing tag, which breaks text areas. The solution is to put an empty jsp:text in the middle:

<textarea><jsp:text /></textarea>

(Which is STAGGERINGLY stupid, but there it is.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:40:40+00:00Added an answer on May 26, 2026 at 8:40 am

    You are using jspx files right?
    In general jspx remove something (or in your case it shorten it: check this: I expect that it addes a slash to the former opening tag, so it becomes: <textarea id="whatever" name="whatever"/> ) where it belives that is not needed. What exactly depends ona bit on the implementation.

    So put a <jsp:text> tag in the text area tag to prevent it from “closing”

    <jsp:text>
        <textarea id="whatever" name="whatever"></textarea>
    </jsp:text>
    

    <textarea id="whatever" name="whatever"><jsp:text /></textarea>
    

    for an more complex example have a look at this answer: websphere 7 (and Spring Roo) incompatible with javax.el.ELException

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a web application using Wicket+Spring+JPA+Hibernate. This is my first project with this
I'm trying to put together a contract-first web application using Spring-WS. I want to
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
I'm trying to choose an AJAX-friendly Java framework for my first web application and
I have a java web application based on Spring MVC. The task is to
I built a Java web application with multiple servlets and jsps. I first had
I'm currently transforming my Web Application tn Java with Spring MVC framework from ASP.NET
I have a web app that has to do something every, let's say first
I have a web application that makes use of a Spring TaskExecutor. The task
I have a java web application running on WebSphere 7. The application uses form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.