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?
Why JSPX does not like empty elements?
1.6k Views Asked by Bobo At
1
There are 1 best solutions below
Related Questions in HTML
- Delay in loading Html Page(WebView) from assets folder in real android device
- Why does a function show up as not defined
- CSS Class is not applying to element (border width,color,and style attributes)
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- Automatically closing tags in form input?
- Positioning child at bottom of parent with scroll
- Remove added set of rows
- Website zoomed out on Android default browser
- Twitter Bootstrap horizontal form elements on a line
- http://sigmajs.org/ les mis tutorial - why are my canvases 0 height?
- My navbar is not expanding after collapse
- when a checkbox is checked how to display a different hidden element using javascript
- Gaps Vertically Using Dividers
- Svg containers not positioning properly
Related Questions in JSP
- Why we use double % in Java or JSP
- How to get specific values from select menu and use her in mysql query?
- How to compile an individual jsp file from command line
- How to keep a variable in the URL when using Spring LocaleChangeInterceptor
- How to pass value from input text to jsp variable?
- Importing a downloaded JAR file into a Servlet
- Upload PDF and display on same page
- Use javascript variables in JSP code
- How to add '%' symbol in textbox using jsf and jsp?
- Execute RequestDispatcher after 5 seconds
- Score book using javabean; how do I get overall average?
- Struts2 jqGrid DatePicker in Column Filter
- java.lang.StackOverflowError in spring controller
- Error on java application
- Requested Resource is not available error
Related Questions in XHTML
- Display string on page xhtml
- Dynamic 2D arrayList table not working after refreshing in primefaces?
- Ajax h:link doesn't call listener function
- Difference between adding <![CDATA[ in page source v/s dynamically using javascript
- Sessionscoped managed bean not saving variables jsf
- Instance variable increment in bean on button click JSF 2.2
- Centering an image in a div
- Remove certain fields using jQuery
- Is there a better way to semantically code up an FAQ in XHTML 1.0 Transitional?
- How to display Arabic unicode text in page that retrieved from database
- display top 10 dynamic records in two column(Each 5 records)
- to integrate java program into jsf
- How to prevent the vertical scroll of this div?
- Command not found: [html2xhtml] exception happens when using Html2Xhtml library
- How to get grid background color for web-page?
Related Questions in JSPX
- ADF-Jdeveloper How to set the first value by default of a RichSelectOneChoice?
- Session attribute not working with useBean value
- How to separate head?
- Preventing Spring Roo from recreating JSPx files
- Request Time Expression (XML Syntax) %= %
- metadata tag not working in jsf
- Spring Roo and web scaffolding issue
- Spring roo project, header binding
- SpringRoo placing <script> and <link> on load-scripts.tagx from view.xml
- joda:format returns empty string
- <c:out value="Test"/> inside jspx doesn't show in browser
- Spring MVC: Multiple Models in A form: Binding problems and blank screen
- How to run jsp pages in eclipse using tomcat server?
- Why JSPX does not like empty elements?
- New to JSPX - Dillemas
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
That's by JSP specification:
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.JSP(X) is however an old view technology. Its successor, Facelets, does a better job in this.
See also: