Forums Register Login

how to display text in angular brackets in jsp

+Pie Number of slices to send: Send
I am not able to display some text within angular brackets in jsp.Even in simple html file if i write >bfasd>fsdf,it is displaying only fsdl and not text in angular brackets.Seems like issue with browser.

So,can anyone tell me how i can display text in angular brackets in browser or jsp file.
+Pie Number of slices to send: Send
Exactly the same as in HTML (which is what the JSP generates, as you know). Escape the > character as >.

(This is assuming you are just asking about hard-coded text in the JSP. You weren't very specific about where the text was coming from.)
[ November 04, 2008: Message edited by: Paul Clapham ]
+Pie Number of slices to send: Send
You are right.We can use > but in that case, even html tags will not work as expected and will come as it is.I mean writing <b> will not act as tag which makes text bold.
Can you suggest any other way.
+Pie Number of slices to send: Send
There is text that you want to be displayed with the brackets, and text that are real HTML tags. Only convert the former.
+Pie Number of slices to send: Send
[Edit: Thread hijack removed. Please see your private messages.]
[ November 04, 2008: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
For dynamic text, the use of <c:out> to emit the text automatically HTML-encodes the text. For template text, just type in the HTML entities yourself.
+Pie Number of slices to send: Send
[Edit: please follow instructions and start your own thread for your issue]
[ November 04, 2008: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
<
+Pie Number of slices to send: Send
not able to display : <b><xyz></b>
+Pie Number of slices to send: Send
I don't know what that means. Are you using <c:out> as instructed?

The escapeXml attribute of <c:out> can be set to either escape the characters or not.
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2866 times.
Similar Threads
database update error with success message in jsp
Saffari browser does not support the html content on textarea
Jsp Parser API for the sake of Internationalization
How i can display records according to request
Displaying file content in a jsp page
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:10:46.