If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > Retrieving fields which contain both text and HTML

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-07, 13:35
igordonin igordonin is offline
Registered User
 
Join Date: Jul 2006
Posts: 56
Retrieving fields which contain both text and HTML

Hi!

I'm using Oracle with a JAVA Application and am trying to retrieve fields that have HTML tags in them.

The field type is VARCHAR2.

The contents may be like:

Quote:
Severium espadius est cumplicus modis aedis <br> <br> etc blah blah blah <br>.
When I retrieve this field and output it to the response window the <br> do not become break lines.

How can I do that ??


Thanx for any help.
Reply With Quote
  #2 (permalink)  
Old 02-27-07, 05:30
dimis2500 dimis2500 is offline
Registered User
 
Join Date: Jan 2005
Posts: 362
You may use JEditorPane.
Code:
import javax.swing.*;
...
JEditorPane htmlDisplay = new JEditorPane;
htmlDisplay.setEditable(false);
htmlDisplay.setContentType("text/html");
htmlDisplay.setPage("url_as_string_or_java.net.URL")
JeditorPane
Dimis
Reply With Quote
  #3 (permalink)  
Old 03-06-07, 11:02
noclueu2 noclueu2 is offline
Registered User
 
Join Date: Jan 2007
Posts: 7
It may be helpful to see how you are outputing the text. I am assuming what you are using is taking the text and generating something like this &gt;br&lt; which would show as <br> not as an HTML tag.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On