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 7066535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:05:37+00:00 2026-05-28T05:05:37+00:00

this <div id=adiv></div> will in JSPX somehow be translated into <div id=adiv /> .

  • 0

this <div id="adiv"></div> will in JSPX somehow be translated into <div id="adiv" />. The way I got it to work is to add empty comments inside like <div id="adiv"><!-- --></div>. I dont understand why this is happening and is there a better to solve this issue?

  • 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-28T05:05:37+00:00Added an answer on May 28, 2026 at 5:05 am

    That’s by JSP specification:

    JSP.6.2.3 Semantic Model

    …

    To clearly explain the processing of whitespace, we follow the structure of the
    XSLT specification. The first step in processing a JSP document is to identify the
    nodes of the document. Then, all textual nodes that have only white space are
    dropped from the document; the only exception are nodes in a jsp:text element,
    which are kept verbatim.
    The resulting nodes are interpreted as described in the
    following sections. Template data is either passed directly to the response or it is
    mediated through (standard or custom) actions.

    In theory, it should not harm if you use a XHTML doctype to present the document in the client side instead of a HTML doctype. However, even the XHTML spec requires some elements to be not self-closing. Another workaround would be using <jsp:text /> instead of a comment.

    <div id="adiv"><jsp:text /></div>
    

    JSP(X) is however an old view technology. Its successor, Facelets, does a better job in this.

    See also:

    • JSP Document/JSPX: what determines how tabs/space/linebreaks are removed in the output?
    • Why don't self-closing script tags work?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div having a css class MyClass. Inside this div, I can
i have 4 divs inside of a div like this: <div id=Wrapper> <div id=CoreSideBar><!--
I'm building an html5/js/css application that will exist inside of a div on my
Let's say I have a div called the_div . In this div there will
I'm looking for a way I can create a div which will be fixed
So I am appending a div to the body and this div will popup
I have a div element that has an id and this div contains a
How to center a div across all browsers and behind this div there should
I have a div with float:right (no position property declared). This div has some
say for example i have 2 div in a div like this <div style=width:

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.